0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #13424 from twbs/docs-libs

Update docs libs
This commit is contained in:
XhmikosR 2014-04-30 08:00:21 +03:00
commit 2c1fe5374e
9 changed files with 41 additions and 29 deletions

View File

@ -525,7 +525,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.removeClass('collapsing') .removeClass('collapsing')
.addClass('collapse in')[dimension]('') .addClass('collapse in')[dimension]('')
this.transitioning = 0 this.transitioning = 0
this.$element.trigger('shown.bs.collapse') this.$element
.off($.support.transition.end + '.bs.collapse')
.trigger('shown.bs.collapse')
} }
if (!$.support.transition) return complete.call(this) if (!$.support.transition) return complete.call(this)
@ -533,7 +535,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
var scrollSize = $.camelCase(['scroll', dimension].join('-')) var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element this.$element
.one($.support.transition.end, $.proxy(complete, this)) .on($.support.transition.end + '.bs.collapse', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
} }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
Holder - 2.3.1 - client side image placeholders Holder - 2.3.2 - client side image placeholders
(c) 2012-2014 Ivan Malopinsky / http://imsky.co (c) 2012-2014 Ivan Malopinsky / http://imsky.co
Provided under the MIT License. Provided under the MIT License.
@ -269,7 +269,7 @@ function draw_svg(args){
font:font, font:font,
template:template template:template
}) })
return "data:image/svg+xml;base64,"+btoa(string); return "data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(string)));
} }
function draw(args) { function draw(args) {
@ -500,6 +500,7 @@ app.add_image = function (src, el) {
}; };
app.run = function (o) { app.run = function (o) {
instance_config = extend({}, system_config) instance_config = extend({}, system_config)
preempted = true; preempted = true;
@ -507,12 +508,12 @@ app.run = function (o) {
images = [], images = [],
imageNodes = [], imageNodes = [],
bgnodes = []; bgnodes = [];
if(options.use_canvas != null && options.use_canvas){ if(options.use_canvas != null && options.use_canvas){
instance_config.use_canvas = true; instance_config.use_canvas = true;
instance_config.use_svg = false; instance_config.use_svg = false;
} }
if (typeof (options.images) == "string") { if (typeof (options.images) == "string") {
imageNodes = selector(options.images); imageNodes = selector(options.images);
} else if (window.NodeList && options.images instanceof window.NodeList) { } else if (window.NodeList && options.images instanceof window.NodeList) {
@ -531,6 +532,7 @@ app.run = function (o) {
bgnodes = [options.bgnodes]; bgnodes = [options.bgnodes];
} }
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]); for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
var holdercss = document.getElementById("holderjs-style"); var holdercss = document.getElementById("holderjs-style");
if (!holdercss) { if (!holdercss) {
holdercss = document.createElement("style"); holdercss = document.createElement("style");
@ -538,13 +540,17 @@ app.run = function (o) {
holdercss.type = "text/css"; holdercss.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(holdercss); document.getElementsByTagName("head")[0].appendChild(holdercss);
} }
if (!options.nocss) { if (!options.nocss) {
if (holdercss.styleSheet) { if (holdercss.styleSheet) {
holdercss.styleSheet.cssText += options.stylesheet; holdercss.styleSheet.cssText += options.stylesheet;
} else { } else {
holdercss.appendChild(document.createTextNode(options.stylesheet)); if(options.stylesheet.length){
holdercss.appendChild(document.createTextNode(options.stylesheet));
}
} }
} }
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)"); var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
for (var l = bgnodes.length, i = 0; i < l; i++) { for (var l = bgnodes.length, i = 0; i < l; i++) {
var src = window.getComputedStyle(bgnodes[i], null) var src = window.getComputedStyle(bgnodes[i], null)
@ -598,6 +604,10 @@ contentLoaded(win, function () {
window.attachEvent("onresize", resizable_update) window.attachEvent("onresize", resizable_update)
} }
preempted || app.run({}); preempted || app.run({});
if (typeof window.Turbolinks === "object") {
document.addEventListener("page:change", function() { app.run({}) })
}
}); });
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
define([], function () { define([], function () {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long