diff --git a/bower.json b/bower.json index fc11fb86..6b7f2b64 100644 --- a/bower.json +++ b/bower.json @@ -1,28 +1,31 @@ { - "name": "jQuery.mmenu", - "main": "src/js/jquery.mmenu.min.js", - "version": "4.3.0", - "homepage": "http://mmenu.frebsite.nl/", - "authors": [ - "Fred Heusschen " - ], - "description": "A jQuery plugin that creates slick app look-alike sliding menus for your (mobile) website with horizontal or vertical submenus. It's easy to customize and has options for headers, labels, counters, a searchfield and more.", - "keywords": [ - "mmenu", - "menu", - "navigation", - "mobile", - "panels", - "app" - ], - "ignore": [ - ".jshintrc", - "Guardfile", - "index.html", - "*.json", - "README.md" - ], - "dependencies": { - "jquery": ">= 1.7.0" - } + "name": "jQuery.mmenu", + "main": "src/js/jquery.mmenu.min.js", + "version": "4.3.1", + "homepage": "http://mmenu.frebsite.nl/", + "authors": [ + "Fred Heusschen " + ], + "description": "The best jQuery plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.", + "keywords": [ + "mmenu", + "menu", + "submenu", + "navigation", + "on-canvas", + "off-canvas", + "mobile", + "panels", + "app" + ], + "ignore": [ + ".jshintrc", + "Guardfile", + "index.html", + "*.json", + "README.md" + ], + "dependencies": { + "jquery": ">= 1.7.0" + } } diff --git a/mmenu.jquery.json b/mmenu.jquery.json index 3cc2fb7f..104d0b6c 100644 --- a/mmenu.jquery.json +++ b/mmenu.jquery.json @@ -1,8 +1,19 @@ { "name": "mmenu", - "version": "4.3.0", + "version": "4.3.1", "title": "jQuery mmenu", - "description": "A jQuery plugin that creates slick app look-alike sliding menus for your (mobile) website with horizontal or vertical submenus. It's easy to customize and has options for headers, labels, counters, a searchfield and more.", + "description": "The best jQuery plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.", + "keywords": [ + "mmenu", + "menu", + "submenu", + "navigation", + "on-canvas", + "off-canvas", + "mobile", + "panels", + "app" + ], "homepage": "http://mmenu.frebsite.nl", "author": { "name": "Fred Heusschen", diff --git a/src/js/addons/jquery.mmenu.counters.js b/src/js/addons/jquery.mmenu.counters.js index 82c79af8..691b5126 100644 --- a/src/js/addons/jquery.mmenu.counters.js +++ b/src/js/addons/jquery.mmenu.counters.js @@ -32,7 +32,7 @@ // Refactor counter class - this.__refactorClass( $('em.' + this.conf.classNames[ _ADDON_ ].counter, this.$menu), 'counter' ); + this.__refactorClass( $('em', this.$menu), this.conf.classNames[ _ADDON_ ].counter, 'counter' ); // Add the counters @@ -134,7 +134,7 @@ // DEPRECATED if ( o.count ) { - $[ _PLUGIN_ ].deprecated( 'the option "count" for counters, the option "update"' ); + $[ _PLUGIN_ ].deprecated( 'the option "count" for counters', 'the option "update"' ); o.update = o.count; } // /DEPRECATED diff --git a/src/js/addons/jquery.mmenu.counters.min.js b/src/js/addons/jquery.mmenu.counters.min.js index 0ee5e30b..fc0896d6 100644 --- a/src/js/addons/jquery.mmenu.counters.min.js +++ b/src/js/addons/jquery.mmenu.counters.min.js @@ -5,4 +5,4 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters, the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em."+this.conf.classNames[c].counter,this.$menu),"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); \ No newline at end of file +!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters','the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em",this.$menu),this.conf.classNames[c].counter,"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); \ No newline at end of file diff --git a/src/js/addons/jquery.mmenu.dragopen.js b/src/js/addons/jquery.mmenu.dragopen.js index 1a72f715..289cdf9f 100644 --- a/src/js/addons/jquery.mmenu.dragopen.js +++ b/src/js/addons/jquery.mmenu.dragopen.js @@ -243,7 +243,7 @@ $[ _PLUGIN_ ].defaults[ _ADDON_ ] = { open : false, // pageNode : null, -// maxStartPos : null, + maxStartPos : 100, threshold : 50 }; $[ _PLUGIN_ ].configuration[ _ADDON_ ] = { @@ -272,10 +272,6 @@ { o = {}; } - if ( typeof o.maxStartPos != 'number' ) - { - o.maxStartPos = 100; - } o = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], o ); return o; diff --git a/src/js/addons/jquery.mmenu.dragopen.min.js b/src/js/addons/jquery.mmenu.dragopen.min.js index 34567643..945cf0b1 100644 --- a/src/js/addons/jquery.mmenu.dragopen.min.js +++ b/src/js/addons/jquery.mmenu.dragopen.min.js @@ -5,4 +5,4 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),"number"!=typeof t.maxStartPos&&(t.maxStartPos=100),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),x=d.$page;switch(this.opts.offCanvas.zposition){case"back":x=x.add(b);break;case"front":x=this.$menu;break;case"next":x=x.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&x.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),x.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); \ No newline at end of file +!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),$=d.$page;switch(this.opts.offCanvas.zposition){case"back":$=$.add(b);break;case"front":$=this.$menu;break;case"next":$=$.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&$.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),$.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,maxStartPos:100,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); \ No newline at end of file diff --git a/src/js/addons/jquery.mmenu.labels.js b/src/js/addons/jquery.mmenu.labels.js index b11a9b5b..5fc8f0b7 100644 --- a/src/js/addons/jquery.mmenu.labels.js +++ b/src/js/addons/jquery.mmenu.labels.js @@ -36,7 +36,7 @@ { // Refactor collapsed class - this.__refactorClass( $('li.' + this.conf.classNames[ _ADDON_ ].collapsed, this.$menu), 'collapsed' ); + this.__refactorClass( $('li', this.$menu), this.conf.classNames[ _ADDON_ ].collapsed, 'collapsed' ); $('.' + _c.label, this.$menu) .each( diff --git a/src/js/addons/jquery.mmenu.labels.min.js b/src/js/addons/jquery.mmenu.labels.min.js index c5ed9e68..d0d125e4 100644 --- a/src/js/addons/jquery.mmenu.labels.min.js +++ b/src/js/addons/jquery.mmenu.labels.min.js @@ -5,4 +5,4 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li."+this.conf.classNames[d].collapsed,this.$menu),"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); \ No newline at end of file +!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li",this.$menu),this.conf.classNames[d].collapsed,"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); \ No newline at end of file diff --git a/src/js/addons/jquery.mmenu.toggles.js b/src/js/addons/jquery.mmenu.toggles.js index f9aceb68..41006830 100644 --- a/src/js/addons/jquery.mmenu.toggles.js +++ b/src/js/addons/jquery.mmenu.toggles.js @@ -32,7 +32,7 @@ // Refactor toggle class - this.__refactorClass( $('input.' + this.conf.classNames[ _ADDON_ ].toggle, this.$menu), 'toggle' ); + this.__refactorClass( $('input', this.$menu), this.conf.classNames[ _ADDON_ ].toggle, 'toggle' ); // Add markup $('.' + _c.toggle, this.$menu) diff --git a/src/js/addons/jquery.mmenu.toggles.min.js b/src/js/addons/jquery.mmenu.toggles.min.js index 4c009292..eaa3ca13 100644 --- a/src/js/addons/jquery.mmenu.toggles.min.js +++ b/src/js/addons/jquery.mmenu.toggles.min.js @@ -5,4 +5,4 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(t){return t}function s(t){return t}function e(){g=!0,o=t[r]._c,i=t[r]._d,a=t[r]._e,o.add("toggle"),l=t[r].glbl}var o,i,a,l,r="mmenu",d="toggles",g=!1;t[r].prototype["_addon_"+d]=function(){g||e(),this.opts[d]=n(this.opts[d]),this.conf[d]=s(this.conf[d]);var i=this;this.opts[d],this.conf[d],this.__refactorClass(t("input."+this.conf.classNames[d].toggle,this.$menu),"toggle"),t("."+o.toggle,this.$menu).each(function(){var n=t(this),s=n.parent(),e=n.attr("id")||i.__getUniqueId();n.attr("id",e),s.prepend(n),t('').insertBefore(s.children().last())})},t[r].addons=t[r].addons||[],t[r].addons.push(d),t[r].defaults[d]={},t[r].configuration.classNames[d]={toggle:"Toggle"}}(jQuery); \ No newline at end of file +!function(t){function n(t){return t}function s(t){return t}function e(){g=!0,o=t[r]._c,i=t[r]._d,a=t[r]._e,o.add("toggle"),l=t[r].glbl}var o,i,a,l,r="mmenu",d="toggles",g=!1;t[r].prototype["_addon_"+d]=function(){g||e(),this.opts[d]=n(this.opts[d]),this.conf[d]=s(this.conf[d]);var i=this;this.opts[d],this.conf[d],this.__refactorClass(t("input",this.$menu),this.conf.classNames[d].toggle,"toggle"),t("."+o.toggle,this.$menu).each(function(){var n=t(this),s=n.parent(),e=n.attr("id")||i.__getUniqueId();n.attr("id",e),s.prepend(n),t('').insertBefore(s.children().last())})},t[r].addons=t[r].addons||[],t[r].addons.push(d),t[r].defaults[d]={},t[r].configuration.classNames[d]={toggle:"Toggle"}}(jQuery); \ No newline at end of file diff --git a/src/js/jquery.mmenu.min.all.js b/src/js/jquery.mmenu.min.all.js index f7c5777a..f7945912 100644 --- a/src/js/jquery.mmenu.min.all.js +++ b/src/js/jquery.mmenu.min.all.js @@ -1,5 +1,5 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -11,7 +11,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); /* * jQuery mmenu offCanvas addon * mmenu.frebsite.nl @@ -27,7 +27,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters, the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em."+this.conf.classNames[c].counter,this.$menu),"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); +!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters','the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em",this.$menu),this.conf.classNames[c].counter,"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); /* * jQuery mmenu dragOpen addon * mmenu.frebsite.nl @@ -35,7 +35,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),"number"!=typeof t.maxStartPos&&(t.maxStartPos=100),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),x=d.$page;switch(this.opts.offCanvas.zposition){case"back":x=x.add(b);break;case"front":x=this.$menu;break;case"next":x=x.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&x.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),x.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); +!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),$=d.$page;switch(this.opts.offCanvas.zposition){case"back":$=$.add(b);break;case"front":$=this.$menu;break;case"next":$=$.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&$.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),$.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,maxStartPos:100,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); /* * jQuery mmenu header addon * mmenu.frebsite.nl @@ -51,7 +51,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li."+this.conf.classNames[d].collapsed,this.$menu),"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); +!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li",this.$menu),this.conf.classNames[d].collapsed,"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); /* * jQuery mmenu searchfield addon * mmenu.frebsite.nl diff --git a/src/js/jquery.mmenu.min.js b/src/js/jquery.mmenu.min.js index 07f4e916..5f8f8107 100644 --- a/src/js/jquery.mmenu.min.js +++ b/src/js/jquery.mmenu.min.js @@ -1,5 +1,5 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -11,7 +11,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); /* * jQuery mmenu offCanvas addon * mmenu.frebsite.nl diff --git a/src/js/jquery.mmenu.oncanvas.js b/src/js/jquery.mmenu.oncanvas.js index adfcbabe..68ff36f7 100644 --- a/src/js/jquery.mmenu.oncanvas.js +++ b/src/js/jquery.mmenu.oncanvas.js @@ -1,5 +1,5 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -16,7 +16,7 @@ (function( $ ) { var _PLUGIN_ = 'mmenu', - _VERSION_ = '4.3.0'; + _VERSION_ = '4.3.1'; // Plugin already excists @@ -180,7 +180,7 @@ // Refactor List class - this.__refactorClass( $('.' + this.conf.classNames.list, this.$menu), 'list' ); + this.__refactorClass( $('.' + this.conf.classNames.list, this.$menu), this.conf.classNames.list, 'list' ); // Add List class if ( this.opts.isMenu ) @@ -193,13 +193,13 @@ var $lis = $('.' + _c.list + ' > li', this.$menu); // Refactor Selected class - this.__refactorClass( $lis.filter( '.' + this.conf.classNames.selected ), 'selected' ); + this.__refactorClass( $lis, this.conf.classNames.selected, 'selected' ); // Refactor Label class - this.__refactorClass( $lis.filter( '.' + this.conf.classNames.label ), 'label' ); + this.__refactorClass( $lis, this.conf.classNames.label, 'label' ); // Refactor Spacer class - this.__refactorClass( $lis.filter( '.' + this.conf.classNames.spacer ), 'spacer' ); + this.__refactorClass( $lis, this.conf.classNames.spacer, 'spacer' ); // setSelected-event $lis @@ -222,7 +222,7 @@ ); // Refactor Panel class - this.__refactorClass( $('.' + this.conf.classNames.panel, this.$menu), 'panel' ); + this.__refactorClass( $('.' + this.conf.classNames.panel, this.$menu), this.conf.classNames.panel, 'panel' ); // Add Panel class this.$menu @@ -432,9 +432,11 @@ return o; }, - __refactorClass: function( $e, c ) + __refactorClass: function( $e, o, c ) { - $e.removeClass( this.conf[ c + 'Class' ] ).addClass( _c[ c ] ); + $e.filter( '.' + o ) + .removeClass( o ) + .addClass( _c[ c ] ); }, __transitionend: function( $e, fn, duration ) diff --git a/src/js/jquery.mmenu.oncanvas.min.js b/src/js/jquery.mmenu.oncanvas.min.js index 8999d15b..e8917fe4 100644 --- a/src/js/jquery.mmenu.oncanvas.min.js +++ b/src/js/jquery.mmenu.oncanvas.min.js @@ -1,5 +1,5 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -11,4 +11,4 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); \ No newline at end of file +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); \ No newline at end of file diff --git a/src/js/umd/addons/jquery.mmenu.counters.umd.js b/src/js/umd/addons/jquery.mmenu.counters.umd.js index eb4097e2..b83ca09a 100644 --- a/src/js/umd/addons/jquery.mmenu.counters.umd.js +++ b/src/js/umd/addons/jquery.mmenu.counters.umd.js @@ -24,5 +24,5 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters, the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em."+this.conf.classNames[c].counter,this.$menu),"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); +!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters','the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em",this.$menu),this.conf.classNames[c].counter,"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); })); \ No newline at end of file diff --git a/src/js/umd/addons/jquery.mmenu.dragopen.umd.js b/src/js/umd/addons/jquery.mmenu.dragopen.umd.js index b693fe28..687f6e0f 100644 --- a/src/js/umd/addons/jquery.mmenu.dragopen.umd.js +++ b/src/js/umd/addons/jquery.mmenu.dragopen.umd.js @@ -24,5 +24,5 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),"number"!=typeof t.maxStartPos&&(t.maxStartPos=100),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),x=d.$page;switch(this.opts.offCanvas.zposition){case"back":x=x.add(b);break;case"front":x=this.$menu;break;case"next":x=x.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&x.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),x.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); +!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),$=d.$page;switch(this.opts.offCanvas.zposition){case"back":$=$.add(b);break;case"front":$=this.$menu;break;case"next":$=$.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&$.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),$.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,maxStartPos:100,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); })); \ No newline at end of file diff --git a/src/js/umd/addons/jquery.mmenu.labels.umd.js b/src/js/umd/addons/jquery.mmenu.labels.umd.js index 2096fe82..da1dcefb 100644 --- a/src/js/umd/addons/jquery.mmenu.labels.umd.js +++ b/src/js/umd/addons/jquery.mmenu.labels.umd.js @@ -24,5 +24,5 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li."+this.conf.classNames[d].collapsed,this.$menu),"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); +!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li",this.$menu),this.conf.classNames[d].collapsed,"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); })); \ No newline at end of file diff --git a/src/js/umd/addons/jquery.mmenu.toggles.umd.js b/src/js/umd/addons/jquery.mmenu.toggles.umd.js index b86e5fc9..3eaf4d3a 100644 --- a/src/js/umd/addons/jquery.mmenu.toggles.umd.js +++ b/src/js/umd/addons/jquery.mmenu.toggles.umd.js @@ -24,5 +24,5 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(t){return t}function s(t){return t}function e(){g=!0,o=t[r]._c,i=t[r]._d,a=t[r]._e,o.add("toggle"),l=t[r].glbl}var o,i,a,l,r="mmenu",d="toggles",g=!1;t[r].prototype["_addon_"+d]=function(){g||e(),this.opts[d]=n(this.opts[d]),this.conf[d]=s(this.conf[d]);var i=this;this.opts[d],this.conf[d],this.__refactorClass(t("input."+this.conf.classNames[d].toggle,this.$menu),"toggle"),t("."+o.toggle,this.$menu).each(function(){var n=t(this),s=n.parent(),e=n.attr("id")||i.__getUniqueId();n.attr("id",e),s.prepend(n),t('').insertBefore(s.children().last())})},t[r].addons=t[r].addons||[],t[r].addons.push(d),t[r].defaults[d]={},t[r].configuration.classNames[d]={toggle:"Toggle"}}(jQuery); +!function(t){function n(t){return t}function s(t){return t}function e(){g=!0,o=t[r]._c,i=t[r]._d,a=t[r]._e,o.add("toggle"),l=t[r].glbl}var o,i,a,l,r="mmenu",d="toggles",g=!1;t[r].prototype["_addon_"+d]=function(){g||e(),this.opts[d]=n(this.opts[d]),this.conf[d]=s(this.conf[d]);var i=this;this.opts[d],this.conf[d],this.__refactorClass(t("input",this.$menu),this.conf.classNames[d].toggle,"toggle"),t("."+o.toggle,this.$menu).each(function(){var n=t(this),s=n.parent(),e=n.attr("id")||i.__getUniqueId();n.attr("id",e),s.prepend(n),t('').insertBefore(s.children().last())})},t[r].addons=t[r].addons||[],t[r].addons.push(d),t[r].defaults[d]={},t[r].configuration.classNames[d]={toggle:"Toggle"}}(jQuery); })); \ No newline at end of file diff --git a/src/js/umd/jquery.mmenu.oncanvas.umd.js b/src/js/umd/jquery.mmenu.oncanvas.umd.js index 7d89e5c5..c0ae9e82 100644 --- a/src/js/umd/jquery.mmenu.oncanvas.umd.js +++ b/src/js/umd/jquery.mmenu.oncanvas.umd.js @@ -18,7 +18,7 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -30,5 +30,5 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); })); \ No newline at end of file diff --git a/src/js/umd/jquery.mmenu.umd.all.js b/src/js/umd/jquery.mmenu.umd.all.js index 186e35a5..e62c37f8 100644 --- a/src/js/umd/jquery.mmenu.umd.all.js +++ b/src/js/umd/jquery.mmenu.umd.all.js @@ -18,7 +18,7 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -30,7 +30,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); /* * jQuery mmenu offCanvas addon * mmenu.frebsite.nl @@ -46,7 +46,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters, the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em."+this.conf.classNames[c].counter,this.$menu),"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); +!function(t){function n(n){return"boolean"==typeof n&&(n={add:n,update:n}),"object"!=typeof n&&(n={}),n=t.extend(!0,{},t[r].defaults[c],n),n.count&&(t[r].deprecated('the option "count" for counters','the option "update"'),n.update=n.count),n}function e(t){return t}function o(){d=!0,a=t[r]._c,s=t[r]._d,u=t[r]._e,a.add("counter noresults"),i=t[r].glbl}var a,s,u,i,r="mmenu",c="counters",d=!1;t[r].prototype["_addon_"+c]=function(){d||o(),this.opts[c]=n(this.opts[c]),this.conf[c]=e(this.conf[c]);var u=this,i=this.opts[c];if(this.conf[c],this.__refactorClass(t("em",this.$menu),this.conf.classNames[c].counter,"counter"),i.add&&t("."+a.panel,this.$menu).each(function(){var n=t(this),e=n.data(s.parent);if(e){var o=t(''),u=e.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),i.update){var r=t("em."+a.counter,this.$menu);r.each(function(){var n=t(this),e=t(n.next().attr("href"),u.$menu);if(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length){var o=function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresults);n.html(t.length)};o(),u._update(o)}})}},t[r].addons=t[r].addons||[],t[r].addons.push(c),t[r].defaults[c]={add:!1,update:!1},t[r].configuration.classNames[c]={counter:"Counter"}}(jQuery); /* * jQuery mmenu dragOpen addon * mmenu.frebsite.nl @@ -54,7 +54,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),"number"!=typeof t.maxStartPos&&(t.maxStartPos=100),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),x=d.$page;switch(this.opts.offCanvas.zposition){case"back":x=x.add(b);break;case"front":x=this.$menu;break;case"next":x=x.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&x.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),x.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); +!function(e){function t(t){return"boolean"==typeof t&&(t={open:t}),"object"!=typeof t&&(t={}),t=e.extend(!0,{},e[p].defaults[g],t)}function a(e){return e}function o(){f=!0,s=e[p]._c,i=e[p]._d,r=e[p]._e,s.add("dragging"),r.add("dragleft dragright dragup dragdown dragend"),d=e[p].glbl}function n(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var s,i,r,d,p="mmenu",g="dragOpen",f=!1;e[p].prototype["_addon_"+g]=function(){if(e.fn.hammer){f||o(),this.opts[g]=t(this.opts[g]),this.conf[g]=a(this.conf[g]);var i=this,p=this.opts[g],h=this.conf[g];if(p.open){var c=0,l=!1,u=0,v=0,m="width";switch(this.opts.offCanvas.position){case"left":case"right":m="width";break;default:m="height"}switch(this.opts.offCanvas.position){case"left":var _={events:r.dragleft+" "+r.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var _={events:r.dragleft+" "+r.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var _={events:r.dragup+" "+r.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var _={events:r.dragup+" "+r.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var w=this.__valueOrFn(p.pageNode,this.$menu,d.$page);"string"==typeof w&&(w=e(w));var b=d.$page.find("."+s.mm("fixed-top")+", ."+s.mm("fixed-bottom")),$=d.$page;switch(this.opts.offCanvas.zposition){case"back":$=$.add(b);break;case"front":$=this.$menu;break;case"next":$=$.add(this.$menu).add(b)}w.hammer().on(r.touchstart+" "+r.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[_.page];else if("mousedown"==e.type)var a=e[_.page];switch(i.opts.offCanvas.position){case"right":case"bottom":a>=d.$wndw[m]()-p.maxStartPos&&(c=1);break;default:a<=p.maxStartPos&&(c=1)}}).on(_.events+" "+r.dragend,function(e){c>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(_.events,function(e){var t=_.negative?-e.gesture[_.delta]:e.gesture[_.delta];if(l=t>u?_.open_dir:_.close_dir,u=t,u>p.threshold&&1==c){if(d.$html.hasClass(s.opened))return;c=2,i._openSetup(),i.vars.opened=!0,d.$html.addClass(s.dragging),v=n(d.$wndw[m]()*h[m].perc,h[m].min,h[m].max)}2==c&&$.css(i.opts.offCanvas.position,n(u,10,v)-("front"==i.opts.offCanvas.zposition?v:0))}).on(r.dragend,function(){2==c&&(d.$html.removeClass(s.dragging),$.css(i.opts.offCanvas.position,""),l==_.open_dir?i._openFinish():i.close()),c=0})}}},e[p].addons=e[p].addons||[],e[p].addons.push(g),e[p].defaults[g]={open:!1,maxStartPos:100,threshold:50},e[p].configuration[g]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}}}(jQuery); /* * jQuery mmenu header addon * mmenu.frebsite.nl @@ -70,7 +70,7 @@ * Copyright (c) Fred Heusschen * www.frebsite.nl */ -!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li."+this.conf.classNames[d].collapsed,this.$menu),"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); +!function(l){function s(s){return"boolean"==typeof s&&(s={collapse:s}),"object"!=typeof s&&(s={}),s=l.extend(!0,{},l[p].defaults[d],s)}function e(l){return l}function a(){i=!0,o=l[p]._c,n=l[p]._d,t=l[p]._e,o.add("collapsed"),c=l[p].glbl}var o,n,t,c,p="mmenu",d="labels",i=!1;l[p].prototype["_addon_"+d]=function(){i||a(),this.opts[d]=s(this.opts[d]),this.conf[d]=e(this.conf[d]);var n=this.opts[d];this.conf[d],n.collapse&&(this.__refactorClass(l("li",this.$menu),this.conf.classNames[d].collapsed,"collapsed"),l("."+o.label,this.$menu).each(function(){var s=l(this),e=s.nextUntil("."+o.label,"all"==n.collapse?null:"."+o.collapsed);"all"==n.collapse&&(s.addClass(o.opened),e.removeClass(o.collapsed)),e.length&&(s.wrapInner(""),l('').prependTo(s).on(t.click,function(l){l.preventDefault(),s.toggleClass(o.opened),e[s.hasClass(o.opened)?"removeClass":"addClass"](o.collapsed)}))}))},l[p].addons=l[p].addons||[],l[p].addons.push(d),l[p].defaults[d]={collapse:!1},l[p].configuration.classNames[d]={collapsed:"Collapsed"}}(jQuery); /* * jQuery mmenu searchfield addon * mmenu.frebsite.nl diff --git a/src/js/umd/jquery.mmenu.umd.js b/src/js/umd/jquery.mmenu.umd.js index a469e773..50436e37 100644 --- a/src/js/umd/jquery.mmenu.umd.js +++ b/src/js/umd/jquery.mmenu.umd.js @@ -18,7 +18,7 @@ /* - * jQuery mmenu v4.3.0 + * jQuery mmenu v4.3.1 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl @@ -30,7 +30,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ -!function(e){function n(n,s,t){if(t){if("object"!=typeof n&&(n={}),"boolean"!=typeof n.isMenu){var i=t.children();n.isMenu=1==i.length&&i.is(s.panelNodetype)}return n}n=e.extend(!0,{},e[a].defaults,n),("top"==n.position||"bottom"==n.position)&&("back"==n.zposition||"next"==n.zposition)&&(e[a].deprecated('Using position "'+n.position+'" in combination with zposition "'+n.zposition+'"','zposition "front"'),n.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof n[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),n.offCanvas=n.offCanvas||{},n.offCanvas[o[l]]=n[o[l]]);return n}function s(n){n=e.extend(!0,{},e[a].configuration,n);for(var s=["panel","list","selected","label","spacer"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]+"Class"]&&(e[a].deprecated('The configuration option "'+s[t]+'Class"',"classNames."+s[t]),n.classNames[s[t]]=n[s[t]+"Class"]);if("undefined"!=typeof n.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),n.classNames.counters=n.classNames.counters||{},n.classNames.counters.counter=n.counterClass),"undefined"!=typeof n.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),n.classNames.labels=n.classNames.labels||{},n.classNames.labels.collapsed=n.collapsedClass),"undefined"!=typeof n.header)for(var s=["panelHeader","panelNext","panelPrev"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n.header[s[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+s[t]+'Class"',"classNames.header."+s[t]),n.classNames.header=n.classNames.header||{},n.classNames.header[s[t]]=n.header[s[t]+"Class"]);for(var s=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=s.length;i>t;t++)"undefined"!=typeof n[s[t]]&&(e[a].deprecated('The configuration option "'+s[t]+'"',"offCanvas."+s[t]),n.offCanvas=n.offCanvas||{},n.offCanvas[s[t]]=n[s[t]]);return n}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,n){n.add=function(e){e=e.split(" ");for(var s in e)n[e[s]]=n.mm(e[s])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(n,s){if(n.hasClass(l.current))return!1;var t=e("."+l.panel,s),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(n).not(i).addClass(l.hidden),n.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(n.addClass(l.highest),i.addClass(l.subopened)),n.removeClass(l.hidden).addClass(l.current),setTimeout(function(){n.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.0";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,n,s){return this.$menu=e,this.opts=n,this.conf=s,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=n(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var s=0;s li",this.$menu);this.__refactorClass(s.filter("."+this.conf.classNames.selected),"selected"),this.__refactorClass(s.filter("."+this.conf.classNames.label),"label"),this.__refactorClass(s.filter("."+this.conf.classNames.spacer),"spacer"),s.off(r.setSelected).on(r.setSelected,function(n,t){n.stopPropagation(),s.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var s=e(this),t=s.attr("id")||n.__getUniqueId();s.attr("id",t)}),t.find("."+l.panel).each(function(){var s=e(this),t=s.is("ul, ol")?s:s.find("ul ,ol").first(),i=s.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(s.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),n.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var s=e(this),t=s.attr("id");e('a[href="#'+t+'"]',n.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),s.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var n=e(this),s=n.find("> ."+l.panel);s.length&&(n.parents("."+l.panel).addClass(l.subopened),s.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var n=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(s){var t=e(this),i=t.attr("href");n.__valueOrFn(n.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=n.__valueOrFn(n.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),n.__valueOrFn(n.opts.onClick.close,t,a)&&n.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,s=this.updates.length;s>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,s){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof s?s:e},__refactorClass:function(e,n){e.removeClass(this.conf[n+"Class"]).addClass(l[n])},__transitionend:function(e,n,s){var t=!1,i=function(){t||n.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*s)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=n(i,o),o=s(o),this.each(function(){var n=e(this);n.data(a)||n.data(a,new e[a](n,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var n=window.document,s=window.navigator.userAgent,t="ontouchstart"in n,i="WebkitOverflowScrolling"in n.documentElement.style,o=function(){return s.indexOf("Android")>=0?2.4>parseFloat(s.slice(s.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,n){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+n+" instead.")}}}(jQuery); +!function(e){function s(s,n,t){if(t){if("object"!=typeof s&&(s={}),"boolean"!=typeof s.isMenu){var i=t.children();s.isMenu=1==i.length&&i.is(n.panelNodetype)}return s}s=e.extend(!0,{},e[a].defaults,s),("top"==s.position||"bottom"==s.position)&&("back"==s.zposition||"next"==s.zposition)&&(e[a].deprecated('Using position "'+s.position+'" in combination with zposition "'+s.zposition+'"','zposition "front"'),s.zposition="front");for(var o=["position","zposition","modal","moveBackground"],l=0,d=o.length;d>l;l++)"undefined"!=typeof s[o[l]]&&(e[a].deprecated('The option "'+o[l]+'"',"offCanvas."+o[l]),s.offCanvas=s.offCanvas||{},s.offCanvas[o[l]]=s[o[l]]);return s}function n(s){s=e.extend(!0,{},e[a].configuration,s);for(var n=["panel","list","selected","label","spacer"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]+"Class"]&&(e[a].deprecated('The configuration option "'+n[t]+'Class"',"classNames."+n[t]),s.classNames[n[t]]=s[n[t]+"Class"]);if("undefined"!=typeof s.counterClass&&(e[a].deprecated('The configuration option "counterClass"',"classNames.counters.counter"),s.classNames.counters=s.classNames.counters||{},s.classNames.counters.counter=s.counterClass),"undefined"!=typeof s.collapsedClass&&(e[a].deprecated('The configuration option "collapsedClass"',"classNames.labels.collapsed"),s.classNames.labels=s.classNames.labels||{},s.classNames.labels.collapsed=s.collapsedClass),"undefined"!=typeof s.header)for(var n=["panelHeader","panelNext","panelPrev"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s.header[n[t]+"Class"]&&(e[a].deprecated('The configuration option "header.'+n[t]+'Class"',"classNames.header."+n[t]),s.classNames.header=s.classNames.header||{},s.classNames.header[n[t]]=s.header[n[t]+"Class"]);for(var n=["pageNodetype","pageSelector","menuWrapperSelector","menuInjectMethod"],t=0,i=n.length;i>t;t++)"undefined"!=typeof s[n[t]]&&(e[a].deprecated('The configuration option "'+n[t]+'"',"offCanvas."+n[t]),s.offCanvas=s.offCanvas||{},s.offCanvas[n[t]]=s[n[t]]);return s}function t(){u=!0,c.$wndw=e(window),c.$html=e("html"),c.$body=e("body"),e.each([l,d,r],function(e,s){s.add=function(e){e=e.split(" ");for(var n in e)s[e[n]]=s.mm(e[n])}}),l.mm=function(e){return"mm-"+e},l.add("wrapper menu ismenu inline panel list subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),l.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},d.mm=function(e){return"mm-"+e},d.add("parent"),r.mm=function(e){return e+".mm"},r.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[a]._c=l,e[a]._d=d,e[a]._e=r,e[a].glbl=c}function i(s,n){if(s.hasClass(l.current))return!1;var t=e("."+l.panel,n),i=t.filter("."+l.current);return t.removeClass(l.highest).removeClass(l.current).not(s).not(i).addClass(l.hidden),s.hasClass(l.opened)?i.addClass(l.highest).removeClass(l.opened).removeClass(l.subopened):(s.addClass(l.highest),i.addClass(l.subopened)),s.removeClass(l.hidden).addClass(l.current),setTimeout(function(){s.removeClass(l.subopened).addClass(l.opened)},25),"open"}var a="mmenu",o="4.3.1";if(!e[a]){var l={},d={},r={},u=!1,c={$wndw:null,$html:null,$body:null};e[a]=function(e,s,n){return this.$menu=e,this.opts=s,this.conf=n,this.vars={},this._init(),this},e[a].uniqueId=0,e[a].prototype={_init:function(){if(this.opts=s(this.opts,this.conf,this.$menu),this._initMenu(),this._initPanels(),this._initLinks(),this._bindCustomEvents(),e[a].addons)for(var n=0;n li",this.$menu);this.__refactorClass(n,this.conf.classNames.selected,"selected"),this.__refactorClass(n,this.conf.classNames.label,"label"),this.__refactorClass(n,this.conf.classNames.spacer,"spacer"),n.off(r.setSelected).on(r.setSelected,function(s,t){s.stopPropagation(),n.removeClass(l.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(l.selected)}),this.__refactorClass(e("."+this.conf.classNames.panel,this.$menu),this.conf.classNames.panel,"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+l.list).children().children().filter(this.conf.panelNodetype)).addClass(l.panel);var t=e("."+l.panel,this.$menu);t.each(function(){var n=e(this),t=n.attr("id")||s.__getUniqueId();n.attr("id",t)}),t.find("."+l.panel).each(function(){var n=e(this),t=n.is("ul, ol")?n:n.find("ul ,ol").first(),i=n.parent(),a=i.find("> a, > span"),o=i.closest("."+l.panel);if(n.data(d.parent,i),i.parent().is("."+l.list)){var r=e('').insertBefore(a);a.is("a")||r.addClass(l.fullsubopen),s.opts.slidingSubmenus&&t.prepend('
  • '+a.text()+"
  • ")}});var i=this.opts.slidingSubmenus?r.open:r.toggle;if(t.each(function(){var n=e(this),t=n.attr("id");e('a[href="#'+t+'"]',s.$menu).off(r.click).on(r.click,function(e){e.preventDefault(),n.trigger(i)})}),this.opts.slidingSubmenus){var a=e("."+l.list+" > li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).each(function(){var s=e(this),n=s.find("> ."+l.panel);n.length&&(s.parents("."+l.panel).addClass(l.subopened),n.addClass(l.opened))}).closest("."+l.panel).addClass(l.opened).parents("."+l.panel).addClass(l.subopened)}else{var a=e("li."+l.selected,this.$menu);a.parents("li").removeClass(l.selected).end().add(a.parents("li")).addClass(l.opened)}var o=t.filter("."+l.opened);o.length||(o=t.first()),o.addClass(l.opened).last().addClass(l.current),this.opts.slidingSubmenus&&t.not(o.last()).addClass(l.hidden).end().find("."+l.panel).appendTo(this.$menu)},_initLinks:function(){var s=this;e("."+l.list+" > li > a",this.$menu).not("."+l.subopen).not("."+l.subclose).not('[rel="external"]').not('[target="_blank"]').off(r.click).on(r.click,function(n){var t=e(this),i=t.attr("href");s.__valueOrFn(s.opts.onClick.setSelected,t)&&t.parent().trigger(r.setSelected);var a=s.__valueOrFn(s.opts.onClick.preventDefault,t,"#"==i.slice(0,1));a&&n.preventDefault(),s.__valueOrFn(s.opts.onClick.blockUI,t,!a)&&c.$html.addClass(l.blocking),s.__valueOrFn(s.opts.onClick.close,t,a)&&s.$menu.triggerHandler(r.close)})},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var s=0,n=this.updates.length;n>s;s++)this.updates[s].call(this,e)},__valueOrFn:function(e,s,n){return"function"==typeof e?e.call(s[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,s,n){e.filter("."+s).removeClass(s).addClass(l[n])},__transitionend:function(e,s,n){var t=!1,i=function(){t||s.call(e[0]),t=!0};e.one(r.transitionend,i),e.one(r.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return l.mm(e[a].uniqueId++)}},e.fn[a]=function(i,o){return u||t(),i=s(i,o),o=n(o),this.each(function(){var s=e(this);s.data(a)||s.data(a,new e[a](s,i,o))})},e[a].version=o,e[a].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[a].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,classNames:{panel:"Panle",list:"List",selected:"Selected",label:"Label",spacer:"Spacer"}},function(){var s=window.document,n=window.navigator.userAgent,t="ontouchstart"in s,i="WebkitOverflowScrolling"in s.documentElement.style,o=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:t,oldAndroidBrowser:o,overflowscrolling:function(){return t?i?!0:o?!1:!0:!0}()}}(),e[a].debug=function(){},e[a].deprecated=function(e,s){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+s+" instead.")}}}(jQuery); /* * jQuery mmenu offCanvas addon * mmenu.frebsite.nl