summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-13 15:36:42 +0000
committerSarven Capadisli <csarven@status.net>2010-01-13 15:36:42 +0000
commit2000d2d36b466615e3867f0002ddeaf793cf666f (patch)
tree2dbe492103748d18e9e7a2c110323906d151df13 /js
parent9b2fdefe3925ca807ccf80339bef019306096cc6 (diff)
Added timeout error handling for geo location
Diffstat (limited to 'js')
-rw-r--r--js/util.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js
index 0ee3d53bd..b56410e62 100644
--- a/js/util.js
+++ b/js/util.js
@@ -632,9 +632,18 @@ var SN = { // StatusNet
},
function(error) {
- if (error.PERMISSION_DENIED == 1) {
- removeNoticeDataGeo();
+ switch(error.code) {
+ case error.PERMISSION_DENIED:
+ removeNoticeDataGeo();
+ break;
+ case error.TIMEOUT:
+ $('#'+SN.C.S.NoticeGeoName).text(NoticeDataGeo_text.ErrorTimeout).removeClass('processing');
+ break;
}
+ },
+
+ {
+ timeout: 10000
}
);
}