aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-08-23 13:31:56 -0700
committerMark Otto <[email protected]>2014-08-23 13:31:56 -0700
commitf36e1c467c6d3080179de69a15641e9725ce636e (patch)
tree1d30f3580c1fa3e03473df92ddcc1add7242b2b7
parent9a39ee90b4fd4d5b9b6f9a6f2c9d5a29ffeafe92 (diff)
parente3c26407827794df917f6d2d0f378cb5bf7f39e8 (diff)
downloadbootstrap-f36e1c467c6d3080179de69a15641e9725ce636e.tar.xz
bootstrap-f36e1c467c6d3080179de69a15641e9725ce636e.zip
Merge branch 'master' of github.com:twbs/bootstrap
-rw-r--r--README.md32
-rw-r--r--js/collapse.js2
-rw-r--r--js/tests/unit/collapse.js32
3 files changed, 49 insertions, 17 deletions
diff --git a/README.md b/README.md
index 9f114383c..8b6c1b83e 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,24 @@
# [Bootstrap](http://getbootstrap.com)
[![Bower version](https://badge.fury.io/bo/bootstrap.svg)](http://badge.fury.io/bo/bootstrap)
[![NPM version](https://badge.fury.io/js/bootstrap.svg)](http://badge.fury.io/js/bootstrap)
-[![Build Status](https://secure.travis-ci.org/twbs/bootstrap.svg?branch=master)](http://travis-ci.org/twbs/bootstrap)
+[![Build Status](https://secure.travis-ci.org/twbs/bootstrap.svg?branch=master)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
-Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
+Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
To get started, check out <http://getbootstrap.com>!
## Table of contents
- - [Quick start](#quick-start)
- - [Bugs and feature requests](#bugs-and-feature-requests)
- - [Documentation](#documentation)
- - [Contributing](#contributing)
- - [Community](#community)
- - [Versioning](#versioning)
- - [Creators](#creators)
- - [Copyright and license](#copyright-and-license)
+- [Quick start](#quick-start)
+- [Bugs and feature requests](#bugs-and-feature-requests)
+- [Documentation](#documentation)
+- [Contributing](#contributing)
+- [Community](#community)
+- [Versioning](#versioning)
+- [Creators](#creators)
+- [Copyright and license](#copyright-and-license)
## Quick start
@@ -86,7 +86,7 @@ Documentation for v2.3.2 has been made available for the time being at <http://g
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
-Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
+Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
@@ -96,7 +96,7 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
Keep track of development and community news.
-- Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap).
+- Follow [@twbootstrap on Twitter](https://twitter.com/twbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##twitter-bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
@@ -113,13 +113,13 @@ For transparency into our release cycle and in striving to maintain backward com
**Mark Otto**
-- <http://twitter.com/mdo>
-- <http://github.com/mdo>
+- <https://twitter.com/mdo>
+- <https://github.com/mdo>
**Jacob Thornton**
-- <http://twitter.com/fat>
-- <http://github.com/fat>
+- <https://twitter.com/fat>
+- <https://github.com/fat>
diff --git a/js/collapse.js b/js/collapse.js
index a265344f4..db89804cb 100644
--- a/js/collapse.js
+++ b/js/collapse.js
@@ -124,7 +124,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
- if (!data && options.toggle && option == 'show') option = !option
+ if (!data && options.toggle && option == 'show') options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index 8e6bb8273..ffa8f7e6d 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -102,6 +102,38 @@ $(function () {
$target.click()
})
+ test('should not close a collapse when initialized with "show" if already shown', function () {
+ stop()
+
+ expect(0)
+
+ var $test = $('<div id="test1" class="in"/>')
+ .appendTo('#qunit-fixture')
+ .on('hide.bs.collapse', function () {
+ ok(false)
+ })
+
+ $test.bootstrapCollapse('show')
+
+ setTimeout(start, 0)
+ })
+
+ test('should open a collapse when initialized with "show" if not already shown', function () {
+ stop()
+
+ expect(1)
+
+ var $test = $('<div id="test1" />')
+ .appendTo('#qunit-fixture')
+ .on('show.bs.collapse', function () {
+ ok(true)
+ })
+
+ $test.bootstrapCollapse('show')
+
+ setTimeout(start, 0)
+ })
+
test('should remove "collapsed" class from active accordion target', function () {
stop()