summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-04 13:44:32 +0000
committerSarven Capadisli <csarven@status.net>2010-01-04 13:44:32 +0000
commita0f7896f22b93caedf4cfcb91b14a25c0c1e6a82 (patch)
tree00563bde1b5deba9d41486862329ff63d58c3310 /js
parentdcc9497099442865914c4e56adebd88eecf8b433 (diff)
Ran NoticeLocationAttach() through jslint
Diffstat (limited to 'js')
-rw-r--r--js/util.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/js/util.js b/js/util.js
index 020031422..2d108118a 100644
--- a/js/util.js
+++ b/js/util.js
@@ -442,6 +442,15 @@ var SN = { // StatusNet
},
NoticeLocationAttach: function() {
+ function removeNoticeDataGeo() {
+ $('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
+ $('#'+SN.C.S.NoticeDataGeoSelected).hide();
+ $('#'+SN.C.S.NoticeLat).val('');
+ $('#'+SN.C.S.NoticeLon).val('');
+ $('#'+SN.C.S.NoticeLocationNs).val('');
+ $('#'+SN.C.S.NoticeLocationId).val('');
+ }
+
var NDG = $('#'+SN.C.S.NoticeDataGeo);
if (NDG.length > 0) {
var NLE = $('#notice_data-location_wrap');
@@ -460,7 +469,7 @@ var SN = { // StatusNet
}
var S = '<div id="'+SN.C.S.NoticeDataGeoSelected+'" class="'+SN.C.S.Success+'"/>';
- NDGS = $('#'+SN.C.S.NoticeDataGeoSelected);
+ var NDGS = $('#'+SN.C.S.NoticeDataGeoSelected);
if (NDGS.length > 0) {
NDGS.replaceWith(S);
}
@@ -470,7 +479,7 @@ var SN = { // StatusNet
NDGS = $('#'+SN.C.S.NoticeDataGeoSelected);
NDGS.prepend('<span id="'+SN.C.S.NoticeLocationName+'">Geo</span>');
- NLN = $('#'+SN.C.S.NoticeLocationName);
+ var NLN = $('#'+SN.C.S.NoticeLocationName);
if ($('#'+SN.C.S.NoticeDataGeo).attr('checked') === true) {
NLN.addClass('processing');
@@ -504,6 +513,7 @@ var SN = { // StatusNet
};
$.getJSON(geocodeURL, data, function(location) {
+ NLN = $('#'+SN.C.S.NoticeLocationName);
NLN.replaceWith('<a id="notice_data-location_name"/>');
NLN = $('#'+SN.C.S.NoticeLocationName);
@@ -542,22 +552,12 @@ var SN = { // StatusNet
else {
removeNoticeDataGeo();
}
- });
+ }).change();
var cookieVal = $.cookie(SN.C.S.NoticeLocationCookieName);
- NDG.attr('checked', (cookieVal == null || cookieVal == 'true'));
- NDG.change();
+ NDG.attr('checked', (cookieVal === null || cookieVal == 'true'));
}
}
-
- function removeNoticeDataGeo() {
- $('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
- $('#'+SN.C.S.NoticeDataGeoSelected).hide();
- $('#'+SN.C.S.NoticeLat).val('');
- $('#'+SN.C.S.NoticeLon).val('');
- $('#'+SN.C.S.NoticeLocationNs).val('');
- $('#'+SN.C.S.NoticeLocationId).val('');
- }
},
NewDirectMessage: function() {