]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Some JS cleaning up for NoticeLocationAttach (which fixes also fixes a
authorSarven Capadisli <csarven@status.net>
Mon, 18 Jan 2010 12:55:14 +0000 (12:55 +0000)
committerSarven Capadisli <csarven@status.net>
Sat, 23 Jan 2010 23:21:42 +0000 (00:21 +0100)
few bugs in WebKit)

js/util.js

index d93467d4a5372265bf3c9ca6dc8c81662c0b1827..a7339010a7b206218a9955c7730da97355a3ca23 100644 (file)
@@ -498,7 +498,7 @@ var SN = { // StatusNet
                 $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled');
             }
 
-            function getJSONgeocodeURL(geocodeURL, data, position) {
+            function getJSONgeocodeURL(geocodeURL, data) {
                 $.getJSON(geocodeURL, data, function(location) {
                     var lns, lid;
 
@@ -513,7 +513,7 @@ var SN = { // StatusNet
                     }
 
                     if (typeof(location.name) == 'undefined') {
-                        NLN_text = position.coords.latitude + ';' + position.coords.longitude;
+                        NLN_text = data.lat + ';' + data.lon;
                     }
                     else {
                         NLN_text = location.name;
@@ -575,7 +575,7 @@ var SN = { // StatusNet
                                             token: $('#token').val()
                                         };
 
-                                        getJSONgeocodeURL(geocodeURL, data, position);
+                                        getJSONgeocodeURL(geocodeURL, data);
                                     },
 
                                     function(error) {
@@ -597,12 +597,12 @@ var SN = { // StatusNet
                             else {
                                 if (NLat.length > 0 && NLon.length > 0) {
                                     var data = {
-                                        'lat': NLat,
-                                        'lon': NLon,
-                                        'token': $('#token').val()
+                                        lat: NLat,
+                                        lon: NLon,
+                                        token: $('#token').val()
                                     };
 
-                                    getJSONgeocodeURL(geocodeURL, data, position);
+                                    getJSONgeocodeURL(geocodeURL, data);
                                 }
                                 else {
                                     removeNoticeDataGeo();