diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-21 16:33:11 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-21 16:33:11 -0800 |
commit | c9c7bb3234f8ede65c328ecf9f713b189a81faad (patch) | |
tree | 5834925a7ad38aad43af252f949cfd836fad9c4d /js | |
parent | dcba61332223cfc875b355f6a5f4d2e574dd55b2 (diff) | |
parent | 4b0f953ccf7435d6ebe4a674953f62af36cc978b (diff) |
Merge commit 'origin/testing' into 0.9.x
Diffstat (limited to 'js')
-rw-r--r-- | js/util.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/util.js b/js/util.js index aeec8d89d..a7339010a 100644 --- a/js/util.js +++ b/js/util.js @@ -205,8 +205,10 @@ var SN = { // StatusNet cookieValue = JSON.parse(cookieValue); NLat = $('#'+SN.C.S.NoticeLat).val(cookieValue.NLat).val(); NLon = $('#'+SN.C.S.NoticeLon).val(cookieValue.NLon).val(); - NLNS = $('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS).val(); - NLID = $('#'+SN.C.S.NoticeLocationId).val(cookieValue.NLID).val(); + if ($('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS)) { + NLNS = $('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS).val(); + NLID = $('#'+SN.C.S.NoticeLocationId).val(cookieValue.NLID).val(); + } } if (cookieValue == 'disabled') { NDG = $('#'+SN.C.S.NoticeDataGeo).attr('checked', false).attr('checked'); @@ -301,8 +303,10 @@ var SN = { // StatusNet $('#'+SN.C.S.NoticeLat).val(NLat); $('#'+SN.C.S.NoticeLon).val(NLon); - $('#'+SN.C.S.NoticeLocationNs).val(NLNS); - $('#'+SN.C.S.NoticeLocationId).val(NLID); + if ($('#'+SN.C.S.NoticeLocationNs)) { + $('#'+SN.C.S.NoticeLocationNs).val(NLNS); + $('#'+SN.C.S.NoticeLocationId).val(NLID); + } $('#'+SN.C.S.NoticeDataGeo).attr('checked', NDG); } }); |