Commit 5e928c7c authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'v4' of https://github.com/twbs/derpstrap into v4

parents a0ae458a 7ba24450
Showing with 232 additions and 239 deletions
+232 -239
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -32,7 +32,7 @@ var Tab = (function ($) { ...@@ -32,7 +32,7 @@ var Tab = (function ($) {
HIDDEN: 'hidden' + EVENT_KEY, HIDDEN: 'hidden' + EVENT_KEY,
SHOW: 'show' + EVENT_KEY, SHOW: 'show' + EVENT_KEY,
SHOWN: 'shown' + EVENT_KEY, SHOWN: 'shown' + EVENT_KEY,
CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
}; };
var ClassName = { var ClassName = {
...@@ -67,6 +67,14 @@ var Tab = (function ($) { ...@@ -67,6 +67,14 @@ var Tab = (function ($) {
this._element = element; this._element = element;
} }
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
// getters
_createClass(Tab, [{ _createClass(Tab, [{
key: 'show', key: 'show',
...@@ -142,11 +150,11 @@ var Tab = (function ($) { ...@@ -142,11 +150,11 @@ var Tab = (function ($) {
$.removeClass(this._element, DATA_KEY); $.removeClass(this._element, DATA_KEY);
this._element = null; this._element = null;
} }
}, {
key: '_activate',
// private // private
}, {
key: '_activate',
value: function _activate(element, container, callback) { value: function _activate(element, container, callback) {
var active = $(container).find(Selector.ACTIVE_CHILD)[0]; var active = $(container).find(Selector.ACTIVE_CHILD)[0];
var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]);
...@@ -211,19 +219,11 @@ var Tab = (function ($) { ...@@ -211,19 +219,11 @@ var Tab = (function ($) {
callback(); callback();
} }
} }
}], [{
key: 'VERSION',
// getters
get: function () {
return VERSION;
}
}, {
key: '_jQueryInterface',
// static // static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) { value: function _jQueryInterface(config) {
return this.each(function () { return this.each(function () {
var $this = $(this); var $this = $(this);
...@@ -239,17 +239,16 @@ var Tab = (function ($) { ...@@ -239,17 +239,16 @@ var Tab = (function ($) {
} }
}); });
} }
}, {
key: 'VERSION',
get: function get() {
return VERSION;
}
}]); }]);
return Tab; return Tab;
})(); })();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
Tab._jQueryInterface.call($(this), 'show'); Tab._jQueryInterface.call($(this), 'show');
...@@ -270,4 +269,4 @@ var Tab = (function ($) { ...@@ -270,4 +269,4 @@ var Tab = (function ($) {
return Tab; return Tab;
})(jQuery); })(jQuery);
//# sourceMappingURL=tab.js.map //# sourceMappingURL=tab.js.map
\ No newline at end of file
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -313,7 +313,7 @@ const Modal = (($) => { ...@@ -313,7 +313,7 @@ const Modal = (($) => {
$(this._backdrop).addClass(animate) $(this._backdrop).addClass(animate)
} }
$(this._backdrop).appendTo(this.$body) $(this._backdrop).appendTo(document.body)
$(this._element).on(Event.CLICK_DISMISS, (event) => { $(this._element).on(Event.CLICK_DISMISS, (event) => {
if (this._ignoreBackdropClick) { if (this._ignoreBackdropClick) {
......
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