From b092179787b1a9edfcefa05566aee04a0eb1e63a Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Sat, 15 Apr 2017 14:57:18 +0200 Subject: [PATCH] doc: utilize smartmenus --- doc/doxygen/footer.html | 2 + doc/doxygen/header.html | 5 +- doc/doxygen/riot.doxyfile | 4 + .../src/css/jquery.smartmenus.bootstrap.css | 122 ++++++++++++++++++ doc/doxygen/src/css/riot.css | 8 +- doc/doxygen/src/css/riot.less | 2 +- .../src/js/jquery.smartmenus.bootstrap.min.js | 3 + doc/doxygen/src/js/jquery.smartmenus.min.js | 3 + doc/doxygen/src/js/menu.js | 45 +++++++ doc/doxygen/src/js/riot-doxy.js | 57 ++++---- 10 files changed, 220 insertions(+), 31 deletions(-) create mode 100644 doc/doxygen/src/css/jquery.smartmenus.bootstrap.css create mode 100644 doc/doxygen/src/js/jquery.smartmenus.bootstrap.min.js create mode 100644 doc/doxygen/src/js/jquery.smartmenus.min.js create mode 100644 doc/doxygen/src/js/menu.js diff --git a/doc/doxygen/footer.html b/doc/doxygen/footer.html index 9857a877e8..a5936cea19 100644 --- a/doc/doxygen/footer.html +++ b/doc/doxygen/footer.html @@ -6,6 +6,8 @@ + + diff --git a/doc/doxygen/header.html b/doc/doxygen/header.html index 7cdfd902c1..becbd99ca3 100644 --- a/doc/doxygen/header.html +++ b/doc/doxygen/header.html @@ -21,6 +21,7 @@ + @@ -49,7 +50,8 @@ diff --git a/doc/doxygen/riot.doxyfile b/doc/doxygen/riot.doxyfile index 3d4bab066d..677db136d0 100644 --- a/doc/doxygen/riot.doxyfile +++ b/doc/doxygen/riot.doxyfile @@ -1121,6 +1121,7 @@ HTML_EXTRA_STYLESHEET = src/css/riot.css HTML_EXTRA_FILES = src/css/bootstrap.min.css \ src/css/fonts.css \ + src/css/jquery.smartmenus.bootstrap.css \ src/css/riot.css \ src/favicon.png \ src/fonts/glyphicons-halflings-regular.eot \ @@ -1136,7 +1137,10 @@ HTML_EXTRA_FILES = src/css/bootstrap.min.css \ src/js/doxy-jquery.js \ src/js/jquery.min.js \ src/js/jquery.powertip.min.js \ + src/js/jquery.smartmenus.min.js \ + src/js/jquery.smartmenus.bootstrap.min.js \ src/js/jquery-ui.min.js \ + src/js/menu.js \ src/js/riot-doxy.js # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen diff --git a/doc/doxygen/src/css/jquery.smartmenus.bootstrap.css b/doc/doxygen/src/css/jquery.smartmenus.bootstrap.css new file mode 100644 index 0000000000..19797eb211 --- /dev/null +++ b/doc/doxygen/src/css/jquery.smartmenus.bootstrap.css @@ -0,0 +1,122 @@ +/* + You probably do not need to edit this at all. + + Add some SmartMenus required styles not covered in Bootstrap 3's default CSS. + These are theme independent and should work with any Bootstrap 3 theme mod. +*/ +/* sub menus arrows on desktop */ +.navbar-nav:not(.sm-collapsible) ul .caret { + position: absolute; + right: 0; + margin-top: 6px; + margin-right: 15px; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px dashed; +} +.navbar-nav:not(.sm-collapsible) ul a.has-submenu { + padding-right: 30px; +} +/* make sub menu arrows look like +/- buttons in collapsible mode */ +.navbar-nav.sm-collapsible .caret, .navbar-nav.sm-collapsible ul .caret { + position: absolute; + right: 0; + margin: -3px 15px 0 0; + padding: 0; + width: 32px; + height: 26px; + line-height: 24px; + text-align: center; + border-width: 1px; + border-style: solid; +} +.navbar-nav.sm-collapsible .caret:before { + content: '+'; + font-family: monospace; + font-weight: bold; +} +.navbar-nav.sm-collapsible .open > a > .caret:before { + content: '-'; +} +.navbar-nav.sm-collapsible a.has-submenu { + padding-right: 50px; +} +/* revert to Bootstrap's default carets in collapsible mode when the "data-sm-skip-collapsible-behavior" attribute is set to the ul.navbar-nav */ +.navbar-nav.sm-collapsible[data-sm-skip-collapsible-behavior] .caret, .navbar-nav.sm-collapsible[data-sm-skip-collapsible-behavior] ul .caret { + position: static; + margin: 0 0 0 2px; + padding: 0; + width: 0; + height: 0; + border-top: 4px dashed; + border-right: 4px solid transparent; + border-bottom: 0; + border-left: 4px solid transparent; +} +.navbar-nav.sm-collapsible[data-sm-skip-collapsible-behavior] .caret:before { + content: '' !important; +} +.navbar-nav.sm-collapsible[data-sm-skip-collapsible-behavior] a.has-submenu { + padding-right: 15px; +} +/* scrolling arrows for tall menus */ +.navbar-nav span.scroll-up, .navbar-nav span.scroll-down { + position: absolute; + display: none; + visibility: hidden; + height: 20px; + overflow: hidden; + text-align: center; +} +.navbar-nav span.scroll-up-arrow, .navbar-nav span.scroll-down-arrow { + position: absolute; + top: -2px; + left: 50%; + margin-left: -8px; + width: 0; + height: 0; + overflow: hidden; + border-top: 7px dashed transparent; + border-right: 7px dashed transparent; + border-bottom: 7px solid; + border-left: 7px dashed transparent; +} +.navbar-nav span.scroll-down-arrow { + top: 6px; + border-top: 7px solid; + border-right: 7px dashed transparent; + border-bottom: 7px dashed transparent; + border-left: 7px dashed transparent; +} +/* add more indentation for 2+ level sub in collapsible mode - Bootstrap normally supports just 1 level sub menus */ +.navbar-nav.sm-collapsible ul .dropdown-menu > li > a, +.navbar-nav.sm-collapsible ul .dropdown-menu .dropdown-header { + padding-left: 35px; +} +.navbar-nav.sm-collapsible ul ul .dropdown-menu > li > a, +.navbar-nav.sm-collapsible ul ul .dropdown-menu .dropdown-header { + padding-left: 45px; +} +.navbar-nav.sm-collapsible ul ul ul .dropdown-menu > li > a, +.navbar-nav.sm-collapsible ul ul ul .dropdown-menu .dropdown-header { + padding-left: 55px; +} +.navbar-nav.sm-collapsible ul ul ul ul .dropdown-menu > li > a, +.navbar-nav.sm-collapsible ul ul ul ul .dropdown-menu .dropdown-header { + padding-left: 65px; +} +/* fix SmartMenus sub menus auto width (subMenusMinWidth and subMenusMaxWidth options) */ +.navbar-nav .dropdown-menu > li > a { + white-space: normal; +} +.navbar-nav ul.sm-nowrap > li > a { + white-space: nowrap; +} +.navbar-nav.sm-collapsible ul.sm-nowrap > li > a { + white-space: normal; +} +/* fix .navbar-right subs alignment */ +.navbar-right ul.dropdown-menu { + left: 0; + right: auto; +} diff --git a/doc/doxygen/src/css/riot.css b/doc/doxygen/src/css/riot.css index d6aa02d223..38feb4860d 100644 --- a/doc/doxygen/src/css/riot.css +++ b/doc/doxygen/src/css/riot.css @@ -48,6 +48,9 @@ dl { font-size: 14px; z-index: 3; } +#FSearchBox #MSearchField { + margin-left: auto; +} #MSearchField { background: #000000; border: #eeeeee solid 1px; @@ -89,7 +92,8 @@ a.SelectItem:active { #nav-tree { background: #f5f5f5; } -#nav-tree img { +#nav-tree img, +#nav-tree span { -webkit-box-sizing: content-box; box-sizing: content-box; } @@ -202,7 +206,7 @@ div.line.glow { } span.lineno { background-color: transparent; - border-right: 3px solid #e3e3e3; + border-right: 2px solid #e3e3e3; } span.lineno a { background-color: transparent; diff --git a/doc/doxygen/src/css/riot.less b/doc/doxygen/src/css/riot.less index 27e037c591..f7ee50e03c 100644 --- a/doc/doxygen/src/css/riot.less +++ b/doc/doxygen/src/css/riot.less @@ -91,7 +91,7 @@ a.SelectItem:active { #nav-tree { background: @well-bg; } -#nav-tree img { +#nav-tree img, #nav-tree span { -webkit-box-sizing: content-box; box-sizing: content-box; } diff --git a/doc/doxygen/src/js/jquery.smartmenus.bootstrap.min.js b/doc/doxygen/src/js/jquery.smartmenus.bootstrap.min.js new file mode 100644 index 0000000000..fb4d01eb6a --- /dev/null +++ b/doc/doxygen/src/js/jquery.smartmenus.bootstrap.min.js @@ -0,0 +1,3 @@ +/*! SmartMenus jQuery Plugin Bootstrap Addon - v0.3.1 - November 1, 2016 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery","jquery.smartmenus"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function(t){return t.extend(t.SmartMenus.Bootstrap={},{keydownFix:!1,init:function(){var e=t("ul.navbar-nav:not([data-sm-skip])");e.each(function(){function e(){o.find("a.current").parent().addClass("active"),o.find("a.has-submenu").each(function(){var e=t(this);e.is('[data-toggle="dropdown"]')&&e.dataSM("bs-data-toggle-dropdown",!0).removeAttr("data-toggle"),e.is('[role="button"]')&&e.dataSM("bs-role-button",!0).removeAttr("role")})}function s(){o.find("a.current").parent().removeClass("active"),o.find("a.has-submenu").each(function(){var e=t(this);e.dataSM("bs-data-toggle-dropdown")&&e.attr("data-toggle","dropdown").removeDataSM("bs-data-toggle-dropdown"),e.dataSM("bs-role-button")&&e.attr("role","button").removeDataSM("bs-role-button")})}function i(t){var e=a.getViewportWidth();if(e!=n||t){var s=o.find(".caret");a.isCollapsible()?(o.addClass("sm-collapsible"),o.is("[data-sm-skip-collapsible-behavior]")||s.addClass("navbar-toggle sub-arrow")):(o.removeClass("sm-collapsible"),o.is("[data-sm-skip-collapsible-behavior]")||s.removeClass("navbar-toggle sub-arrow")),n=e}}var o=t(this),a=o.data("smartmenus");if(!a){o.smartmenus({subMenusSubOffsetX:2,subMenusSubOffsetY:-6,subIndicators:!1,collapsibleShowFunction:null,collapsibleHideFunction:null,rightToLeftSubMenus:o.hasClass("navbar-right"),bottomToTopSubMenus:o.closest(".navbar").hasClass("navbar-fixed-bottom")}).bind({"show.smapi":function(e,s){var i=t(s),o=i.dataSM("scroll-arrows");o&&o.css("background-color",t(document.body).css("background-color")),i.parent().addClass("open")},"hide.smapi":function(e,s){t(s).parent().removeClass("open")}}),e(),a=o.data("smartmenus"),a.isCollapsible=function(){return!/^(left|right)$/.test(this.$firstLink.parent().css("float"))},a.refresh=function(){t.SmartMenus.prototype.refresh.call(this),e(),i(!0)},a.destroy=function(e){s(),t.SmartMenus.prototype.destroy.call(this,e)},o.is("[data-sm-skip-collapsible-behavior]")&&o.bind({"click.smapi":function(e,s){if(a.isCollapsible()){var i=t(s),o=i.parent().dataSM("sub");if(o&&o.dataSM("shown-before")&&o.is(":visible"))return a.itemActivate(i),a.menuHide(o),!1}}});var n;i(),t(window).bind("resize.smartmenus"+a.rootId,i)}}),e.length&&!t.SmartMenus.Bootstrap.keydownFix&&(t(document).off("keydown.bs.dropdown.data-api",".dropdown-menu"),t.fn.dropdown&&t.fn.dropdown.Constructor&&t(document).on("keydown.bs.dropdown.data-api",'.dropdown-menu:not([id^="sm-"])',t.fn.dropdown.Constructor.prototype.keydown),t.SmartMenus.Bootstrap.keydownFix=!0)}}),t(t.SmartMenus.Bootstrap.init),t}); diff --git a/doc/doxygen/src/js/jquery.smartmenus.min.js b/doc/doxygen/src/js/jquery.smartmenus.min.js new file mode 100644 index 0000000000..822bbef24b --- /dev/null +++ b/doc/doxygen/src/js/jquery.smartmenus.min.js @@ -0,0 +1,3 @@ +/*! SmartMenus jQuery Plugin - v1.0.1 - November 1, 2016 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).unbind(e),mouseDetectionEnabled=!1);else{var i=!0,s=null;$(document).bind(getEventsNS([["mousemove",function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};return $.each(t,function(t,s){i[s[0].split(" ").join(e+" ")+e]=s[1]}),i}var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],i)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],i)),i+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],i)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1;if(s&&!s.is(":visible")){if(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&i)return this.itemActivate(e),this.menuHide(s),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("