1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

Run grunt.

[ci skip]
This commit is contained in:
XhmikosR
2015-10-14 00:49:31 +03:00
parent fe0ad82159
commit 724bf86288
25 changed files with 149 additions and 59 deletions

View File

@@ -650,6 +650,14 @@ var Carousel = (function ($) {
this._slide(Direction.NEXT);
}
}
}, {
key: 'nextWhenVisible',
value: function nextWhenVisible() {
// Don't call next when the page isn't visible
if (!document.hidden) {
this.next();
}
}
}, {
key: 'prev',
value: function prev() {
@@ -685,7 +693,7 @@ var Carousel = (function ($) {
}
if (this._config.interval && !this._isPaused) {
this._interval = setInterval($.proxy(this.next, this), this._config.interval);
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
}
}
}, {
@@ -918,7 +926,10 @@ var Carousel = (function ($) {
if (typeof config === 'number') {
data.to(config);
} else if (action) {
} else if (typeof action === 'string') {
if (data[action] === undefined) {
throw new Error('No method named "' + action + '"');
}
data[action]();
} else if (_config.interval) {
data.pause();
@@ -1306,6 +1317,9 @@ var Collapse = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});
@@ -1496,6 +1510,9 @@ var Dropdown = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config].call(this);
}
});
@@ -2093,6 +2110,9 @@ var Modal = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config](relatedTarget);
} else if (_config.show) {
data.show(relatedTarget);
@@ -2429,6 +2449,9 @@ var ScrollSpy = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});
@@ -2692,6 +2715,9 @@ var Tab = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});
@@ -3283,6 +3309,9 @@ var Tooltip = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});
@@ -3468,6 +3497,9 @@ var Popover = (function ($) {
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});

File diff suppressed because one or more lines are too long

View File

@@ -136,6 +136,14 @@
this._slide(Direction.NEXT);
}
}
}, {
key: 'nextWhenVisible',
value: function nextWhenVisible() {
// Don't call next when the page isn't visible
if (!document.hidden) {
this.next();
}
}
}, {
key: 'prev',
value: function prev() {
@@ -171,7 +179,7 @@
}
if (this._config.interval && !this._isPaused) {
this._interval = setInterval($.proxy(this.next, this), this._config.interval);
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
}
}
}, {
@@ -404,7 +412,10 @@
if (typeof config === 'number') {
data.to(config);
} else if (action) {
} else if (typeof action === 'string') {
if (data[action] === undefined) {
throw new Error('No method named "' + action + '"');
}
data[action]();
} else if (_config.interval) {
data.pause();

View File

@@ -331,6 +331,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});

View File

@@ -166,6 +166,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config].call(this);
}
});

View File

@@ -479,6 +479,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config](relatedTarget);
} else if (_config.show) {
data.show(relatedTarget);

View File

@@ -156,6 +156,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});

View File

@@ -288,6 +288,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});

View File

@@ -240,6 +240,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});

View File

@@ -577,6 +577,9 @@
}
if (typeof config === 'string') {
if (data[config] === undefined) {
throw new Error('No method named "' + config + '"');
}
data[config]();
}
});