Commit 222eddda authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'v4-dev' into colors-redux

parents 1a23321f 16d77b4c
Showing with 68 additions and 69 deletions
+68 -69
......@@ -85,14 +85,14 @@ var Dropdown = function ($) {
placement: 'string',
offset: '(number|string)',
flip: 'boolean'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var Dropdown = function () {
function Dropdown(element, config) {
_classCallCheck(this, Dropdown);
......@@ -418,7 +418,7 @@ var Dropdown = function ($) {
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
e.stopPropagation();
}
});
/**
* ------------------------------------------------------------------------
......@@ -426,7 +426,7 @@ var Dropdown = function ($) {
* ------------------------------------------------------------------------
*/
);$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -71,14 +71,14 @@ var Modal = function ($) {
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var Modal = function () {
function Modal(element, config) {
_classCallCheck(this, Modal);
......@@ -270,8 +270,8 @@ var Modal = function ($) {
Modal.prototype._enforceFocus = function _enforceFocus() {
var _this4 = this;
$(document).off(Event.FOCUSIN // guard against infinite focus loop
).on(Event.FOCUSIN, function (event) {
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
.on(Event.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !$(_this4._element).has(event.target).length) {
_this4._element.focus();
}
......@@ -433,17 +433,17 @@ var Modal = function ($) {
var actualPadding = $(element)[0].style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + 'px');
}
});
// Adjust navbar-toggler margin
);$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
var actualMargin = $(element)[0].style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + 'px');
}
});
// Adjust body padding
);var actualPadding = document.body.style.paddingRight;
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $('body').css('padding-right');
$('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + 'px');
}
......@@ -456,18 +456,18 @@ var Modal = function ($) {
if (typeof padding !== 'undefined') {
$(element).css('padding-right', padding).removeData('padding-right');
}
}
});
// Restore navbar-toggler margin
);$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
var margin = $(element).data('margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
}
}
});
// Restore body padding
);var padding = $('body').data('padding-right');
var padding = $('body').data('padding-right');
if (typeof padding !== 'undefined') {
$('body').css('padding-right', padding).removeData('padding-right');
}
......@@ -557,7 +557,7 @@ var Modal = function ($) {
});
Modal._jQueryInterface.call($(target), config, this);
}
});
/**
* ------------------------------------------------------------------------
......@@ -565,7 +565,7 @@ var Modal = function ($) {
* ------------------------------------------------------------------------
*/
);$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -63,14 +63,14 @@ var Popover = function ($) {
FOCUSOUT: 'focusout' + EVENT_KEY,
MOUSEENTER: 'mouseenter' + EVENT_KEY,
MOUSELEAVE: 'mouseleave' + EVENT_KEY
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var Popover = function (_Tooltip) {
_inherits(Popover, _Tooltip);
......@@ -95,10 +95,10 @@ var Popover = function ($) {
};
Popover.prototype.setContent = function setContent() {
var $tip = $(this.getTipElement()
var $tip = $(this.getTipElement());
// we use append for html objects to maintain js events
);this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -64,14 +64,14 @@ var ScrollSpy = function ($) {
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var ScrollSpy = function () {
function ScrollSpy(element, config) {
var _this = this;
......@@ -236,10 +236,10 @@ var ScrollSpy = function ($) {
$link.addClass(ClassName.ACTIVE);
} else {
// Set triggered link as active
$link.addClass(ClassName.ACTIVE
$link.addClass(ClassName.ACTIVE);
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
);$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ', ' + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ', ' + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);
}
$(this._scrollElement).trigger(Event.ACTIVATE, {
......@@ -300,7 +300,7 @@ var ScrollSpy = function ($) {
var $spy = $(scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
}
});
/**
* ------------------------------------------------------------------------
......@@ -308,7 +308,7 @@ var ScrollSpy = function ($) {
* ------------------------------------------------------------------------
*/
);$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -48,14 +48,14 @@ var Tab = function ($) {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var Tab = function () {
function Tab(element) {
_classCallCheck(this, Tab);
......@@ -234,7 +234,7 @@ var Tab = function ($) {
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');
}
});
/**
* ------------------------------------------------------------------------
......@@ -242,7 +242,7 @@ var Tab = function ($) {
* ------------------------------------------------------------------------
*/
);$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME].Constructor = Tab;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -106,14 +106,14 @@ var Tooltip = function ($) {
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
var Tooltip = function () {
function Tooltip(element, config) {
_classCallCheck(this, Tooltip);
......@@ -270,13 +270,13 @@ var Tooltip = function ($) {
}
});
$(tip).addClass(ClassName.SHOW
$(tip).addClass(ClassName.SHOW);
// if this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
);if ('ontouchstart' in document.documentElement) {
if ('ontouchstart' in document.documentElement) {
$('body').children().on('mouseover', null, $.noop);
}
......@@ -330,11 +330,11 @@ var Tooltip = function ($) {
return;
}
$(tip).removeClass(ClassName.SHOW
$(tip).removeClass(ClassName.SHOW);
// if this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
);if ('ontouchstart' in document.documentElement) {
if ('ontouchstart' in document.documentElement) {
$('body').children().off('mouseover', null, $.noop);
}
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -22,9 +22,10 @@ var Util = function ($) {
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
// shoutout AngusCroll (https://goo.gl/pxwQGp)
};function toType(obj) {
// shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
}
......@@ -38,8 +39,7 @@ var Util = function ($) {
delegateType: transition.end,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments // eslint-disable-line prefer-rest-params
);
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined;
}
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -174,7 +174,7 @@
.card {
display: flex;
flex: 1 0 0;
flex: 1 0 0%;
flex-direction: column;
margin-right: $card-deck-margin;
margin-left: $card-deck-margin;
......@@ -193,7 +193,7 @@
flex-flow: row wrap;
.card {
flex: 1 0 0;
flex: 1 0 0%;
+ .card {
margin-left: 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment