diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-11-13 13:25:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 13:25:36 +0300 |
commit | 9a0bba9afa039308e84442a2b329bf64f5678a00 (patch) | |
tree | 0b4216889b0b675407b85d74692d8505ecfd0c82 /js/src/popover.js | |
parent | 1354a929f911bfb8bf3a9b22c0f79fc0277c3a74 (diff) |
Object spread : less jQuery more ES6 (#24665)
Diffstat (limited to 'js/src/popover.js')
-rw-r--r-- | js/src/popover.js | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/js/src/popover.js b/js/src/popover.js index 5534f44412..8beec963a2 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -26,19 +26,25 @@ const Popover = (($) => { const CLASS_PREFIX = 'bs-popover' const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g') - const Default = $.extend({}, Tooltip.Default, { - placement : 'right', - trigger : 'click', - content : '', - template : '<div class="popover" role="tooltip">' - + '<div class="arrow"></div>' - + '<h3 class="popover-header"></h3>' - + '<div class="popover-body"></div></div>' - }) - - const DefaultType = $.extend({}, Tooltip.DefaultType, { - content : '(string|element|function)' - }) + const Default = { + ...Tooltip.Default, + ...{ + placement : 'right', + trigger : 'click', + content : '', + template : '<div class="popover" role="tooltip">' + + '<div class="arrow"></div>' + + '<h3 class="popover-header"></h3>' + + '<div class="popover-body"></div></div>' + } + } + + const DefaultType = { + ...Tooltip.DefaultType, + ...{ + content : '(string|element|function)' + } + } const ClassName = { FADE : 'fade', |