Skip to content

Commit

Permalink
Fixes #14711: Account for list groups in collapsing panels
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Oct 3, 2014
1 parent e7b5c4c commit 12091b9
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 14 deletions.
3 changes: 2 additions & 1 deletion dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$active =
this.$items = null

this.options.pause == 'hover' && this.$element
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap.min.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/_includes/js/collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,28 @@ <h4 class="panel-title">
</div>
{% endhighlight %}

<p>It's also possible to swap out <code>.panel-body</code>s with <code>.list-group</code>s.</p>

<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="collapseListGroupHeading1">
<h4 class="panel-title">
<a class="collapsed" data-toggle="collapse" href="#collapseListGroup1" aria-expanded="false" aria-controls="collapseListGroup1">
Collapsible list group
</a>
</h4>
</div>
<div id="collapseListGroup1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapseListGroupHeading1">
<ul class="list-group">
<li class="list-group-item">Bootply</li>
<li class="list-group-item">One itmus ac facilin</li>
<li class="list-group-item">Second eros</li>
</ul>
<div class="panel-footer">Footer</div>
</div>
</div>
</div>

<p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.</p>
{% highlight html %}
<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo" aria-expanded="true" aria-controls="demo">
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/customize.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/assets/js/raw-files.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$active =
this.$items = null

this.options.pause == 'hover' && this.$element
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/js/bootstrap.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion less/panels.less
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,21 @@
.panel {
margin-bottom: 0;
border-radius: @panel-border-radius;

+ .panel {
margin-top: 5px;
}
}

.panel-heading {
border-bottom: 0;
+ .panel-collapse > .panel-body {

+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top: 1px solid @panel-inner-border;
}
}

.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {
Expand Down

0 comments on commit 12091b9

Please sign in to comment.