diff --git a/src/c3nav/editor/static/editor/css/editor.css b/src/c3nav/editor/static/editor/css/editor.css index 13ffdc49..e38b6097 100644 --- a/src/c3nav/editor/static/editor/css/editor.css +++ b/src/c3nav/editor/static/editor/css/editor.css @@ -44,7 +44,8 @@ body:not(.map-enabled) #sidebar { width:100%; } #sidebar .content { - width:350px; + width:100%; + max-width:350px; padding:10px 15px; margin:auto; } @@ -130,7 +131,6 @@ form button.invisiblesubmit { width:100vw; } #sidebar .content { - width:100%; max-width:500px; } body.show-map #sidebar { diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 63323d25..e7ff0356 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -68,9 +68,9 @@ editor = { }, init_sidebar: function() { // init the sidebar. sed listeners for form submits and link clicks - $('#sidebarcontent').on('click', 'a[href]', editor._sidebar_link_click) - .on('click', 'button[type=submit]', editor._sidebar_submit_btn_click) - .on('submit', 'form', editor._sidebar_submit); + $('#sidebar').find('.content').on('click', 'a[href]', editor._sidebar_link_click) + .on('click', 'button[type=submit]', editor._sidebar_submit_btn_click) + .on('submit', 'form', editor._sidebar_submit); var location_path = editor.get_location_path(); editor.sidebar_get(location_path); history.replaceState({}, '', location_path); @@ -80,7 +80,7 @@ editor = { }, sidebar_get: function(location) { // load a new page into the sidebar using a GET request - if ($('#sidebarcontent').html() !== '') { + if ($('#sidebar').find('.content').html() !== '') { history.pushState({}, '', location); } editor._sidebar_unload(); diff --git a/src/c3nav/editor/templates/editor/sections.html b/src/c3nav/editor/templates/editor/section.html similarity index 100% rename from src/c3nav/editor/templates/editor/sections.html rename to src/c3nav/editor/templates/editor/section.html