X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d414ffc61a0f6505f1d06e89e8668fa5b49d607e..b903d8b7462519d6ef8f9175fdbde1df6620ccbb:/app/assets/javascripts/application.js?ds=inline diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a0ddcf9c2..f1a13132c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -17,9 +17,7 @@ //= require oauth //= require piwik //= require map -//= require sidebar //= require richtext -//= require geocoder //= require querystring var querystring = require('querystring-component'); @@ -116,6 +114,14 @@ function escapeHTML(string) { }); } +function maximiseMap() { + $("#content").addClass("maximised"); +} + +function minimiseMap() { + $("#content").removeClass("maximised"); +} + /* * Forms which have been cached by rails may have the wrong * authenticity token, so patch up any forms with the correct @@ -124,4 +130,13 @@ function escapeHTML(string) { $(document).ready(function () { var auth_token = $("meta[name=csrf-token]").attr("content"); $("form input[name=authenticity_token]").val(auth_token); + + $("#menu-icon").on("click", function(e) { + e.preventDefault(); + $("header").toggleClass("closed"); + }); + + $("nav.primary li a").on("click", function() { + $("header").toggleClass("closed"); + }); });