mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
grunt
This commit is contained in:
27
dist/js/bootstrap.js
vendored
27
dist/js/bootstrap.js
vendored
@@ -584,8 +584,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
this.$element
|
this.$element
|
||||||
.addClass('collapsing')
|
.addClass('collapsing')
|
||||||
.removeClass('collapse')
|
.removeClass('collapse in')
|
||||||
.removeClass('in')
|
|
||||||
|
|
||||||
this.transitioning = 1
|
this.transitioning = 1
|
||||||
|
|
||||||
@@ -657,7 +656,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
if (!data || !data.transitioning) {
|
if (!data || !data.transitioning) {
|
||||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
$this.toggleClass('collapsed', $target.hasClass('in'))
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin.call($target, option)
|
Plugin.call($target, option)
|
||||||
@@ -954,11 +953,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
Modal.prototype.escape = function () {
|
Modal.prototype.escape = function () {
|
||||||
if (this.isShown && this.options.keyboard) {
|
if (this.isShown && this.options.keyboard) {
|
||||||
this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
|
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
|
||||||
e.which == 27 && this.hide()
|
e.which == 27 && this.hide()
|
||||||
}, this))
|
}, this))
|
||||||
} else if (!this.isShown) {
|
} else if (!this.isShown) {
|
||||||
this.$element.off('keyup.dismiss.bs.modal')
|
this.$element.off('keydown.dismiss.bs.modal')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,7 +984,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||||
.appendTo(this.$body)
|
.appendTo(this.$body)
|
||||||
|
|
||||||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
||||||
if (e.target !== e.currentTarget) return
|
if (e.target !== e.currentTarget) return
|
||||||
this.options.backdrop == 'static'
|
this.options.backdrop == 'static'
|
||||||
? this.$element[0].focus.call(this.$element[0])
|
? this.$element[0].focus.call(this.$element[0])
|
||||||
@@ -1416,16 +1415,20 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
Tooltip.prototype.getPosition = function ($element) {
|
Tooltip.prototype.getPosition = function ($element) {
|
||||||
$element = $element || this.$element
|
$element = $element || this.$element
|
||||||
|
|
||||||
var el = $element[0]
|
var el = $element[0]
|
||||||
var isBody = el.tagName == 'BODY'
|
var isBody = el.tagName == 'BODY'
|
||||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
|
|
||||||
|
var elRect = typeof el.getBoundingClientRect == 'function' ? el.getBoundingClientRect() : null
|
||||||
|
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||||
|
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||||
var outerDims = isSvg ? {} : {
|
var outerDims = isSvg ? {} : {
|
||||||
width: isBody ? $(window).width() : $element.outerWidth(),
|
width: isBody ? $(window).width() : $element.outerWidth(),
|
||||||
height: isBody ? $(window).height() : $element.outerHeight()
|
height: isBody ? $(window).height() : $element.outerHeight()
|
||||||
}
|
}
|
||||||
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
|
||||||
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()
|
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
||||||
}, outerDims, isBody ? { top: 0, left: 0 } : $element.offset())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||||
@@ -1901,7 +1904,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
var $active = container.find('> .active')
|
var $active = container.find('> .active')
|
||||||
var transition = callback
|
var transition = callback
|
||||||
&& $.support.transition
|
&& $.support.transition
|
||||||
&& $active.hasClass('fade')
|
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
|
||||||
|
|
||||||
function next() {
|
function next() {
|
||||||
$active
|
$active
|
||||||
@@ -1925,7 +1928,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
callback && callback()
|
callback && callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
transition ?
|
$active.length && transition ?
|
||||||
$active
|
$active
|
||||||
.one('bsTransitionEnd', next)
|
.one('bsTransitionEnd', next)
|
||||||
.emulateTransitionEnd(150) :
|
.emulateTransitionEnd(150) :
|
||||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/raw-files.min.js
vendored
4
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
28
docs/dist/js/bootstrap.js
vendored
28
docs/dist/js/bootstrap.js
vendored
@@ -584,8 +584,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
this.$element
|
this.$element
|
||||||
.addClass('collapsing')
|
.addClass('collapsing')
|
||||||
.removeClass('collapse')
|
.removeClass('collapse in')
|
||||||
.removeClass('in')
|
|
||||||
|
|
||||||
this.transitioning = 1
|
this.transitioning = 1
|
||||||
|
|
||||||
@@ -657,7 +656,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
if (!data || !data.transitioning) {
|
if (!data || !data.transitioning) {
|
||||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
$this.toggleClass('collapsed', $target.hasClass('in'))
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin.call($target, option)
|
Plugin.call($target, option)
|
||||||
@@ -954,11 +953,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
Modal.prototype.escape = function () {
|
Modal.prototype.escape = function () {
|
||||||
if (this.isShown && this.options.keyboard) {
|
if (this.isShown && this.options.keyboard) {
|
||||||
this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
|
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
|
||||||
e.which == 27 && this.hide()
|
e.which == 27 && this.hide()
|
||||||
}, this))
|
}, this))
|
||||||
} else if (!this.isShown) {
|
} else if (!this.isShown) {
|
||||||
this.$element.off('keyup.dismiss.bs.modal')
|
this.$element.off('keydown.dismiss.bs.modal')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,7 +984,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||||
.appendTo(this.$body)
|
.appendTo(this.$body)
|
||||||
|
|
||||||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
||||||
if (e.target !== e.currentTarget) return
|
if (e.target !== e.currentTarget) return
|
||||||
this.options.backdrop == 'static'
|
this.options.backdrop == 'static'
|
||||||
? this.$element[0].focus.call(this.$element[0])
|
? this.$element[0].focus.call(this.$element[0])
|
||||||
@@ -1416,13 +1415,20 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
|
|
||||||
Tooltip.prototype.getPosition = function ($element) {
|
Tooltip.prototype.getPosition = function ($element) {
|
||||||
$element = $element || this.$element
|
$element = $element || this.$element
|
||||||
|
|
||||||
var el = $element[0]
|
var el = $element[0]
|
||||||
var isBody = el.tagName == 'BODY'
|
var isBody = el.tagName == 'BODY'
|
||||||
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
|
|
||||||
|
var elRect = typeof el.getBoundingClientRect == 'function' ? el.getBoundingClientRect() : null
|
||||||
|
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||||
|
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||||
|
var outerDims = isSvg ? {} : {
|
||||||
width: isBody ? $(window).width() : $element.outerWidth(),
|
width: isBody ? $(window).width() : $element.outerWidth(),
|
||||||
height: isBody ? $(window).height() : $element.outerHeight()
|
height: isBody ? $(window).height() : $element.outerHeight()
|
||||||
}, isBody ? { top: 0, left: 0 } : $element.offset())
|
}
|
||||||
|
|
||||||
|
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||||
@@ -1898,7 +1904,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
var $active = container.find('> .active')
|
var $active = container.find('> .active')
|
||||||
var transition = callback
|
var transition = callback
|
||||||
&& $.support.transition
|
&& $.support.transition
|
||||||
&& $active.hasClass('fade')
|
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
|
||||||
|
|
||||||
function next() {
|
function next() {
|
||||||
$active
|
$active
|
||||||
@@ -1922,7 +1928,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
callback && callback()
|
callback && callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
transition ?
|
$active.length && transition ?
|
||||||
$active
|
$active
|
||||||
.one('bsTransitionEnd', next)
|
.one('bsTransitionEnd', next)
|
||||||
.emulateTransitionEnd(150) :
|
.emulateTransitionEnd(150) :
|
||||||
|
2
docs/dist/js/bootstrap.min.js
vendored
2
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user