mirror of
https://github.com/moexe/FFFGateway-Monitoring.git
synced 2024-11-25 07:03:41 +01:00
2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
|
/*! jQuery Responsive Menu 2015-06-14 version: 0.2.1 */
|
||
|
!function(a,b,c,d,e){"use strict";var f="rMenu",g=function(c,d){var e=this;e.optionsInit={minWidth:"769px",transitionSpeed:400,jqueryEasing:"swing",css3Easing:"ease",toggleBtnBool:!0,toggleSel:".rm-toggle",menuSel:"ul",menuItemsSel:"li",animateBool:!0,accelerateBool:!1,setupCallback:!1,tabindexStart:1,developmentMode:!1},e.options=a.extend({},e.optionsInit,d),e.tButton=a(e.options.toggleSel),e.tButtonClass="rm-button",e.tButtonShowClass="rm-show",e.tButtonActiveClass="rm-active",e.el=a(c),e.navElementClass="rm-nav",e.container=e.el.parent(),e.containerClass="rm-container",e.expandedClass="rm-layout-expanded",e.contractedClass="rm-layout-contracted",e.noJSClass="rm-nojs",e.menus=e.el.find(e.options.menuSel),e.menuClass="rm-menu",e.topMenu=e.el.children(e.options.menuSel),e.topMenuClass="rm-top-menu",e.menuExpandedClass="rm-menu-expanded",e.menuHiddenClass="accessibly-hidden",e.menuCalcClass="rm-calculate",e.menuItemClass="rm-menu-item",e.itemFocused=!1,e.parentClass="rm-parent",e.itemHoverClass="rm-hover",e.itemFirst="rm-first",e.itemLast="rm-last",e.item2ndLast="rm-2nd-last",e.animateClass="rm-css-animate",e.animateBool=e.options.animateBool,e.accelerateClass="rm-accelerate",e.accelerateBool=e.options.accelerateBool,e.touchMoveBool=!1,e.timer=!1,e.windowWidth=a(b).width(),e.init=function(){return e.setup(),a(b).on({resize:function(){a(b).width()!==e.windowWidth&&(e.windowWidth=a(b).width(),clearTimeout(e.timer),e.timer=setTimeout(e.adjust,500))}}),"function"==typeof e.options.setupCallback&&e.options.setupCallback(),this},e.setup=function(){return e.container.addClass(e.containerClass),e.options.toggleBtnBool?e.tButton.addClass(e.tButtonClass):e.tButton.removeClass(e.tButtonClass),e.tButton.removeClass(e.noJSClass).off("mousedown.rm focusin.rm click.rm").on("mousedown.rm focusin.rm",f).on("click.rm",g).attr("tabindex",0),e.menus.addClass(e.menuClass).attr("aria-hidden","false").hide(),e.topMenu.addClass(e.topMenuClass),e.animateBool?"undefined"!=typeof Modernizr?Modernizr.csstransitions?Modernizr.csstransforms3d||(e.accelerateBool=!1):(e.animateBool=!1,e.accelerateBool=!1):i()?h()||(e.accelerateBool=!1):(e.animateBool=!1,e.accelerateBool=!1):e.accelerateBool=!1,e.animateBool&&(e.menus.addClass(e.animateClass),e.accelerateBool&&e.menus.addClass(e.accelerateClass)),e.el.removeClass(e.noJSClass).addClass(e.navElementClass).off("focusin.rm focusout.rm click.rm touchend.rm touchmove.rm").on("focusin.rm",e.options.menuItemsSel,l).on("focusout.rm",e.topMenu,n).on("click.rm touchend.rm",e.options.menuItemsSel,k).on("touchmove.rm",e.options.menuItemsSel,m).find(e.options.menuItemsSel).each(function(){var b=a(this);b.addClass(e.menuItemClass).children("a").attr("tabindex",0),b.is(":first-child")&&b.addClass(e.itemFirst),b.is(":last-child")&&b.addClass(e.itemLast).prev().addClass(e.item2ndLast)}).addBack().removeClass(e.parentClass).has(e.options.menuSel).addClass(e.parentClass),e.adjust(),this},e.adjust=function(c){c="undefined"!=typeof c?c:e.options.minWidth,"undefined"!=typeof Modernizr&&Modernizr.mq("only all")?(e.options.developmentMode&&console.log("Modernizr: MQ supported"),Modernizr.mq("( min-width: "+c+" )")?e.layoutExpanded():e.layoutContracted()):(e.options.developmentMode&&console.log("unable to detect MQ support"),a(b).outerWidth()<parseInt(c)?e.layoutContracted():e.layoutExpanded())},e.layoutContracted=function(){return e.container.hasClass(e.contractedClass)||(n({type:"layoutContracted"}),e.container.removeClass(e.expandedClass).addClass(e.contractedClass).find("."+e.itemHoverClass).removeClass(e.itemHoverClass),e.animateBool&&e.calculateHeights(),e.el.off("mouseenter.le mouseleave.le"),e.tButton.addClass(e.tButtonShowClass),e.tButton.hasClass(e.tButtonActiveClass)?(e.topMenu.removeClass(e.menuHiddenClass).show().addClass(e.menuExpandedClass),e.animateBool&&e.topMenu.css({"max-height":"none"})):e.topMenu.addClass(e.menuHiddenClass).show().removeClass(e.menuExpandedClass)),e.options.developmentMode&&console.log("responsive-menu: contracted layout"),this},e.layoutExpanded=function(){return e.container.hasClass(e.expan
|