Skip to content

Commit

Permalink
Run grunt.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Sep 2, 2015
1 parent 3662156 commit b439156
Show file tree
Hide file tree
Showing 22 changed files with 168 additions and 119 deletions.
22 changes: 12 additions & 10 deletions dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css.map

Large diffs are not rendered by default.

43 changes: 26 additions & 17 deletions dist/js/bootstrap.js
Expand Up @@ -2766,7 +2766,7 @@ var Tooltip = (function ($) {
var DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|function)',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
Expand Down Expand Up @@ -3052,16 +3052,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() {
Expand Down Expand Up @@ -3351,7 +3366,7 @@ var Popover = (function ($) {
});

var DefaultType = $.extend({}, Tooltip.DefaultType, {
content: '(string|function)'
content: '(string|element|function)'
});

var ClassName = {
Expand Down Expand Up @@ -3415,19 +3430,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();
}
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap.min.js

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions dist/js/umd/popover.js
Expand Up @@ -54,7 +54,7 @@
});

var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
content: '(string|function)'
content: '(string|element|function)'
});

var ClassName = {
Expand Down Expand Up @@ -118,19 +118,13 @@
}, {
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();
}
Expand Down
27 changes: 21 additions & 6 deletions dist/js/umd/tooltip.js
Expand Up @@ -60,7 +60,7 @@
var DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|function)',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
Expand Down Expand Up @@ -346,16 +346,31 @@
}, {
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() {
Expand Down
6 changes: 3 additions & 3 deletions docs/assets/css/docs.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/css/docs.min.css.map

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions docs/dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/dist/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.min.css.map

Large diffs are not rendered by default.

0 comments on commit b439156

Please sign in to comment.