X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d414ffc61a0f6505f1d06e89e8668fa5b49d607e..286bffa3dba448f4364c6798f35003d8c6eefc4a:/app/assets/javascripts/application.js?ds=sidebyside diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a0ddcf9c2..83c17b6ec 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,12 @@ 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() { + $("header").toggleClass("closed"); + }); + + $("nav.primary li a").on("click", function() { + $("header").toggleClass("closed"); + }); });