summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-18 12:55:14 +0000
committerSarven Capadisli <csarven@status.net>2010-01-18 12:55:14 +0000
commit42601b1ff0f054223ca7fb11c50aa236a87d07fa (patch)
treef8e317235ab04e28136fbdff3287607904575530 /js
parent187a70873a1af2eceafa12333e0c04750d01b5c2 (diff)
Some JS cleaning up for NoticeLocationAttach (which fixes also fixes a
few bugs in WebKit)
Diffstat (limited to 'js')
-rw-r--r--js/util.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/util.js b/js/util.js
index a10e9d15a..aeec8d89d 100644
--- a/js/util.js
+++ b/js/util.js
@@ -494,7 +494,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;
@@ -509,7 +509,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;
@@ -571,7 +571,7 @@ var SN = { // StatusNet
token: $('#token').val()
};
- getJSONgeocodeURL(geocodeURL, data, position);
+ getJSONgeocodeURL(geocodeURL, data);
},
function(error) {
@@ -593,12 +593,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();