diff options
-rw-r--r-- | js/util.js | 13 | ||||
-rw-r--r-- | lib/noticeform.php | 3 |
2 files changed, 13 insertions, 3 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 } ); } diff --git a/lib/noticeform.php b/lib/noticeform.php index 41504b735..a00615ce7 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -213,7 +213,8 @@ class NoticeForm extends Form $this->out->elementEnd('div'); $this->out->inlineScript(' var NoticeDataGeo_text = {'. 'ShareDisable: "'._('Do not share my location').'",'. - 'InfoMinimize: "'._('Hide this info').'"'. + 'InfoMinimize: "'._('Hide this info').'",'. + 'ErrorTimeout: "'._('Sorry, retrieving your geo location is taking longer than expected, please try again later').'"'. '}'); } |