1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
This commit is contained in:
Mark Otto 2018-07-11 21:42:55 -07:00
parent 283ab30164
commit 9e126b26a8
21 changed files with 67 additions and 82 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4258,6 +4258,10 @@
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (event && event.type === 'click') {
relatedTarget.clickEvent = event;
}
if (!context) { if (!context) {
continue; continue;
} }
@ -4470,8 +4474,7 @@
DATA_TOGGLE: '[data-toggle="modal"]', DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]', DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top', STICKY_CONTENT: '.sticky-top'
NAVBAR_TOGGLER: '.navbar-toggler'
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -4838,8 +4841,7 @@
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
var navbarToggler = [].slice.call(document.querySelectorAll(Selector.NAVBAR_TOGGLER)); // Adjust fixed content padding
$$$1(fixedContent).each(function (index, element) { $$$1(fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight; var actualPadding = element.style.paddingRight;
@ -4851,12 +4853,6 @@
var actualMargin = element.style.marginRight; var actualMargin = element.style.marginRight;
var calculatedMargin = $$$1(element).css('margin-right'); var calculatedMargin = $$$1(element).css('margin-right');
$$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
}); // Adjust navbar-toggler margin
$$$1(navbarToggler).each(function (index, element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $$$1(element).css('margin-right');
$$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
}); // Adjust body padding }); // Adjust body padding
var actualPadding = document.body.style.paddingRight; var actualPadding = document.body.style.paddingRight;
@ -4870,13 +4866,11 @@
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
$$$1(fixedContent).each(function (index, element) { $$$1(fixedContent).each(function (index, element) {
var padding = $$$1(element).data('padding-right'); var padding = $$$1(element).data('padding-right');
$$$1(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
if (typeof padding !== 'undefined') { var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
$$$1(element).css('padding-right', padding).removeData('padding-right');
}
}); // Restore sticky content and navbar-toggler margin
var elements = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER));
$$$1(elements).each(function (index, element) { $$$1(elements).each(function (index, element) {
var margin = $$$1(element).data('margin-right'); var margin = $$$1(element).data('margin-right');
@ -4886,10 +4880,8 @@
}); // Restore body padding }); // Restore body padding
var padding = $$$1(document.body).data('padding-right'); var padding = $$$1(document.body).data('padding-right');
$$$1(document.body).removeData('padding-right');
if (typeof padding !== 'undefined') { document.body.style.paddingRight = padding ? padding : '';
$$$1(document.body).css('padding-right', padding).removeData('padding-right');
}
}; };
_proto._getScrollbarWidth = function _getScrollbarWidth() { _proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -5558,10 +5550,13 @@
} }
}; };
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
var popperInstance = popperData.instance;
this.tip = popperInstance.popper;
this._cleanTipClass(); this._cleanTipClass();
this.addAttachmentClass(this._getAttachment(data.placement)); this.addAttachmentClass(this._getAttachment(popperData.placement));
}; };
_proto._fixTransition = function _fixTransition() { _proto._fixTransition = function _fixTransition() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1741,6 +1741,10 @@
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (event && event.type === 'click') {
relatedTarget.clickEvent = event;
}
if (!context) { if (!context) {
continue; continue;
} }
@ -1953,8 +1957,7 @@
DATA_TOGGLE: '[data-toggle="modal"]', DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]', DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top', STICKY_CONTENT: '.sticky-top'
NAVBAR_TOGGLER: '.navbar-toggler'
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -2321,8 +2324,7 @@
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
var navbarToggler = [].slice.call(document.querySelectorAll(Selector.NAVBAR_TOGGLER)); // Adjust fixed content padding
$$$1(fixedContent).each(function (index, element) { $$$1(fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight; var actualPadding = element.style.paddingRight;
@ -2334,12 +2336,6 @@
var actualMargin = element.style.marginRight; var actualMargin = element.style.marginRight;
var calculatedMargin = $$$1(element).css('margin-right'); var calculatedMargin = $$$1(element).css('margin-right');
$$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
}); // Adjust navbar-toggler margin
$$$1(navbarToggler).each(function (index, element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $$$1(element).css('margin-right');
$$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
}); // Adjust body padding }); // Adjust body padding
var actualPadding = document.body.style.paddingRight; var actualPadding = document.body.style.paddingRight;
@ -2353,13 +2349,11 @@
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
$$$1(fixedContent).each(function (index, element) { $$$1(fixedContent).each(function (index, element) {
var padding = $$$1(element).data('padding-right'); var padding = $$$1(element).data('padding-right');
$$$1(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
if (typeof padding !== 'undefined') { var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
$$$1(element).css('padding-right', padding).removeData('padding-right');
}
}); // Restore sticky content and navbar-toggler margin
var elements = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER));
$$$1(elements).each(function (index, element) { $$$1(elements).each(function (index, element) {
var margin = $$$1(element).data('margin-right'); var margin = $$$1(element).data('margin-right');
@ -2369,10 +2363,8 @@
}); // Restore body padding }); // Restore body padding
var padding = $$$1(document.body).data('padding-right'); var padding = $$$1(document.body).data('padding-right');
$$$1(document.body).removeData('padding-right');
if (typeof padding !== 'undefined') { document.body.style.paddingRight = padding ? padding : '';
$$$1(document.body).css('padding-right', padding).removeData('padding-right');
}
}; };
_proto._getScrollbarWidth = function _getScrollbarWidth() { _proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -3041,10 +3033,13 @@
} }
}; };
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
var popperInstance = popperData.instance;
this.tip = popperInstance.popper;
this._cleanTipClass(); this._cleanTipClass();
this.addAttachmentClass(this._getAttachment(data.placement)); this.addAttachmentClass(this._getAttachment(popperData.placement));
}; };
_proto._fixTransition = function _fixTransition() { _proto._fixTransition = function _fixTransition() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
js/dist/dropdown.js vendored
View file

@ -335,6 +335,10 @@ var Dropdown = function ($) {
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
if (event && event.type === 'click') {
relatedTarget.clickEvent = event;
}
if (!context) { if (!context) {
continue; continue;
} }

File diff suppressed because one or more lines are too long

28
js/dist/modal.js vendored
View file

@ -63,8 +63,7 @@ var Modal = function ($) {
DATA_TOGGLE: '[data-toggle="modal"]', DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]', DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top', STICKY_CONTENT: '.sticky-top'
NAVBAR_TOGGLER: '.navbar-toggler'
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -431,8 +430,7 @@ var Modal = function ($) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
var navbarToggler = [].slice.call(document.querySelectorAll(Selector.NAVBAR_TOGGLER)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) { $(fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight; var actualPadding = element.style.paddingRight;
@ -444,12 +442,6 @@ var Modal = function ($) {
var actualMargin = element.style.marginRight; var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right'); var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
}); // Adjust navbar-toggler margin
$(navbarToggler).each(function (index, element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
}); // Adjust body padding }); // Adjust body padding
var actualPadding = document.body.style.paddingRight; var actualPadding = document.body.style.paddingRight;
@ -463,13 +455,11 @@ var Modal = function ($) {
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
$(fixedContent).each(function (index, element) { $(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right'); var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
if (typeof padding !== 'undefined') { var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
$(element).css('padding-right', padding).removeData('padding-right');
}
}); // Restore sticky content and navbar-toggler margin
var elements = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER));
$(elements).each(function (index, element) { $(elements).each(function (index, element) {
var margin = $(element).data('margin-right'); var margin = $(element).data('margin-right');
@ -479,10 +469,8 @@ var Modal = function ($) {
}); // Restore body padding }); // Restore body padding
var padding = $(document.body).data('padding-right'); var padding = $(document.body).data('padding-right');
$(document.body).removeData('padding-right');
if (typeof padding !== 'undefined') { document.body.style.paddingRight = padding ? padding : '';
$(document.body).css('padding-right', padding).removeData('padding-right');
}
}; };
_proto._getScrollbarWidth = function _getScrollbarWidth() { _proto._getScrollbarWidth = function _getScrollbarWidth() {

File diff suppressed because one or more lines are too long

7
js/dist/tooltip.js vendored
View file

@ -568,10 +568,13 @@ var Tooltip = function ($) {
} }
}; };
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
var popperInstance = popperData.instance;
this.tip = popperInstance.popper;
this._cleanTipClass(); this._cleanTipClass();
this.addAttachmentClass(this._getAttachment(data.placement)); this.addAttachmentClass(this._getAttachment(popperData.placement));
}; };
_proto._fixTransition = function _fixTransition() { _proto._fixTransition = function _fixTransition() {

File diff suppressed because one or more lines are too long