summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-04 06:07:28 -0800
committerBrion Vibber <brion@pobox.com>2010-03-04 06:07:28 -0800
commitb218aee94e581230e1efa14d4ae1a19756986ddf (patch)
treea832ddf3b4322b520fd20c4d8ea2d31720c3679b /js/util.js
parent358556057a87c0cb9291223a2026782e6548ff2e (diff)
parent14d7f4a598d0e24467fe3eafd9a02b0e651edad8 (diff)
Merge commit 'origin/testing' into 0.9.x
Conflicts: lib/action.php lib/adminpanelaction.php
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/js/util.js b/js/util.js
index 949aec957..3efda0d7b 100644
--- a/js/util.js
+++ b/js/util.js
@@ -53,7 +53,7 @@ var SN = { // StatusNet
NoticeLocationNs: 'notice_data-location_ns',
NoticeGeoName: 'notice_data-geo_name',
NoticeDataGeo: 'notice_data-geo',
- NoticeDataGeoCookie: 'notice_data-geo_cookie',
+ NoticeDataGeoCookie: 'NoticeDataGeo',
NoticeDataGeoSelected: 'notice_data-geo_selected',
StatusNetInstance:'StatusNetInstance'
}
@@ -423,8 +423,11 @@ var SN = { // StatusNet
};
notice.find('a.attachment').click(function() {
- $().jOverlay({url: $('address .url')[0].href+'attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'});
- return false;
+ var attachId = ($(this).attr('id').substring('attachment'.length + 1));
+ if (attachId) {
+ $().jOverlay({url: $('address .url')[0].href+'attachment/' + attachId + '/ajax'});
+ return false;
+ }
});
if ($('#shownotice').length == 0) {
@@ -494,7 +497,7 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeLocationId).val('');
$('#'+SN.C.S.NoticeDataGeo).attr('checked', false);
- $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) });
+ $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/' });
}
function getJSONgeocodeURL(geocodeURL, data) {
@@ -537,7 +540,7 @@ var SN = { // StatusNet
NDG: true
};
- $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) });
+ $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/' });
});
}