OwlCyberSecurity - MANAGER
Edit File: jquery.mmenu.offcanvas.min.js
/* * jQuery mmenu offCanvas add-on * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ !function(t){var e="mmenu",o="offCanvas";t[e].addons[o]={setup:function(){if(this.opts[o]){var i=this,s=this.opts[o],r=this.conf[o];a=t[e].glbl,this._api=t.merge(this._api,["open","close","setPage"]),"object"!=typeof s&&(s={}),"top"!=s.position&&"bottom"!=s.position||(s.zposition="front"),s=this.opts[o]=t.extend(!0,{},t[e].defaults[o],s),"string"!=typeof r.pageSelector&&(r.pageSelector="> "+r.pageNodetype),a.$allMenus=(a.$allMenus||t()).add(this.$menu),this.vars.opened=!1;var p=[n.offcanvas];"left"!=s.position&&p.push(n.mm(s.position)),"back"!=s.zposition&&p.push(n.mm(s.zposition)),t[e].support.csstransforms||p.push(n["no-csstransforms"]),t[e].support.csstransforms3d||p.push(n["no-csstransforms3d"]),this.bind("initMenu:after",function(){this.setPage(a.$page),this._initBlocker(),this["_initWindow_"+o](),this.$menu.addClass(p.join(" ")).parent("."+n.wrapper).removeClass(n.wrapper),this.$menu[r.menuInsertMethod](r.menuInsertSelector);var t=window.location.hash;if(t){var e=this._getOriginalMenuId();e&&e==t.slice(1)&&this.open()}}),this.bind("initExtensions:after",function(){for(var t=[n.mm("widescreen"),n.mm("iconbar")],e=0;e<t.length;e++)for(var o in this.opts.extensions)if(this.opts.extensions[o].indexOf(t[e])>-1){!function(e,o){i.matchMedia(e,function(){a.$html.addClass(t[o])},function(){a.$html.removeClass(t[o])})}(o,e);break}}),this.bind("open:start:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!1)}),this.bind("close:finish:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initMenu:after:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)})}},add:function(){n=t[e]._c,i=t[e]._d,s=t[e]._e,n.add("offcanvas slideout blocking modal background opening blocker page no-csstransforms3d"),i.add("style")},clickAnchor:function(t,e){var i=this;if(this.opts[o]){var s=this._getOriginalMenuId();if(s&&t.is('[href="#'+s+'"]')){if(e)return!0;var r=t.closest("."+n.menu);if(r.length){var p=r.data("mmenu");if(p&&p.close)return p.close(),i.__transitionend(r,function(){i.open()},i.conf.transitionDuration),!0}return this.open(),!0}if(a.$page)return s=a.$page.first().attr("id"),s&&t.is('[href="#'+s+'"]')?(this.close(),!0):void 0}}},t[e].defaults[o]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},t[e].configuration[o]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuInsertMethod:"prependTo",menuInsertSelector:"body"},t[e].prototype.open=function(){if(this.trigger("open:before"),!this.vars.opened){var t=this;this._openSetup(),setTimeout(function(){t._openFinish()},this.conf.openingInterval),this.trigger("open:after")}},t[e].prototype._openSetup=function(){var e=this,r=this.opts[o];this.closeAllOthers(),a.$page.each(function(){t(this).data(i.style,t(this).attr("style")||"")}),a.$wndw.trigger(s.resize+"-"+o,[!0]);var p=[n.opened];r.blockUI&&p.push(n.blocking),"modal"==r.blockUI&&p.push(n.modal),r.moveBackground&&p.push(n.background),"left"!=r.position&&p.push(n.mm(this.opts[o].position)),"back"!=r.zposition&&p.push(n.mm(this.opts[o].zposition)),a.$html.addClass(p.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(n.opened)},t[e].prototype._openFinish=function(){var t=this;this.__transitionend(a.$page.first(),function(){t.trigger("open:finish")},this.conf.transitionDuration),this.trigger("open:start"),a.$html.addClass(n.opening)},t[e].prototype.close=function(){if(this.trigger("close:before"),this.vars.opened){var e=this;this.__transitionend(a.$page.first(),function(){e.$menu.removeClass(n.opened);var s=[n.opened,n.blocking,n.modal,n.background,n.mm(e.opts[o].position),n.mm(e.opts[o].zposition)];a.$html.removeClass(s.join(" ")),a.$page.each(function(){t(this).attr("style",t(this).data(i.style))}),e.vars.opened=!1,e.trigger("close:finish")},this.conf.transitionDuration),this.trigger("close:start"),a.$html.removeClass(n.opening),this.trigger("close:after")}},t[e].prototype.closeAllOthers=function(){a.$allMenus.not(this.$menu).each(function(){var o=t(this).data(e);o&&o.close&&o.close()})},t[e].prototype.setPage=function(e){this.trigger("setPage:before",e);var i=this,s=this.conf[o];e&&e.length||(e=a.$body.find(s.pageSelector),s.noPageSelector.length&&(e=e.not(s.noPageSelector.join(", "))),e.length>1&&s.wrapPageIfNeeded&&(e=e.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),e.each(function(){t(this).attr("id",t(this).attr("id")||i.__getUniqueId())}),e.addClass(n.page+" "+n.slideout),a.$page=e,this.trigger("setPage:after",e)},t[e].prototype["_initWindow_"+o]=function(){a.$wndw.off(s.keydown+"-"+o).on(s.keydown+"-"+o,function(t){if(a.$html.hasClass(n.opened)&&9==t.keyCode)return t.preventDefault(),!1});var t=0;a.$wndw.off(s.resize+"-"+o).on(s.resize+"-"+o,function(e,o){if(1==a.$page.length&&(o||a.$html.hasClass(n.opened))){var i=a.$wndw.height();(o||i!=t)&&(t=i,a.$page.css("minHeight",i))}})},t[e].prototype._initBlocker=function(){var e=this;this.opts[o].blockUI&&(a.$blck||(a.$blck=t('<div id="'+n.blocker+'" class="'+n.slideout+'" />')),a.$blck.appendTo(a.$body).off(s.touchstart+"-"+o+" "+s.touchmove+"-"+o).on(s.touchstart+"-"+o+" "+s.touchmove+"-"+o,function(t){t.preventDefault(),t.stopPropagation(),a.$blck.trigger(s.mousedown+"-"+o)}).off(s.mousedown+"-"+o).on(s.mousedown+"-"+o,function(t){t.preventDefault(),a.$html.hasClass(n.modal)||(e.closeAllOthers(),e.close())}))};var n,i,s,a}(jQuery);