diff options
author | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-01-13 23:10:00 +0100 |
---|---|---|
committer | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-01-13 23:10:00 +0100 |
commit | 108c51fa6859ec56269078ef9bd0459fdbd9b1ba (patch) | |
tree | c45dc1036d80ba0fdc58473819cde12bcc03eb32 /js/util.js | |
parent | f7f82982ec9a8671195efdc278c2987aa92c083c (diff) | |
parent | 25ed2d2c872e59fd99b54fdf0dec1ca448feca00 (diff) |
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'js/util.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 } ); } |