From 2000d2d36b466615e3867f0002ddeaf793cf666f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 13 Jan 2010 15:36:42 +0000 Subject: Added timeout error handling for geo location --- js/util.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'js') 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 } ); } -- cgit v1.2.3-54-g00ecf