Commit e7650492 authored by Jacob Schatz's avatar Jacob Schatz

Collapsed sidebar opens over instead of pushing content.

parent 509bc3fb
...@@ -21,7 +21,6 @@ class @Sidebar ...@@ -21,7 +21,6 @@ class @Sidebar
i.hide() i.hide()
sidebarDropdownLoaded: (e) -> sidebarDropdownLoaded: (e) ->
console.log 'loaded'
$sidebarCollapsedIcon = $(@).closest('.block').find('.sidebar-collapsed-icon') $sidebarCollapsedIcon = $(@).closest('.block').find('.sidebar-collapsed-icon')
img = $sidebarCollapsedIcon.find('img') img = $sidebarCollapsedIcon.find('img')
$sidebarCollapsedIcon.find('i.fa-spin').remove() $sidebarCollapsedIcon.find('i.fa-spin').remove()
...@@ -35,6 +34,7 @@ class @Sidebar ...@@ -35,6 +34,7 @@ class @Sidebar
sidebarCollapseClicked: (e) -> sidebarCollapseClicked: (e) ->
e.preventDefault() e.preventDefault()
$block = $(@).closest('.block') $block = $(@).closest('.block')
$('aside') $('aside')
.find('.gutter-toggle') .find('.gutter-toggle')
.trigger('click') .trigger('click')
...@@ -43,11 +43,13 @@ class @Sidebar ...@@ -43,11 +43,13 @@ class @Sidebar
if $editLink.length if $editLink.length
$editLink.trigger('click') $editLink.trigger('click')
$block.addClass('collapse-after-update') $block.addClass('collapse-after-update')
$('.page-with-sidebar').addClass('with-overlay')
sidebarDropdownHidden: (e) -> sidebarDropdownHidden: (e) ->
$block = $(@).closest('.block') $block = $(@).closest('.block')
if $block.hasClass('collapse-after-update') if $block.hasClass('collapse-after-update')
$block.removeClass('collapse-after-update') $block.removeClass('collapse-after-update')
$('.page-with-sidebar').removeClass('with-overlay')
$('aside') $('aside')
.find('.gutter-toggle') .find('.gutter-toggle')
.trigger('click') .trigger('click')
\ No newline at end of file
...@@ -304,4 +304,8 @@ ...@@ -304,4 +304,8 @@
@media (min-width: $screen-md-min) { @media (min-width: $screen-md-min) {
padding-right: $gutter_width; padding-right: $gutter_width;
} }
&.with-overlay {
padding-right: $sidebar_collapsed_width;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment