From 83bdc4b03586266c527e35a40e381c947fe21526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Mon, 28 Nov 2016 16:49:16 +0100 Subject: [PATCH] editor: fix sidebar sometimes not loading --- src/c3nav/editor/static/editor/js/editor.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 44994ab4..65ff3790 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -104,7 +104,7 @@ editor = { }, set_current_level: function(level_name) { // sets the current level if the sidebar allows it - var level_switch = $('#mapeditcontrols ').find('[data-level-switch]'); + var level_switch = $('#mapeditcontrols').find('[data-level-switch]'); if (level_switch.length === 0) return; editor._level = level_name; $('.leaflet-levels .current').removeClass('current'); @@ -329,8 +329,6 @@ editor = { $('#mapeditcontrols').on('click', 'a[href]', editor._sidebar_link_click) .on('click', 'button[type=submit]', editor._sidebar_submit_btn_click) .on('submit', 'form', editor._sidebar_submit);; - - editor.sidebar_get('mapitemtypes/'+String(editor._level)+'/'); }, sidebar_get: function(location) { // load a new page into the sidebar using a GET request