From: Sarven Capadisli Date: Mon, 4 Jan 2010 10:07:32 +0000 (+0000) Subject: Refactored geo location removal to removeNoticeDataGeo() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ad323575e6c083417fc4e6fc1e253bc9d564e6b2;p=quix0rs-gnu-social.git Refactored geo location removal to removeNoticeDataGeo() --- diff --git a/js/util.js b/js/util.js index c1cc08a714..226fdb102c 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() {