mirror of
https://github.com/twbs/bootstrap.git
synced 2025-06-05 00:02:25 -04:00
Run grunt
.
This commit is contained in:
parent
a3d0a2c045
commit
f0840c893b
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css.map
vendored
2
dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
@ -2058,7 +2058,7 @@ var Modal = (function ($) {
|
|||||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
|
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@ -2766,7 +2766,7 @@ var Tooltip = (function ($) {
|
|||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
template: 'string',
|
||||||
title: '(string|function)',
|
title: '(string|element|function)',
|
||||||
trigger: 'string',
|
trigger: 'string',
|
||||||
delay: '(number|object)',
|
delay: '(number|object)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
@ -3052,16 +3052,31 @@ var Tooltip = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
var $tip = $(this.getTipElement());
|
||||||
var title = this.getTitle();
|
|
||||||
var method = this.config.html ? 'html' : 'text';
|
|
||||||
|
|
||||||
$(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();
|
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',
|
key: 'getTitle',
|
||||||
value: function getTitle() {
|
value: function getTitle() {
|
||||||
@ -3351,7 +3366,7 @@ var Popover = (function ($) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||||
content: '(string|function)'
|
content: '(string|element|function)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
@ -3415,19 +3430,13 @@ var Popover = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// 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();
|
this.cleanupTether();
|
||||||
}
|
}
|
||||||
|
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/umd/modal.js
vendored
2
dist/js/umd/modal.js
vendored
@ -444,7 +444,7 @@
|
|||||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
|
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
16
dist/js/umd/popover.js
vendored
16
dist/js/umd/popover.js
vendored
@ -54,7 +54,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
|
var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
|
||||||
content: '(string|function)'
|
content: '(string|element|function)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
@ -118,19 +118,13 @@
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// 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();
|
this.cleanupTether();
|
||||||
}
|
}
|
||||||
|
27
dist/js/umd/tooltip.js
vendored
27
dist/js/umd/tooltip.js
vendored
@ -60,7 +60,7 @@
|
|||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
template: 'string',
|
||||||
title: '(string|function)',
|
title: '(string|element|function)',
|
||||||
trigger: 'string',
|
trigger: 'string',
|
||||||
delay: '(number|object)',
|
delay: '(number|object)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
@ -346,16 +346,31 @@
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
var $tip = $(this.getTipElement());
|
||||||
var title = this.getTitle();
|
|
||||||
var method = this.config.html ? 'html' : 'text';
|
|
||||||
|
|
||||||
$(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();
|
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',
|
key: 'getTitle',
|
||||||
value: function getTitle() {
|
value: function getTitle() {
|
||||||
|
File diff suppressed because one or more lines are too long
2
docs/assets/js/docs.min.js
vendored
2
docs/assets/js/docs.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css.map
vendored
2
docs/dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
@ -2058,7 +2058,7 @@ var Modal = (function ($) {
|
|||||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
|
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@ -2766,7 +2766,7 @@ var Tooltip = (function ($) {
|
|||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
template: 'string',
|
||||||
title: '(string|function)',
|
title: '(string|element|function)',
|
||||||
trigger: 'string',
|
trigger: 'string',
|
||||||
delay: '(number|object)',
|
delay: '(number|object)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
@ -3052,16 +3052,31 @@ var Tooltip = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
var $tip = $(this.getTipElement());
|
||||||
var title = this.getTitle();
|
|
||||||
var method = this.config.html ? 'html' : 'text';
|
|
||||||
|
|
||||||
$(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();
|
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',
|
key: 'getTitle',
|
||||||
value: function getTitle() {
|
value: function getTitle() {
|
||||||
@ -3351,7 +3366,7 @@ var Popover = (function ($) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||||
content: '(string|function)'
|
content: '(string|element|function)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
@ -3415,19 +3430,13 @@ var Popover = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// 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();
|
this.cleanupTether();
|
||||||
}
|
}
|
||||||
|
4
docs/dist/js/bootstrap.min.js
vendored
4
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/js/umd/modal.js
vendored
2
docs/dist/js/umd/modal.js
vendored
@ -444,7 +444,7 @@
|
|||||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
|
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
16
docs/dist/js/umd/popover.js
vendored
16
docs/dist/js/umd/popover.js
vendored
@ -54,7 +54,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
|
var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
|
||||||
content: '(string|function)'
|
content: '(string|element|function)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
@ -118,19 +118,13 @@
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// 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();
|
this.cleanupTether();
|
||||||
}
|
}
|
||||||
|
27
docs/dist/js/umd/tooltip.js
vendored
27
docs/dist/js/umd/tooltip.js
vendored
@ -60,7 +60,7 @@
|
|||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
template: 'string',
|
||||||
title: '(string|function)',
|
title: '(string|element|function)',
|
||||||
trigger: 'string',
|
trigger: 'string',
|
||||||
delay: '(number|object)',
|
delay: '(number|object)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
@ -346,16 +346,31 @@
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
var $tip = $(this.getTipElement());
|
||||||
var title = this.getTitle();
|
|
||||||
var method = this.config.html ? 'html' : 'text';
|
|
||||||
|
|
||||||
$(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();
|
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',
|
key: 'getTitle',
|
||||||
value: function getTitle() {
|
value: function getTitle() {
|
||||||
|
2
js/dist/modal.js
vendored
2
js/dist/modal.js
vendored
@ -427,7 +427,7 @@ var Modal = (function ($) {
|
|||||||
this._originalBodyPadding = document.body.style.paddingRight || '';
|
this._originalBodyPadding = document.body.style.paddingRight || '';
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
document.body.style.paddingRight = bodyPadding + (this._scrollbarWidth + 'px');
|
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
16
js/dist/popover.js
vendored
16
js/dist/popover.js
vendored
@ -37,7 +37,7 @@ var Popover = (function ($) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||||
content: '(string|function)'
|
content: '(string|element|function)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
@ -101,19 +101,13 @@ var Popover = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// 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();
|
this.cleanupTether();
|
||||||
}
|
}
|
||||||
|
2
js/dist/popover.js.map
vendored
2
js/dist/popover.js.map
vendored
File diff suppressed because one or more lines are too long
27
js/dist/tooltip.js
vendored
27
js/dist/tooltip.js
vendored
@ -43,7 +43,7 @@ var Tooltip = (function ($) {
|
|||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
template: 'string',
|
||||||
title: '(string|function)',
|
title: '(string|element|function)',
|
||||||
trigger: 'string',
|
trigger: 'string',
|
||||||
delay: '(number|object)',
|
delay: '(number|object)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
@ -329,16 +329,31 @@ var Tooltip = (function ($) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'setContent',
|
key: 'setContent',
|
||||||
value: function setContent() {
|
value: function setContent() {
|
||||||
var tip = this.getTipElement();
|
var $tip = $(this.getTipElement());
|
||||||
var title = this.getTitle();
|
|
||||||
var method = this.config.html ? 'html' : 'text';
|
|
||||||
|
|
||||||
$(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();
|
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',
|
key: 'getTitle',
|
||||||
value: function getTitle() {
|
value: function getTitle() {
|
||||||
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user