1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-14 09:34:36 +02:00

Run grunt.

This commit is contained in:
XhmikosR
2015-08-30 00:03:55 +03:00
parent a3d0a2c045
commit f0840c893b
22 changed files with 148 additions and 103 deletions

2
js/dist/modal.js vendored
View File

@@ -427,7 +427,7 @@ var Modal = (function ($) {
this._originalBodyPadding = document.body.style.paddingRight || '';
if (this._isBodyOverflowing) {
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
}
}
}, {

File diff suppressed because one or more lines are too long

16
js/dist/popover.js vendored
View File

@@ -37,7 +37,7 @@ var Popover = (function ($) {
});
var DefaultType = $.extend({}, Tooltip.DefaultType, {
content: '(string|function)'
content: '(string|element|function)'
});
var ClassName = {
@@ -101,19 +101,13 @@ var Popover = (function ($) {
}, {
key: 'setContent',
value: function setContent() {
var tip = this.getTipElement();
var title = this.getTitle();
var content = this._getContent();
var $titleElement = $(tip).find(Selector.TITLE);
if ($titleElement) {
$titleElement[this.config.html ? 'html' : 'text'](title);
}
var $tip = $(this.getTipElement());
// we use append for html objects to maintain js events
$(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content);
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN);
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
this.cleanupTether();
}

File diff suppressed because one or more lines are too long

27
js/dist/tooltip.js vendored
View File

@@ -43,7 +43,7 @@ var Tooltip = (function ($) {
var DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|function)',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
@@ -329,16 +329,31 @@ var Tooltip = (function ($) {
}, {
key: 'setContent',
value: function setContent() {
var tip = this.getTipElement();
var title = this.getTitle();
var method = this.config.html ? 'html' : 'text';
var $tip = $(this.getTipElement());
$(tip).find(Selector.TOOLTIP_INNER)[method](title);
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
$(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN);
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
this.cleanupTether();
}
}, {
key: 'setElementContent',
value: function setElementContent($element, content) {
var html = this.config.html;
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// content is a DOM node or a jQuery
if (html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content);
}
} else {
$element.text($(content).text());
}
} else {
$element[html ? 'html' : 'text'](content);
}
}
}, {
key: 'getTitle',
value: function getTitle() {

File diff suppressed because one or more lines are too long