From cb82394fc8645d4e41476d19693844fac5022b4c Mon Sep 17 00:00:00 2001 From: Catalin Zalog Date: Thu, 1 Mar 2018 10:30:47 +0200 Subject: fix(modal): removes .navbar-toggler margin --- js/src/modal.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'js/src') diff --git a/js/src/modal.js b/js/src/modal.js index 904f6f93c..e7f9d2d96 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -64,8 +64,7 @@ const Modal = (($) => { DATA_TOGGLE : '[data-toggle="modal"]', DATA_DISMISS : '[data-dismiss="modal"]', FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', - STICKY_CONTENT : '.sticky-top', - NAVBAR_TOGGLER : '.navbar-toggler' + STICKY_CONTENT : '.sticky-top' } /** @@ -452,15 +451,6 @@ const Modal = (($) => { .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`) }) - // Adjust navbar-toggler margin - $(navbarToggler).each((index, element) => { - const actualMargin = element.style.marginRight - const calculatedMargin = $(element).css('margin-right') - $(element) - .data('margin-right', actualMargin) - .css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`) - }) - // Adjust body padding const actualPadding = document.body.style.paddingRight const calculatedPadding = $(document.body).css('padding-right') @@ -482,8 +472,8 @@ const Modal = (($) => { } }) - // Restore sticky content and navbar-toggler margin - const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`)) + // Restore sticky content + const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}`)) $(elements).each((index, element) => { const margin = $(element).data('margin-right') if (typeof margin !== 'undefined') { -- cgit v1.2.3 From 283ab30164f0f58ffb13063d800b7a2ee686bb8a Mon Sep 17 00:00:00 2001 From: Johann-S Date: Wed, 11 Jul 2018 10:40:06 +0200 Subject: fix(modal): fix unit test and resetting style --- js/src/modal.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'js/src') diff --git a/js/src/modal.js b/js/src/modal.js index e7f9d2d96..29fcc76bf 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -431,7 +431,6 @@ const Modal = (($) => { // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)) const stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)) - const navbarToggler = [].slice.call(document.querySelectorAll(Selector.NAVBAR_TOGGLER)) // Adjust fixed content padding $(fixedContent).each((index, element) => { @@ -465,11 +464,8 @@ const Modal = (($) => { const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)) $(fixedContent).each((index, element) => { const padding = $(element).data('padding-right') - if (typeof padding !== 'undefined') { - $(element) - .css('padding-right', padding) - .removeData('padding-right') - } + $(element).removeData('padding-right') + element.style.paddingRight = padding ? padding : '' }) // Restore sticky content @@ -483,9 +479,8 @@ const Modal = (($) => { // Restore body padding const padding = $(document.body).data('padding-right') - if (typeof padding !== 'undefined') { - $(document.body).css('padding-right', padding).removeData('padding-right') - } + $(document.body).removeData('padding-right') + document.body.style.paddingRight = padding ? padding : '' } _getScrollbarWidth() { // thx d.walsh -- cgit v1.2.3 From c4ccfbe04e888f3623d74963ba72d2320da0785a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 12 Jul 2018 00:04:51 -0700 Subject: Ship v4.1.2 --- js/src/alert.js | 4 ++-- js/src/button.js | 4 ++-- js/src/carousel.js | 4 ++-- js/src/collapse.js | 4 ++-- js/src/dropdown.js | 4 ++-- js/src/index.js | 2 +- js/src/modal.js | 4 ++-- js/src/popover.js | 4 ++-- js/src/scrollspy.js | 4 ++-- js/src/tab.js | 4 ++-- js/src/tooltip.js | 4 ++-- js/src/util.js | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) (limited to 'js/src') diff --git a/js/src/alert.js b/js/src/alert.js index 237e0851e..ed7eb457b 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): alert.js + * Bootstrap (v4.1.2): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Alert = (($) => { */ const NAME = 'alert' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.alert' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/button.js b/js/src/button.js index 442640dfe..dce630eeb 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -2,7 +2,7 @@ import $ from 'jquery' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): button.js + * Bootstrap (v4.1.2): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ const Button = (($) => { */ const NAME = 'button' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.button' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/carousel.js b/js/src/carousel.js index 59115de17..bc71e19c2 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): carousel.js + * Bootstrap (v4.1.2): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Carousel = (($) => { */ const NAME = 'carousel' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.carousel' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/collapse.js b/js/src/collapse.js index 93fe8abc0..1bb1bd17a 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): collapse.js + * Bootstrap (v4.1.2): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Collapse = (($) => { */ const NAME = 'collapse' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.collapse' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/dropdown.js b/js/src/dropdown.js index c7dcdec7c..e78f41c6c 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -4,7 +4,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): dropdown.js + * Bootstrap (v4.1.2): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ const Dropdown = (($) => { */ const NAME = 'dropdown' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.dropdown' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/index.js b/js/src/index.js index 34167e89a..ce4773264 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -13,7 +13,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): index.js + * Bootstrap (v4.1.2): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/modal.js b/js/src/modal.js index 29fcc76bf..735a1c416 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): modal.js + * Bootstrap (v4.1.2): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Modal = (($) => { */ const NAME = 'modal' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.modal' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/popover.js b/js/src/popover.js index e398ca1f9..dfe369130 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -3,7 +3,7 @@ import Tooltip from './tooltip' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): popover.js + * Bootstrap (v4.1.2): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Popover = (($) => { */ const NAME = 'popover' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.popover' const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index bf6d49234..221c57c4b 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): scrollspy.js + * Bootstrap (v4.1.2): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const ScrollSpy = (($) => { */ const NAME = 'scrollspy' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.scrollspy' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/tab.js b/js/src/tab.js index fe5478dbf..2ef8ddf23 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): tab.js + * Bootstrap (v4.1.2): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Tab = (($) => { */ const NAME = 'tab' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.tab' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/tooltip.js b/js/src/tooltip.js index c66e48385..2837c5e19 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -4,7 +4,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): tooltip.js + * Bootstrap (v4.1.2): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ const Tooltip = (($) => { */ const NAME = 'tooltip' - const VERSION = '4.1.1' + const VERSION = '4.1.2' const DATA_KEY = 'bs.tooltip' const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] diff --git a/js/src/util.js b/js/src/util.js index e5521438e..67ccbb11a 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -2,7 +2,7 @@ import $ from 'jquery' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): util.js + * Bootstrap (v4.1.2): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -- cgit v1.2.3 From 3b558734382ce58b51e5fc676453bfd53bba9201 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 23 Jul 2018 19:25:52 -0700 Subject: Ship v4.1.3 --- js/src/alert.js | 4 ++-- js/src/button.js | 4 ++-- js/src/carousel.js | 4 ++-- js/src/collapse.js | 4 ++-- js/src/dropdown.js | 4 ++-- js/src/index.js | 2 +- js/src/modal.js | 4 ++-- js/src/popover.js | 4 ++-- js/src/scrollspy.js | 4 ++-- js/src/tab.js | 4 ++-- js/src/tooltip.js | 4 ++-- js/src/util.js | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) (limited to 'js/src') diff --git a/js/src/alert.js b/js/src/alert.js index ed7eb457b..f39d9d931 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): alert.js + * Bootstrap (v4.1.3): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Alert = (($) => { */ const NAME = 'alert' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.alert' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/button.js b/js/src/button.js index dce630eeb..cf181d3fc 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -2,7 +2,7 @@ import $ from 'jquery' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): button.js + * Bootstrap (v4.1.3): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ const Button = (($) => { */ const NAME = 'button' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.button' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/carousel.js b/js/src/carousel.js index bc71e19c2..62af5cdb1 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): carousel.js + * Bootstrap (v4.1.3): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Carousel = (($) => { */ const NAME = 'carousel' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.carousel' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/collapse.js b/js/src/collapse.js index 1bb1bd17a..9277420a2 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): collapse.js + * Bootstrap (v4.1.3): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Collapse = (($) => { */ const NAME = 'collapse' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.collapse' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/dropdown.js b/js/src/dropdown.js index e78f41c6c..072bce6e3 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -4,7 +4,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): dropdown.js + * Bootstrap (v4.1.3): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ const Dropdown = (($) => { */ const NAME = 'dropdown' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.dropdown' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/index.js b/js/src/index.js index ce4773264..7304b69d3 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -13,7 +13,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): index.js + * Bootstrap (v4.1.3): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/js/src/modal.js b/js/src/modal.js index 735a1c416..ddcf370b6 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): modal.js + * Bootstrap (v4.1.3): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Modal = (($) => { */ const NAME = 'modal' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.modal' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/popover.js b/js/src/popover.js index dfe369130..eade7cf58 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -3,7 +3,7 @@ import Tooltip from './tooltip' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): popover.js + * Bootstrap (v4.1.3): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Popover = (($) => { */ const NAME = 'popover' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.popover' const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 221c57c4b..5cbffc650 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): scrollspy.js + * Bootstrap (v4.1.3): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const ScrollSpy = (($) => { */ const NAME = 'scrollspy' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.scrollspy' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/tab.js b/js/src/tab.js index 2ef8ddf23..a91b088de 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): tab.js + * Bootstrap (v4.1.3): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ const Tab = (($) => { */ const NAME = 'tab' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.tab' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 2837c5e19..72d9ba177 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -4,7 +4,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): tooltip.js + * Bootstrap (v4.1.3): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ const Tooltip = (($) => { */ const NAME = 'tooltip' - const VERSION = '4.1.2' + const VERSION = '4.1.3' const DATA_KEY = 'bs.tooltip' const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] diff --git a/js/src/util.js b/js/src/util.js index 67ccbb11a..eb98d449c 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -2,7 +2,7 @@ import $ from 'jquery' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.2): util.js + * Bootstrap (v4.1.3): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -- cgit v1.2.3