]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Reuse cookie location_enabled before .change()
authorSarven Capadisli <csarven@status.net>
Tue, 5 Jan 2010 01:31:34 +0000 (01:31 +0000)
committerSarven Capadisli <csarven@status.net>
Tue, 5 Jan 2010 01:31:34 +0000 (01:31 +0000)
js/util.js

index d84d21582179b910a1df1617711bf19c238c762e..af6e0ff202b0de4ae3432a546894b2392e034d63 100644 (file)
@@ -503,6 +503,9 @@ var SN = { // StatusNet
 
             var NDG = $('#'+SN.C.S.NoticeDataGeo);
             if (NDG.length > 0) {
+                var cookieVal = $.cookie(SN.C.S.NoticeLocationCookieName);
+                NDG.attr('checked', (cookieVal === null || cookieVal == 'true'));
+
                 var NLE = $('#notice_data-location_wrap');
                 var geocodeURL = NLE.attr('title');
                 NLE.removeAttr('title');
@@ -593,9 +596,6 @@ var SN = { // StatusNet
                         removeNoticeDataGeo();
                     }
                 }).change();
-
-                var cookieVal = $.cookie(SN.C.S.NoticeLocationCookieName);
-                NDG.attr('checked', (cookieVal === null || cookieVal == 'true'));
             }
         },