info@54: /* ======================================================================== info@54: * Bootstrap: dropdown.js v3.0.3 info@54: * http://getbootstrap.com/javascript/#dropdowns info@54: * ======================================================================== info@54: * Copyright 2013 Twitter, Inc. info@54: * info@54: * Licensed under the Apache License, Version 2.0 (the "License"); info@54: * you may not use this file except in compliance with the License. info@54: * You may obtain a copy of the License at info@54: * info@54: * http://www.apache.org/licenses/LICENSE-2.0 info@54: * info@54: * Unless required by applicable law or agreed to in writing, software info@54: * distributed under the License is distributed on an "AS IS" BASIS, info@54: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. info@54: * See the License for the specific language governing permissions and info@54: * limitations under the License. info@54: * ======================================================================== */ info@54: info@54: info@54: +function ($) { "use strict"; info@54: info@54: // DROPDOWN CLASS DEFINITION info@54: // ========================= info@54: info@54: var backdrop = '.dropdown-backdrop' info@54: var toggle = '[data-toggle=dropdown]' info@54: var Dropdown = function (element) { info@54: $(element).on('click.bs.dropdown', this.toggle) info@54: } info@54: info@54: Dropdown.prototype.toggle = function (e) { info@54: var $this = $(this) info@54: info@54: if ($this.is('.disabled, :disabled')) return info@54: info@54: var $parent = getParent($this) info@54: var isActive = $parent.hasClass('open') info@54: info@54: clearMenus() info@54: info@54: if (!isActive) { info@54: if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { info@54: // if mobile we use a backdrop because click events don't delegate info@54: $('