diff options
| author | Bootstrap's Grunt bot <[email protected]> | 2015-04-28 08:19:19 +0000 |
|---|---|---|
| committer | Bootstrap's Grunt bot <[email protected]> | 2015-04-28 08:19:19 +0000 |
| commit | a9137bd621ab77b0bd3f554c34e7fde97b08a2bc (patch) | |
| tree | 9ccc7bbda5aa6a7f995ef80a27a7dfb0bc9d208c /docs/dist/js/bootstrap.js | |
| parent | fae8c5d0dc1814ef01c607d3a6551eb286e62f0d (diff) | |
| download | bootstrap-a9137bd621ab77b0bd3f554c34e7fde97b08a2bc.tar.xz bootstrap-a9137bd621ab77b0bd3f554c34e7fde97b08a2bc.zip | |
automatic `grunt dist`
[ci skip]
Diffstat (limited to 'docs/dist/js/bootstrap.js')
| -rw-r--r-- | docs/dist/js/bootstrap.js | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js index 18d59bb18..32f6ffc55 100644 --- a/docs/dist/js/bootstrap.js +++ b/docs/dist/js/bootstrap.js @@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') { var val = $el.is('input') ? 'val' : 'html' var data = $el.data() - state = state + 'Text' + state += 'Text' if (data.resetText == null) $el.data('resetText', $el[val]()) @@ -761,6 +761,40 @@ if (typeof jQuery === 'undefined') { Dropdown.VERSION = '3.3.4' + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + function clearMenus(e) { + if (e && e.which === 3) return + $(backdrop).remove() + $(toggle).each(function () { + var $this = $(this) + var $parent = getParent($this) + var relatedTarget = { relatedTarget: this } + + if (!$parent.hasClass('open')) return + + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this.attr('aria-expanded', 'false') + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) + }) + } + Dropdown.prototype.toggle = function (e) { var $this = $(this) @@ -810,7 +844,7 @@ if (typeof jQuery === 'undefined') { var $parent = getParent($this) var isActive = $parent.hasClass('open') - if ((!isActive && e.which != 27) || (isActive && e.which == 27)) { + if (!isActive && e.which != 27 || isActive && e.which == 27) { if (e.which == 27) $parent.find(toggle).trigger('focus') return $this.trigger('click') } @@ -822,47 +856,13 @@ if (typeof jQuery === 'undefined') { var index = $items.index(e.target) - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 + if (e.which == 38 && index > 0) index-- // up + if (e.which == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 $items.eq(index).trigger('focus') } - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) - }) - } - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - // DROPDOWN PLUGIN DEFINITION // ========================== @@ -1483,8 +1483,8 @@ if (typeof jQuery === 'undefined') { if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginLeft)) marginLeft = 0 - offset.top = offset.top + marginTop - offset.left = offset.left + marginLeft + offset.top += marginTop + offset.left += marginLeft // $.fn.offset doesn't round pixel values // so we use setOffset directly with our own function B-0 @@ -1566,7 +1566,7 @@ if (typeof jQuery === 'undefined') { Tooltip.prototype.fixTitle = function () { var $e = this.$element - if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') { + if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } @@ -2080,7 +2080,7 @@ if (typeof jQuery === 'undefined') { var $active = container.find('> .active') var transition = callback && $.support.transition - && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) + && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) function next() { $active |
