]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Redo mobile styles
[rails.git] / app / assets / javascripts / index.js
index 238ab7f6398e81af3e6cd583601b533dc39ac159..2ed869905995753fecea8b6515c4f72ed63414cc 100644 (file)
@@ -37,7 +37,7 @@ $(document).ready(function () {
 
   var layers = [
     new L.OSM.Mapnik({
-      attribution: copyright+" – "+donate,
+      attribution: copyright + " ♥ " + donate,
       code: "M",
       keyid: "mapnik",
       name: I18n.t("javascripts.map.base.standard")
@@ -231,17 +231,17 @@ $(document).ready(function () {
   initializeNotes(map);
 
   OSM.Index = function(map) {
-    var page = {}, minimized = $('#sidebar').hasClass('minimized');
+    var page = {};
 
     page.pushstate = page.popstate = function(path) {
-      if (minimized) $("#sidebar").addClass("minimized");
+      $("#content").addClass("overlay-sidebar");
       map.invalidateSize();
-      $("#view_tab").addClass("current");
       $('#sidebar_content').load(path);
     };
 
     page.unload = function() {
-      $("#view_tab").removeClass("current");
+      $("#content").removeClass("overlay-sidebar");
+      map.invalidateSize();
     };
 
     return page;
@@ -251,8 +251,6 @@ $(document).ready(function () {
     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);
       });
@@ -305,5 +303,4 @@ $(document).ready(function () {
       map.getCenter().lat.toFixed(precision) + "," +
       map.getCenter().lng.toFixed(precision)));
   });
-
 });