Skip to content

Commit

Permalink
Add show obfuscator option
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Feb 14, 2019
1 parent 1082f69 commit 5831780
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/navbar-mini-fluid.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<!-- SIDEBAR -->
<div class="sidebar sidebar-mini sidebar-default"
data-sidebar="true" data-toggle-id="sidebar-toggle-left">
data-sidebar="true" data-show-obfuscator="false" data-toggle-id="sidebar-toggle-left">
<ul class="sidebar-menu text-right">
<li class="sidebar-group"><span>Header 1</span>
<ul class="sidebar-group-menu">
Expand Down
2 changes: 1 addition & 1 deletion examples/navbar-mini.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<!-- SIDEBAR -->
<div class="sidebar sidebar-mini sidebar-default"
data-sidebar="true" data-toggle-id="sidebar-toggle-left">
data-sidebar="true" data-show-obfuscator="false" data-toggle-id="sidebar-toggle-left">
<ul class="sidebar-menu text-right">
<li class="sidebar-group"><span>Header 1</span>
<ul class="sidebar-group-menu">
Expand Down
3 changes: 2 additions & 1 deletion js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class Sidebar extends BasePlugin
this.$wrapper = $('<div class="' + this.options.classWrapper + '"></div>');
this.$container = $('> .' + this.options.classContainer, this.$element.parent());
this.$swipe = null;
this.$obfuscator = $('<div class="' + this.options.classObfuscator + '"></div>');
this.$obfuscator = $('<div class="' + this.options.classObfuscator + (this.options.showObfuscator ? ' show' : '') + '"></div>');
this.$body = $('body');
this.enabled = !this.$element.hasClass('sidebar-disabled');
this.mini = this.$element.hasClass('sidebar-mini');
Expand Down Expand Up @@ -551,6 +551,7 @@ Sidebar.defaultOptions = {
closeOnSelectDelay: 0.5,
resetScrollDelay: 0.3,
itemSelector: '.sidebar-menu a',
showObfuscator: true,
useScroller: true,
scrollerScrollbar: undefined,
scroller: {
Expand Down
2 changes: 1 addition & 1 deletion less/sidebar-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}
}

.sidebar-obfuscator {
.sidebar-obfuscator.show {
background-color: @sidebar-obfuscator-bg;
}

Expand Down

0 comments on commit 5831780

Please sign in to comment.