mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Fixes a weird issue where a fixed sidebar cannot be accessed on small screens
This commit is contained in:
parent
cfbc004815
commit
bc317ffbb8
@ -37,8 +37,8 @@
|
||||
|
||||
this.$list.dragScroll({
|
||||
vertical: true,
|
||||
start: function(){self.$list.addClass('drag')},
|
||||
stop: function(){self.$list.removeClass('drag')},
|
||||
start: function(){ self.$list.addClass('drag') },
|
||||
stop: function(){ self.$list.removeClass('drag') },
|
||||
scrollClassContainer: self.$el,
|
||||
scrollMarkerContainer: self.$el
|
||||
})
|
||||
|
@ -126,8 +126,9 @@
|
||||
|
||||
SidePanelTab.prototype.hideSidePanel = function() {
|
||||
$(document.body).removeClass('display-side-panel')
|
||||
if (this.$el.next('#layout-body').length == 0)
|
||||
if (this.$el.next('#layout-body').length == 0) {
|
||||
$('#layout-body').before(this.$el)
|
||||
}
|
||||
|
||||
this.panelVisible = false
|
||||
|
||||
@ -135,25 +136,30 @@
|
||||
}
|
||||
|
||||
SidePanelTab.prototype.updatePanelPosition = function() {
|
||||
if (!this.panelFixed() || Modernizr.touch)
|
||||
if (!this.panelFixed() || Modernizr.touch) {
|
||||
this.$el.height($(document).height() - this.mainNavHeight)
|
||||
else
|
||||
}
|
||||
else {
|
||||
this.$el.css('height', '')
|
||||
}
|
||||
|
||||
if (this.panelVisible && $(window).width() > this.options.breakpoint && this.panelFixed())
|
||||
if (this.panelVisible && $(window).width() > this.options.breakpoint && this.panelFixed()) {
|
||||
this.hideSidePanel()
|
||||
}
|
||||
}
|
||||
|
||||
SidePanelTab.prototype.updateActiveTab = function() {
|
||||
if (!this.panelVisible && ($(window).width() < this.options.breakpoint || !this.panelFixed()))
|
||||
if (!this.panelVisible && ($(window).width() < this.options.breakpoint || !this.panelFixed())) {
|
||||
this.$sideNavItems.removeClass('active')
|
||||
}
|
||||
else {
|
||||
this.$sideNavItems.filter('[data-menu-item='+this.visibleItemId+']').addClass('active')
|
||||
}
|
||||
}
|
||||
|
||||
SidePanelTab.prototype.panelFixed = function() {
|
||||
return !$(document.body).hasClass('side-panel-not-fixed')
|
||||
return !($(window).width() < this.options.breakpoint) &&
|
||||
!$(document.body).hasClass('side-panel-not-fixed')
|
||||
}
|
||||
|
||||
SidePanelTab.prototype.fixPanel = function() {
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
#layout-sidenav.layout-sidenav ul.drag li:not(.active) a:hover,
|
||||
.touch #layout-sidenav.layout-sidenav li:not(.active) a:hover {
|
||||
color: @color-sidebarnav-inactive-text!important;
|
||||
i {color: @color-sidebarnav-inactive-icon!important;}
|
||||
&:after {display: none!important;}
|
||||
color: @color-sidebarnav-inactive-text !important;
|
||||
i { color: @color-sidebarnav-inactive-icon !important; }
|
||||
&:after { display: none !important; }
|
||||
}
|
@ -46,9 +46,11 @@ body.display-side-panel {
|
||||
}
|
||||
}
|
||||
|
||||
body.side-panel-fix-shadow {
|
||||
#layout-side-panel {
|
||||
.box-shadow(none);
|
||||
@media (min-width: @screen-md-min) {
|
||||
body.side-panel-fix-shadow {
|
||||
#layout-side-panel {
|
||||
.box-shadow(none);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user