})
};
- page.pushstate = page.popstate = function () {
- page.load();
- };
-
addNoteButton.on("click", function (e) {
e.preventDefault();
e.stopPropagation();
}
function updateMarker(feature) {
- marker = L.marker(feature.geometry.coordinates.reverse(), {
+ var marker = L.marker(feature.geometry.coordinates.reverse(), {
icon: noteIcons[feature.properties.status],
opacity: 0.9,
clickable: true
return marker;
}
- function initialize() {
+ page.pushstate = page.popstate = function (path) {
+ OSM.loadSidebarContent(path, page.load);
+ };
+
+ page.load = function () {
if (addNoteButton.hasClass("disabled")) return;
if (addNoteButton.hasClass("active")) return;
e.preventDefault();
createNote(newNote, e.target.form, '/api/0.6/notes.json');
});
- }
-
- page.load = function () {
- content.load(window.location.pathname + "?xhr=1", function (a, b, xhr) {
- if (xhr.getResponseHeader('X-Page-Title')) {
- document.title = xhr.getResponseHeader('X-Page-Title');
- }
- initialize();
- });
};
page.unload = function () {