mirror of https://github.com/twbs/bootstrap.git
clear interval in cycle + rebuild
This commit is contained in:
parent
566380b257
commit
a866a51a2e
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
cycle: function (e) {
|
cycle: function (e) {
|
||||||
if (!e) this.paused = false
|
if (!e) this.paused = false
|
||||||
|
if (this.interval) clearInterval(this.interval);
|
||||||
this.options.interval
|
this.options.interval
|
||||||
&& !this.paused
|
&& !this.paused
|
||||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
|
|
|
||||||
|
|
@ -156,10 +156,10 @@
|
||||||
* =================================== */
|
* =================================== */
|
||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
.on('click.dropdown.data-api', clearMenus)
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
|
.on('.dropdown-menu', function (e) { e.stopPropagation() })
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
|
|
||||||
, getPosition: function () {
|
, getPosition: function () {
|
||||||
var el = this.$element[0]
|
var el = this.$element[0]
|
||||||
return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : {
|
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
||||||
width: el.offsetWidth
|
width: el.offsetWidth
|
||||||
, height: el.offsetHeight
|
, height: el.offsetHeight
|
||||||
}, this.$element.offset())
|
}, this.$element.offset())
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,7 @@
|
||||||
|
|
||||||
cycle: function (e) {
|
cycle: function (e) {
|
||||||
if (!e) this.paused = false
|
if (!e) this.paused = false
|
||||||
|
if (this.interval) clearInterval(this.interval);
|
||||||
this.options.interval
|
this.options.interval
|
||||||
&& !this.paused
|
&& !this.paused
|
||||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
|
|
@ -788,13 +789,14 @@
|
||||||
* =================================== */
|
* =================================== */
|
||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
.on('click.dropdown.data-api', clearMenus)
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
|
.on('.dropdown-menu', function (e) { e.stopPropagation() })
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||||
|
|
||||||
}(window.jQuery);/* =========================================================
|
}(window.jQuery);
|
||||||
|
/* =========================================================
|
||||||
* bootstrap-modal.js v2.3.0
|
* bootstrap-modal.js v2.3.0
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||||
* =========================================================
|
* =========================================================
|
||||||
|
|
@ -1252,7 +1254,7 @@
|
||||||
|
|
||||||
, getPosition: function () {
|
, getPosition: function () {
|
||||||
var el = this.$element[0]
|
var el = this.$element[0]
|
||||||
return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : {
|
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
||||||
width: el.offsetWidth
|
width: el.offsetWidth
|
||||||
, height: el.offsetHeight
|
, height: el.offsetHeight
|
||||||
}, this.$element.offset())
|
}, this.$element.offset())
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
cycle: function (e) {
|
cycle: function (e) {
|
||||||
if (!e) this.paused = false
|
if (!e) this.paused = false
|
||||||
|
if (this.interval) clearInterval(this.interval);
|
||||||
this.options.interval
|
this.options.interval
|
||||||
&& !this.paused
|
&& !this.paused
|
||||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue