diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/util.js | 18 |
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+'">_</button> <button class="close" title="'+NoticeDataGeoShareDisable_text+'">×</button>'); + NDGS.prepend('<span id="'+SN.C.S.NoticeGeoName+'">Geo</span> <button class="minimize" title="'+NoticeDataGeo_text.InfoMinimize+'">_</button> <button class="close" title="'+NoticeDataGeo_text.ShareDisable+'">×</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 } ); } |