Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r--js/dist/modal.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js
index b28719be84..1929e1938d 100644
--- a/js/dist/modal.js
+++ b/js/dist/modal.js
@@ -86,12 +86,12 @@ var Modal = function ($) {
this._ignoreBackdropClick = false;
this._originalBodyPadding = 0;
this._scrollbarWidth = 0;
- } // getters
+ } // Getters
var _proto = Modal.prototype;
- // public
+ // Public
_proto.toggle = function toggle(relatedTarget) {
return this._isShown ? this.hide() : this.show(relatedTarget);
};
@@ -204,7 +204,7 @@ var Modal = function ($) {
_proto.handleUpdate = function handleUpdate() {
this._adjustDialog();
- }; // private
+ }; // Private
_proto._getConfig = function _getConfig(config) {
@@ -219,7 +219,7 @@ var Modal = function ($) {
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
- // don't move modals dom position
+ // Don't move modal's DOM position
document.body.appendChild(this._element);
}
@@ -262,9 +262,9 @@ var Modal = function ($) {
_proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
+ $(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) {
+ if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
_this4._element.focus();
}
});
@@ -485,7 +485,7 @@ var Modal = function ($) {
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
- }; // static
+ }; // Static
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
@@ -501,7 +501,7 @@ var Modal = function ($) {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error("No method named \"" + config + "\"");
+ throw new TypeError("No method named \"" + config + "\"");
}
data[config](relatedTarget);
@@ -550,7 +550,7 @@ var Modal = function ($) {
var $target = $(target).one(Event.SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
- // only register focus restorer if modal will actually get shown
+ // Only register focus restorer if modal will actually get shown
return;
}