Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2017-05-29 22:46:11 +0300
committerJohann-S <johann.servoire@gmail.com>2017-05-31 10:54:58 +0300
commit5f493cfc74c3def557a189eca9e47dfd02084e09 (patch)
treebafdb02f4a106e0bec39095db37369fd68c623bd /js
parentccd86bdc967d8714f718c55bd13db967f2e849d2 (diff)
Remove the use of x-arrow attribute for Tooltips/Popovers arrows
Diffstat (limited to 'js')
-rw-r--r--js/src/popover.js2
-rw-r--r--js/src/tooltip.js22
2 files changed, 14 insertions, 10 deletions
diff --git a/js/src/popover.js b/js/src/popover.js
index a068420d63..13c109b2c7 100644
--- a/js/src/popover.js
+++ b/js/src/popover.js
@@ -30,7 +30,7 @@ const Popover = (($) => {
trigger : 'click',
content : '',
template : '<div class="popover" role="tooltip">'
- + '<div class="arrow" x-arrow></div>'
+ + '<div class="arrow"></div>'
+ '<h3 class="popover-title"></h3>'
+ '<div class="popover-content"></div></div>'
})
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 1d53b0470d..c7c7b9f9d7 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -61,7 +61,7 @@ const Tooltip = (($) => {
const Default = {
animation : true,
template : '<div class="tooltip" role="tooltip">'
- + '<div class="arrow" x-arrow></div>'
+ + '<div class="arrow"></div>'
+ '<div class="tooltip-inner"></div></div>',
trigger : 'hover focus',
title : '',
@@ -99,7 +99,8 @@ const Tooltip = (($) => {
const Selector = {
TOOLTIP : '.tooltip',
- TOOLTIP_INNER : '.tooltip-inner'
+ TOOLTIP_INNER : '.tooltip-inner',
+ ARROW : '.arrow'
}
const Trigger = {
@@ -288,16 +289,19 @@ const Tooltip = (($) => {
$(this.element).trigger(this.constructor.Event.INSERTED)
this._popper = new Popper(this.element, tip, {
- placement : attachment,
- modifiers : {
- offset : {
- offset : this.config.offset
+ placement: attachment,
+ modifiers: {
+ offset: {
+ offset: this.config.offset
},
- flip : {
- behavior : this.config.fallbackPlacement
+ flip: {
+ behavior: this.config.fallbackPlacement
+ },
+ arrow: {
+ element: Selector.ARROW
}
},
- onCreate : (data) => {
+ onCreate: (data) => {
if (data.originalPlacement !== data.placement) {
this._handlePopperPlacementChange(data)
}