initializeNotes(map);
OSM.Index = function(map) {
- var page = {};
+ var page = {}, minimized = false;
page.pushstate = page.popstate = function(path) {
+ if (minimized) $("#sidebar").addClass("minimized");
+ map.invalidateSize();
$("#view_tab").addClass("current");
$('#sidebar_content').load(path);
};
$("#view_tab").removeClass("current");
};
+ page.minimizeSidebar = function() {
+ $("#sidebar").addClass("minimized");
+ map.invalidateSize();
+ minimized = true;
+ };
+
+ $(document).on("click", "#sidebar_content .close", page.minimizeSidebar);
+
return page;
};
var page = {};
page.pushstate = page.popstate = function(path, type, id) {
+ $("#sidebar").removeClass("minimized");
+ map.invalidateSize();
$('#sidebar_content').load(path, function() {
page.load(path, type, id);
});
page.pushstate = page.popstate = function(path) {
$("#history_tab").addClass("current");
+ $("#sidebar").removeClass("minimized");
+ map.invalidateSize();
$('#sidebar_content').load(path, page.load);
};
page.pushstate = page.popstate = function(path) {
$("#export_tab").addClass("current");
+ $("#sidebar").removeClass("minimized");
+ map.invalidateSize();
$('#sidebar_content').load(path, page.load);
};
page.pushstate = page.popstate = function(path) {
var params = querystring.parse(path.substring(path.indexOf('?') + 1));
$("#query").val(params.query);
+ $("#sidebar").removeClass("minimized");
+ map.invalidateSize();
$("#sidebar_content").load(path, page.load);
};