Skip to content
Code-Schnipsel Gruppen Projekte
Commit 9de360a4 erstellt von Dominik Chrzanowski's avatar Dominik Chrzanowski
Dateien durchsuchen

feat: Added new functionality (reset menu after close it) [SlideOutAdvanced]...

feat: Added new functionality (reset menu after close it) [SlideOutAdvanced] #23
Übergeordneter 3b28e62e
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -25,22 +25,22 @@ define('package/quiqqer/menu/bin/SlideOutAdvanced', [
return new Class({
Extends: QUIControl,
Type : 'package/quiqqer/menu/bin/MenuAdvanced',
menuDepth : 0,
Extends : QUIControl,
Type : 'package/quiqqer/menu/bin/MenuAdvanced',
menuDepth : 0,
options: {
top : 10,
left : 10,
bottom : false,
right : false,
'data-show-button-on-desktop': true,
'menu-width' : 256,
'menu-button' : true,
'touch' : false,
'buttonids' : false,
collapsemobilemenu : false
top : 10,
left : 10,
bottom : false,
right : false,
'data-show-button-on-desktop' : true,
'menu-width' : 256,
'menu-button' : true,
'touch' : false,
'buttonids' : false,
collapsemobilemenu : false
},
Binds: [
......@@ -155,10 +155,6 @@ define('package/quiqqer/menu/bin/SlideOutAdvanced', [
runs = false;
});
});
// var Slideout = this.getAttribute('Slideout');
// Slideout.on('close', () => {
// this.resetMenu();
// });
// fix for IE - z-index must have the value 0
if (navigator.appName == 'Microsoft Internet Explorer' ||
......@@ -313,6 +309,12 @@ define('package/quiqqer/menu/bin/SlideOutAdvanced', [
touch : this.getAttribute('touch')
});
// this.Slideout.on('close', this.resetMenu);
this.Slideout.on('close', () => {
this.resetMenu();
});
this.Slideout.on('beforeopen', function () {
self.$onResize();
Elm.setStyle('display', '');
......@@ -601,13 +603,12 @@ define('package/quiqqer/menu/bin/SlideOutAdvanced', [
*/
resetMenu: function () {
this.menuDepth = 0;
var UlElements = this.Parent.getElements('.quiqqer-slideOutAdvanced-nav');
var UlElements = document.querySelectorAll('.quiqqer-slideOutAdvanced-nav');
UlElements.forEach((UlElement) => {
var ulClass = UlElement.classList;
var ulClass = UlElement.classList[1];
if (ulClass != "quiqqer-slideOutAdvanced-nav quiqqer-slideOutAdvanced-page-navigation-level-1") {
if (ulClass != "quiqqer-slideOutAdvanced-page-navigation-level-1") {
UlElement.setStyles({
display : "none"
});
......
......@@ -10,7 +10,7 @@
<div class="quiqqer-sub-nav-div">
{/if}
<ul class="quiqqer-advanced quiqqer-slideOutAdvanced-nav quiqqer-slideOutAdvanced-page-navigation-level-{$level} {if $showHomeLink == 0}quiqqer-slideOutAdvanced-nav-hideHomeLink{/if}">
<ul class="quiqqer-slideOutAdvanced-nav quiqqer-slideOutAdvanced-page-navigation-level-{$level} {if $showHomeLink == 0}quiqqer-slideOutAdvanced-nav-hideHomeLink{/if}">
{foreach from=$children key=k item=Child}
{if $level > 1 and $k == 0}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren