summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-04 10:07:32 +0000
committerSarven Capadisli <csarven@status.net>2010-01-04 10:07:32 +0000
commitad323575e6c083417fc4e6fc1e253bc9d564e6b2 (patch)
tree0ca8c0d99ea56966bd549b6c4eaefdad1ae43f68 /js
parentfe8927a42caa8f74e13f636ed530ef590668f01c (diff)
Refactored geo location removal to removeNoticeDataGeo()
Diffstat (limited to 'js')
-rw-r--r--js/util.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/js/util.js b/js/util.js
index c1cc08a71..226fdb102 100644
--- a/js/util.js
+++ b/js/util.js
@@ -535,23 +535,13 @@ var SN = { // StatusNet
function(error) {
if (error.PERMISSION_DENIED == 1) {
- $('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
- NDGS.hide();
- $('#'+SN.C.S.NoticeLat).val('');
- $('#'+SN.C.S.NoticeLon).val('');
- $('#'+SN.C.S.NoticeLocationNs).val('');
- $('#'+SN.C.S.NoticeLocationId).val('');
+ removeNoticeDataGeo();
}
}
);
}
else {
- $('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
- NDGS.hide();
- $('#'+SN.C.S.NoticeLat).val('');
- $('#'+SN.C.S.NoticeLon).val('');
- $('#'+SN.C.S.NoticeLocationNs).val('');
- $('#'+SN.C.S.NoticeLocationId).val('');
+ removeNoticeDataGeo();
}
});
@@ -560,6 +550,15 @@ var SN = { // StatusNet
NDG.change();
}
}
+
+ 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() {