SideBar menu does not stay active with query string
pull/703/head
Nicolae Gabriel 2018-02-13 11:22:21 +02:00
parent 97b8a8b1f1
commit 0621583461
4 changed files with 6201 additions and 4836 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

6130
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
* and open the template in the editor.
*/
var CURRENT_URL = window.location.href.split('#')[0].split('?')[0],
var CURRENT_URL = window.location.href,
$BODY = $('body'),
$MENU_TOGGLE = $('#menu_toggle'),
$SIDEBAR_MENU = $('#sidebar-menu'),
@ -46,7 +46,7 @@ $(document).ready(function() {
$SIDEBAR_MENU.find('li').removeClass('active active-sm');
$SIDEBAR_MENU.find('li ul').slideUp();
}
$li.addClass('active');
$('ul:first', $li).slideDown(function() {
@ -82,7 +82,7 @@ $(document).ready(function() {
}).parent().addClass('active');
// recompute content when resizing
$(window).smartresize(function(){
$(window).smartresize(function(){
setContentHeight();
});
@ -105,15 +105,15 @@ $(document).ready(function() {
var $BOX_PANEL = $(this).closest('.x_panel'),
$ICON = $(this).find('i'),
$BOX_CONTENT = $BOX_PANEL.find('.x_content');
// fix for some div with hardcoded fix class
if ($BOX_PANEL.attr('style')) {
$BOX_CONTENT.slideToggle(200, function(){
$BOX_PANEL.removeAttr('style');
});
} else {
$BOX_CONTENT.slideToggle(200);
$BOX_PANEL.css('height', 'auto');
$BOX_CONTENT.slideToggle(200);
$BOX_PANEL.css('height', 'auto');
}
$ICON.toggleClass('fa-chevron-up fa-chevron-down');