diff options
author | XhmikosR <xhmikosr@gmail.com> | 2015-08-30 00:03:55 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2015-09-05 08:13:43 +0300 |
commit | f0840c893bafdc9f8cc1adb90ef1282e4618bbd3 (patch) | |
tree | 791549e90216d1fef17acf293ca84a842fd5382a /js/dist/popover.js | |
parent | a3d0a2c0452d81e5217b6dfead7eee9ff5884ada (diff) |
Run `grunt`.
Diffstat (limited to 'js/dist/popover.js')
-rw-r--r-- | js/dist/popover.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/js/dist/popover.js b/js/dist/popover.js index 9e7b6e8393..baf36aff87 100644 --- a/js/dist/popover.js +++ b/js/dist/popover.js @@ -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(); } |