diff options
| author | Mark Otto <[email protected]> | 2013-12-26 19:08:34 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-12-26 19:08:34 -0800 |
| commit | ca7498faa0c0dc4f29c4d47764e88d3d277dc6f9 (patch) | |
| tree | b95817945dbc048e82d29c260507233d5a7bd6da /js | |
| parent | 567dc12e86d76fa1dd7395c4251a75068558b2de (diff) | |
| parent | cd0ad94aae42926e2bf86c2f14c6a8856c9b34ff (diff) | |
| download | bootstrap-ca7498faa0c0dc4f29c4d47764e88d3d277dc6f9.tar.xz bootstrap-ca7498faa0c0dc4f29c4d47764e88d3d277dc6f9.zip | |
Merge branch 'master' of github.com:twbs/bootstrap
Diffstat (limited to 'js')
| -rw-r--r-- | js/.jscs.json | 26 | ||||
| -rw-r--r-- | js/collapse.js | 2 | ||||
| -rw-r--r-- | js/modal.js | 4 | ||||
| -rw-r--r-- | js/popover.js | 1 | ||||
| -rw-r--r-- | js/tooltip.js | 2 |
5 files changed, 19 insertions, 16 deletions
diff --git a/js/.jscs.json b/js/.jscs.json index c4cac13de..096da217d 100644 --- a/js/.jscs.json +++ b/js/.jscs.json @@ -1,15 +1,15 @@ { - "disallowKeywords": ["with"], - "requireLeftStickedOperators": [","], - "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireLineFeedAtFileEnd": true, - "requireRightStickedOperators": ["!"], - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "validateLineBreaks": "LF" + "disallowKeywords": ["with"], + "requireLeftStickedOperators": [","], + "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], + "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireLineFeedAtFileEnd": true, + "requireRightStickedOperators": ["!"], + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "validateLineBreaks": "LF" } diff --git a/js/collapse.js b/js/collapse.js index bdd7d8547..cd8f38439 100644 --- a/js/collapse.js +++ b/js/collapse.js @@ -58,7 +58,7 @@ var complete = function () { this.$element .removeClass('collapsing') - .addClass('in') + .addClass('collapse in') [dimension]('auto') this.transitioning = 0 this.$element.trigger('shown.bs.collapse') diff --git a/js/modal.js b/js/modal.js index fe02d71d4..e74b59137 100644 --- a/js/modal.js +++ b/js/modal.js @@ -216,9 +216,9 @@ var $this = $(this) var href = $this.attr('href') var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 - var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - e.preventDefault() + if ($this.is('a')) e.preventDefault() $target .modal(option, this) diff --git a/js/popover.js b/js/popover.js index df1a43d8d..1e8104c4f 100644 --- a/js/popover.js +++ b/js/popover.js @@ -87,6 +87,7 @@ var data = $this.data('bs.popover') var options = typeof option == 'object' && option + if (!data && option == 'destroy') return if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (typeof option == 'string') data[option]() }) diff --git a/js/tooltip.js b/js/tooltip.js index 4c0e4bdcd..d491fea0e 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -362,6 +362,7 @@ } Tooltip.prototype.destroy = function () { + clearTimeout(this.timeout) this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) } @@ -377,6 +378,7 @@ var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option + if (!data && option == 'destroy') return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) |
