mirror of
https://github.com/wahyd4/bootstrap.git
synced 2026-08-12 06:16:37 +10:00
update js files
This commit is contained in:
Vendored
+17
-9
@@ -57,12 +57,10 @@
|
||||
this.$element = $(content)
|
||||
.delegate('.close', 'click.modal', $.proxy(this.hide, this))
|
||||
|
||||
if ( options ) {
|
||||
$.extend( this.settings, options )
|
||||
$.extend( this.settings, options )
|
||||
|
||||
if ( options.show ) {
|
||||
this.show()
|
||||
}
|
||||
if ( this.settings.show ) {
|
||||
this.show()
|
||||
}
|
||||
|
||||
return this
|
||||
@@ -81,17 +79,23 @@
|
||||
|
||||
escape.call(this)
|
||||
backdrop.call(this, function () {
|
||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||
|
||||
that.$element
|
||||
.appendTo(document.body)
|
||||
.show()
|
||||
|
||||
if ($.support.transition && that.$element.hasClass('fade')) {
|
||||
if (transition) {
|
||||
that.$element[0].offsetWidth // force reflow
|
||||
}
|
||||
|
||||
that.$element
|
||||
.addClass('in')
|
||||
.trigger('shown')
|
||||
|
||||
transition ?
|
||||
that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
|
||||
that.$element.trigger('shown')
|
||||
|
||||
})
|
||||
|
||||
return this
|
||||
@@ -100,6 +104,10 @@
|
||||
, hide: function (e) {
|
||||
e && e.preventDefault()
|
||||
|
||||
if ( !this.isShown ) {
|
||||
return this
|
||||
}
|
||||
|
||||
var that = this
|
||||
this.isShown = false
|
||||
|
||||
@@ -220,7 +228,7 @@
|
||||
$.fn.modal.defaults = {
|
||||
backdrop: false
|
||||
, keyboard: false
|
||||
, show: true
|
||||
, show: false
|
||||
}
|
||||
|
||||
|
||||
@@ -235,4 +243,4 @@
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
}( window.jQuery || window.ender );
|
||||
|
||||
Vendored
+10
-4
@@ -27,21 +27,27 @@
|
||||
|
||||
function tab( e ) {
|
||||
var $this = $(this)
|
||||
, href = $this.attr('href')
|
||||
, $ul = $this.closest('ul')
|
||||
, $controlled
|
||||
, href = $this.attr('href')
|
||||
, previous
|
||||
|
||||
if (/^#\w+/.test(href)) {
|
||||
e.preventDefault()
|
||||
|
||||
if ($this.hasClass('active')) {
|
||||
if ($this.parent('li').hasClass('active')) {
|
||||
return
|
||||
}
|
||||
|
||||
previous = $ul.find('.active a')[0]
|
||||
$href = $(href)
|
||||
|
||||
activate($this.parent('li'), $ul)
|
||||
activate($href, $href.parent())
|
||||
|
||||
$this.trigger({
|
||||
type: 'change'
|
||||
, relatedTarget: previous
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,4 +65,4 @@
|
||||
$('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
}( window.jQuery || window.ender );
|
||||
|
||||
Reference in New Issue
Block a user