Commit 7eb340ec authored by Jacob Thornton's avatar Jacob Thornton
Browse files

add code to reset data for collapsed element so that item can be intitialized with correct options

parent 7522517b
20 merge requests!14752.0 wip,!1403warningText and warningBackground docs fix,!985Fix id anchor javascript,!906Twipsy now respects custom classes,!873Clicking a dropdown will always toggle it,!858Bordered Arrow Mixin - updated for 2.0,!832Fix thumbnails in Built With Bootstrap,!13512.0 wip - relative font sizes,!1315[2.0-wip] Fix mustache glob when building,!1268[wip-2.0] IE 7/8 Typehead JS fix,!12362.0 wip - Fix for issue #1202,!1219Removed dotted outline on navbar dropdown menu,!1210Missing icon class from examples,!1195Fixed display of secondary container,!1090Fixed typo,!1084Default `.border-radius-custom` values,!1064Typo Fix in tables.less,!10572.0 wip,!1052Missing data attribute to close modal,!10212.0 wip
Showing with 21 additions and 15 deletions
+21 -15
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
<script src="assets/js/google-code-prettify/prettify.js"></script> <script src="assets/js/google-code-prettify/prettify.js"></script>
<script>$(function () { prettyPrint() })</script> <script>$(function () { prettyPrint() })</script>
<script src="../js/bootstrap-transition.js"></script> <script src="../js/bootstrap-transition.js"></script>
<script src="../js/bootstrap-alerts.js"></script> <script src="../js/bootstrap-alert.js"></script>
<script src="../js/bootstrap-modal.js"></script> <script src="../js/bootstrap-modal.js"></script>
<script src="../js/bootstrap-dropdown.js"></script> <script src="../js/bootstrap-dropdown.js"></script>
<script src="../js/bootstrap-scrollspy.js"></script> <script src="../js/bootstrap-scrollspy.js"></script>
<script src="../js/bootstrap-tab.js"></script> <script src="../js/bootstrap-tab.js"></script>
<script src="../js/bootstrap-twipsy.js"></script> <script src="../js/bootstrap-twipsy.js"></script>
<script src="../js/bootstrap-popover.js"></script> <script src="../js/bootstrap-popover.js"></script>
<script src="../js/bootstrap-buttons.js"></script> <script src="../js/bootstrap-button.js"></script>
<script src="../js/bootstrap-collapse.js"></script> <script src="../js/bootstrap-collapse.js"></script>
<script> <script>
$(function () { $(function () {
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<td>Our Modal plugin is a <strong>super</strong> slim take on the traditional modal js plugin! We took special care to include only the bare functionality that we require at twitter.</td> <td>Our Modal plugin is a <strong>super</strong> slim take on the traditional modal js plugin! We took special care to include only the bare functionality that we require at twitter.</td>
</tr> </tr>
<tr> <tr>
<td><a href="./javascript.html#alerts">bootstrap-alerts.js</a></td> <td><a href="./javascript.html#alert">bootstrap-alert.js</a></td>
<td>The alert plugin is a super tiny class for adding close functionality to alerts.</td> <td>The alert plugin is a super tiny class for adding close functionality to alerts.</td>
</tr> </tr>
<tr> <tr>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<td>The popover plugin provides a simple interface for adding popovers to your application. It extends the <a href="#twipsy">boostrap-twipsy.js</a> plugin, so be sure to grab that file as well when including popovers in your project!</td> <td>The popover plugin provides a simple interface for adding popovers to your application. It extends the <a href="#twipsy">boostrap-twipsy.js</a> plugin, so be sure to grab that file as well when including popovers in your project!</td>
</tr> </tr>
<tr> <tr>
<td><a href="./javascript.html#buttons">bootstrap-buttons.js</a></td> <td><a href="./javascript.html#button">bootstrap-button.js</a></td>
<td>This plugin offers additional functionality for managing button state.</td> <td>This plugin offers additional functionality for managing button state.</td>
</tr> </tr>
<tr> <tr>
...@@ -716,12 +716,12 @@ $('a[data-toggle="tab"]').bind('shown', function (e) { ...@@ -716,12 +716,12 @@ $('a[data-toggle="tab"]').bind('shown', function (e) {
</section> </section>
<!-- Alerts <!-- Alert
================================================== --> ================================================== -->
<section id="alerts"> <section id="alert">
<div class="page-header"> <div class="page-header">
<h1>Alerts <small>bootstrap-alerts.js</small></h1> <h1>Alert <small>bootstrap-alert.js</small></h1>
</div> </div>
<div class="row"> <div class="row">
<div class="span3 columns"> <div class="span3 columns">
...@@ -757,20 +757,20 @@ $('a[data-toggle="tab"]').bind('shown', function (e) { ...@@ -757,20 +757,20 @@ $('a[data-toggle="tab"]').bind('shown', function (e) {
</section> </section>
<!-- Buttons <!-- Button
================================================== --> ================================================== -->
<section id="buttons"> <section id="button">
<div class="page-header"> <div class="page-header">
<h1>Buttons <small>bootstrap-buttons.js</small></h1> <h1>Button <small>bootstrap-button.js</small></h1>
</div> </div>
<div class="row"> <div class="row">
<div class="span3 columns"> <div class="span3 columns">
<p>This plugin offers additional functionality for managing button state.</p> <p>This plugin offers additional functionality for managing button state.</p>
<a href="../js/bootstrap-buttons.js" target="_blank" class="btn primary">Download</a> <a href="../js/bootstrap-button.js" target="_blank" class="btn primary">Download</a>
</div> </div>
<div class="span9 columns"> <div class="span9 columns">
<h3>Using bootstrap-buttons.js</h3> <h3>Using bootstrap-button.js</h3>
<pre class="prettyprint linenums">$('.tabs').button()</pre> <pre class="prettyprint linenums">$('.tabs').button()</pre>
<h3>Markup</h3> <h3>Markup</h3>
<p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p> <p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
......
/* ========================================================== /* ==========================================================
* bootstrap-alerts.js v2.0.0 * bootstrap-alert.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts * http://twitter.github.com/bootstrap/javascript.html#alerts
* ========================================================== * ==========================================================
* Copyright 2011 Twitter, Inc. * Copyright 2011 Twitter, Inc.
......
File moved
...@@ -42,8 +42,14 @@ ...@@ -42,8 +42,14 @@
, show: function () { , show: function () {
var dimension = this.dimension() var dimension = this.dimension()
, scroll = $.camelCase(['scroll', dimension].join('-')) , scroll = $.camelCase(['scroll', dimension].join('-'))
, actives = this.$parent && this.$parent.find('.in')
this.$parent && this.$parent.find('.in').collapse('hide') , hasData
if (actives && actives.length) {
hasData = actives.data('collapse')
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0) this.$element[dimension](0)
this.transition('addClass', 'show', 'shown') this.transition('addClass', 'show', 'shown')
......
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