Seditio Source
Root |
./othercms/PHPFusion 9.10.20/includes/bootstrap/bootstrap3/js/bootstrap-submenu.min.js
/*!
 * Bootstrap-submenu v2.0.4 (https://vsn4ik.github.io/bootstrap-submenu/)
 * Copyright 2014-2016 Vasily A. (https://github.com/vsn4ik)
 * Licensed under the MIT license
 */
;"use strict";(function(a){if(typeof define=="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports=="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}})(function(e){function c(f){this.$element=e(f);this.$menu=this.$element.closest(".dropdown-menu");this.$main=this.$menu.parent();this.$items=this.$menu.children(".dropdown-submenu");this.init()}c.prototype={init:function(){this.$element.on("keydown",e.proxy(this,"keydown"))},close:function(){this.$main.removeClass("open");this.$items.trigger("hide.bs.submenu")},keydown:function(f){if(f.keyCode==27){f.stopPropagation();this.close();this.$main.children("a, button").trigger("focus")}}};function b(f){this.$element=e(f);this.$main=this.$element.parent();this.$menu=this.$main.children(".dropdown-menu");this.$subs=this.$main.siblings(".dropdown-submenu");this.$items=this.$menu.children(".dropdown-submenu");this.init()}e.extend(b.prototype,c.prototype,{init:function(){this.$element.on({click:e.proxy(this,"click"),keydown:e.proxy(this,"keydown")});this.$main.on("hide.bs.submenu",e.proxy(this,"hide"))},click:function(f){f.preventDefault();f.stopPropagation();this.toggle()},hide:function(f){f.stopPropagation();this.close()},open:function(){this.$main.addClass("open");this.$subs.trigger("hide.bs.submenu")},toggle:function(){if(this.$main.hasClass("open")){this.close()}else{this.open()}},keydown:function(f){if(f.keyCode==32){f.preventDefault()}if(e.inArray(f.keyCode,[13,32])!=-1){this.toggle()}}});function d(f){this.$element=e(f);this.$main=this.$element.parent();this.$menu=this.$main.children(".dropdown-menu");this.$items=this.$menu.children(".dropdown-submenu");this.init()}d.prototype={init:function(){this.$menu.off("keydown.bs.dropdown.data-api");this.$menu.on("keydown",e.proxy(this,"itemKeydown"));this.$menu.find("li > a").each(function(){new c(this)});this.$menu.find(".dropdown-submenu > a").each(function(){new b(this)});this.$main.on("hidden.bs.dropdown",e.proxy(this,"hidden"))},hidden:function(){this.$items.trigger("hide.bs.submenu")},itemKeydown:function(g){if(e.inArray(g.keyCode,[38,40])!=-1){g.preventDefault();g.stopPropagation();var h=this.$menu.find("li:not(.disabled):visible > a");var f=h.index(g.target);if(g.keyCode==38&&f!==0){f--}else{if(g.keyCode==40&&f!==h.length-1){f++}else{return}}h.eq(f).trigger("focus")}}};var a=e.fn.submenupicker;e.fn.submenupicker=function(g){var f=this instanceof e?this:e(g);return f.each(function(){var h=e.data(this,"bs.submenu");if(!h){h=new d(this);e.data(this,"bs.submenu",h)}})};e.fn.submenupicker.Constructor=d;e.fn.submenupicker.noConflict=function(){e.fn.submenupicker=a;return this};return e.fn.submenupicker});