From 35f80bb12e4e71fd777ee60ffa43711d8f84b1a6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 10 Aug 2017 20:56:35 -0700 Subject: bump to beta --- js/src/tooltip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index c7c7b9f9d..2060cebbb 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -5,7 +5,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-alpha.6): tooltip.js + * Bootstrap (v4.0.0-beta): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ const Tooltip = (($) => { */ const NAME = 'tooltip' - const VERSION = '4.0.0-alpha.6' + const VERSION = '4.0.0-beta' const DATA_KEY = 'bs.tooltip' const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] -- cgit v1.2.3 From ef8c77d8dcebd13559a141e419d003c2d10cc5f3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 27 Jul 2017 13:39:55 +0300 Subject: Tweak ESLint rules. --- js/src/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 2060cebbb..721f04481 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -698,7 +698,7 @@ const Tooltip = (($) => { } if (typeof config === 'string') { - if (data[config] === undefined) { + if (typeof data[config] === 'undefined') { throw new Error(`No method named "${config}"`) } data[config]() -- cgit v1.2.3 From 6063b0dc659e7ba3a83cfc9502ad7872f8201a32 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Thu, 27 Jul 2017 12:58:22 +0200 Subject: Enable the `no-return-assign` rule. --- js/src/tooltip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 721f04481..7dfe9dfc0 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -415,7 +415,8 @@ const Tooltip = (($) => { } getTipElement() { - return this.tip = this.tip || $(this.config.template)[0] + this.tip = this.tip || $(this.config.template)[0] + return this.tip } setContent() { -- cgit v1.2.3 From 4571ab0e57a5d2ff251b8c174ab0f693c5892dce Mon Sep 17 00:00:00 2001 From: Johann-S Date: Thu, 24 Aug 2017 09:40:11 +0200 Subject: Fix toggle for Tooltips/Popover which was called even if the Tooltip/Popover was disabled --- js/src/tooltip.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 7dfe9dfc0..37573cf49 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -184,6 +184,10 @@ const Tooltip = (($) => { } toggle(event) { + if (!this._isEnabled) { + return + } + if (event) { const dataKey = this.constructor.DATA_KEY let context = $(event.currentTarget).data(dataKey) @@ -234,8 +238,8 @@ const Tooltip = (($) => { if (this._popper !== null) { this._popper.destroy() } - this._popper = null + this._popper = null this.element = null this.config = null this.tip = null @@ -706,7 +710,6 @@ const Tooltip = (($) => { } }) } - } -- cgit v1.2.3 From 9936bf59444c402b653f28449529eab83794e911 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Tue, 29 Aug 2017 21:16:00 +0200 Subject: Create a bundled release of Bootstrap with Popper.js inside --- js/src/tooltip.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 37573cf49..5dc28ab7e 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -1,5 +1,5 @@ -/* global Popper */ - +import $ from 'jquery' +import Popper from 'popper.js' import Util from './util' @@ -10,7 +10,7 @@ import Util from './util' * -------------------------------------------------------------------------- */ -const Tooltip = (($) => { +const Tooltip = (() => { /** * Check for Popper dependency @@ -728,6 +728,6 @@ const Tooltip = (($) => { return Tooltip -})(jQuery) +})(jQuery, Popper) export default Tooltip -- cgit v1.2.3 From d5890cb82f4dcd2b5b8e2e6d4d7bebd1026e2228 Mon Sep 17 00:00:00 2001 From: vsn4ik Date: Mon, 11 Sep 2017 22:44:42 +0300 Subject: Remove not necessary condition in tooltip.js --- js/src/tooltip.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 5dc28ab7e..ca7e52b14 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -622,18 +622,18 @@ const Tooltip = (() => { config ) - if (config.delay && typeof config.delay === 'number') { + if (typeof config.delay === 'number') { config.delay = { show : config.delay, hide : config.delay } } - if (config.title && typeof config.title === 'number') { + if (typeof config.title === 'number') { config.title = config.title.toString() } - if (config.content && typeof config.content === 'number') { + if (typeof config.content === 'number') { config.content = config.content.toString() } -- cgit v1.2.3 From b29b1e155880ac953899889c9cbb67f7f7df0529 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Tue, 3 Oct 2017 14:27:36 +0200 Subject: Use imported jQuery object --- js/src/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index ca7e52b14..8d262f4ad 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -728,6 +728,6 @@ const Tooltip = (() => { return Tooltip -})(jQuery, Popper) +})($, Popper) export default Tooltip -- cgit v1.2.3