Use jquery.cookie

This commit is contained in:
John Firebaugh 2012-09-17 17:00:03 -07:00 committed by Tom Hughes
parent 3b1f455dd9
commit 14a7d1abfc
3 changed files with 74 additions and 1 deletions

View file

@ -2,6 +2,7 @@
//= require jquery_ujs
//= require jquery.autogrowtextarea
//= require jquery.timers
//= require jquery.cookie
//= require augment
//= require openlayers
//= require i18n/translations

View file

@ -227,7 +227,7 @@ end
updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, objtype, objid);
expiry.setYear(expiry.getFullYear() + 10);
document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers + "; expires=" + expiry.toGMTString();
$.cookie("_osm_location", [lonlat.lon, lonlat.lat, zoom, layers].join("|"), {expires: expiry});
}
function remoteEditHandler(event) {