diff --git a/assets/src/css/themes/default.css b/assets/src/css/themes/default.css index 6b7e9ae00..2420faa15 100644 --- a/assets/src/css/themes/default.css +++ b/assets/src/css/themes/default.css @@ -55,7 +55,8 @@ .skin-default .main-header .navbar .nav .open a:hover, .skin-default .main-header .navbar .nav .open a:focus, .skin-default .main-header .navbar .nav .active a, -.skin-default .main-header .navbar .nav .actual a { +.skin-default .main-header .navbar .nav .actual a, +.skin-default .main-header .navbar .nav .menu-open a { background: rgba(0, 0, 0, 0.2); color: #f6f6f6; } @@ -132,7 +133,8 @@ .skin-default .sidebar-menu li:hover a, .skin-default .sidebar-menu li.active a, -.skin-default .sidebar-menu li.actual a { +.skin-default .sidebar-menu li.actual a, +.skin-default .sidebar-menu li.menu-open a { background: #222; border-left-color: #222; } diff --git a/assets/src/js/custom.js b/assets/src/js/custom.js index 1c5d32ade..7be1e3d7c 100644 --- a/assets/src/js/custom.js +++ b/assets/src/js/custom.js @@ -1,44 +1,8 @@ $(document).ready(function () { // Fix per il menu principale - var animationSpeed = 500; - $(document).off('click', '.sidebar li a') - .on('click', '.sidebar li a', function (e) { - //Get the clicked link and the next element - var $this = $(this); - var checkElement = $this.next(); - - //Check if the next element is a menu and is visible - if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { - //Close the menu - checkElement.slideUp(animationSpeed, function () { - checkElement.removeClass('menu-open'); - }); - checkElement.parent("li").removeClass("active"); - } - //If the menu is not visible - else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { - //Get the parent menu - var parent = $this.parents('ul').first(); - //Close all open menus within the parent - var ul = parent.find('ul:visible').slideUp(animationSpeed); - //Remove the menu-open class from the parent - ul.removeClass('menu-open'); - //Get the parent li - var parent_li = $this.parent("li"); - - //Open the target menu and add the menu-open class - checkElement.slideDown(animationSpeed, function () { - //Add the class active to the parent li - checkElement.addClass('menu-open'); - parent.find('li.active').removeClass('active'); - parent_li.addClass('active'); - }); - } - //if this isn't a link, prevent the page from being redirected - if (checkElement.is('.treeview-menu') && $(e.target).is('.pull-right-container')) { - e.preventDefault(); - } - }); + $('.sidebar-menu').tree({ + followLink: true, + }); // Pulsante per il ritorno a inizio pagina var slideToTop = $("
"); diff --git a/gulpfile.js b/gulpfile.js index 76d0ef16b..d77d965ba 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -208,16 +208,16 @@ gulp.task('chartjs', function () { gulp.task('pdfjs', function () { gulp.src([ - config.main.bowerDirectory + '/pdfjs/web/**/*', - '!' + config.main.bowerDirectory + '/pdfjs/web/cmaps/*', - '!' + config.main.bowerDirectory + '/pdfjs/web/*.map', - '!' + config.main.bowerDirectory + '/pdfjs/web/*.pdf', + config.main.bowerDirectory + '/pdf/web/**/*', + '!' + config.main.bowerDirectory + '/pdf/web/cmaps/*', + '!' + config.main.bowerDirectory + '/pdf/web/*.map', + '!' + config.main.bowerDirectory + '/pdf/web/*.pdf', ]) .pipe(gulp.dest(config.production + '/pdfjs/web')); gulp.src([ - config.main.bowerDirectory + '/pdfjs/build/*', - '!' + config.main.bowerDirectory + '/pdfjs/build/*.map', + config.main.bowerDirectory + '/pdf/build/*', + '!' + config.main.bowerDirectory + '/pdf/build/*.map', ]) .pipe(gulp.dest(config.production + '/pdfjs/build')); }); diff --git a/include/top.php b/include/top.php index 47c2fc387..9cb547564 100644 --- a/include/top.php +++ b/include/top.php @@ -185,7 +185,7 @@ if (Auth::check()) {
'; }