summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/js/util.js b/js/util.js
index 43f492274..2cff4afc2 100644
--- a/js/util.js
+++ b/js/util.js
@@ -567,7 +567,7 @@ var SN = { // StatusNet
}
if ($('#'+SN.C.S.NoticeDataGeo).attr('checked') === true || $.cookie(SN.C.S.NoticeDataGeoCookie) === null) {
- $('label[for='+SN.C.S.NoticeDataGeo+']').addClass('checked').attr('title', NoticeDataGeoShareDisable_text);
+ $('label[for='+SN.C.S.NoticeDataGeo+']').addClass('checked').attr('title', NoticeDataGeo_text.ShareDisable);
var S = '<div id="'+SN.C.S.NoticeDataGeoSelected+'" class="'+SN.C.S.Success+'"/>';
var NDGS = $('#'+SN.C.S.NoticeDataGeoSelected);
@@ -580,7 +580,7 @@ var SN = { // StatusNet
}
NDGS = $('#'+SN.C.S.NoticeDataGeoSelected);
- NDGS.prepend('<span id="'+SN.C.S.NoticeGeoName+'">Geo</span> <button class="minimize" title="'+NoticeDataGeoInfoMinimize_text+'">&#95;</button> <button class="close" title="'+NoticeDataGeoShareDisable_text+'">&#215;</button>');
+ NDGS.prepend('<span id="'+SN.C.S.NoticeGeoName+'">Geo</span> <button class="minimize" title="'+NoticeDataGeo_text.InfoMinimize+'">&#95;</button> <button class="close" title="'+NoticeDataGeo_text.ShareDisable+'">&#215;</button>');
var NLN = $('#'+SN.C.S.NoticeGeoName);
NLN.addClass('processing');
@@ -632,9 +632,19 @@ 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');
+ $('#'+SN.C.S.NoticeDataGeo).attr('checked', false);
+ break;
}
+ },
+
+ {
+ timeout: 10000
}
);
}