1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-31 09:05:47 +02:00

Drop the accordion for the panel

* Deletes the accordion.less file
* Extends the panel to be collapsible with our JS plugin
* Supports panel color variations
This commit is contained in:
Mark Otto
2013-08-12 23:36:25 -07:00
parent 54a3e4b780
commit 237640c706
11 changed files with 231 additions and 112 deletions

View File

@@ -2589,7 +2589,6 @@ a.list-group-item:focus {
}
.panel {
padding: 15px;
margin-bottom: 20px;
background-color: #ffffff;
border: 1px solid #dddddd;
@@ -2598,8 +2597,12 @@ a.list-group-item:focus {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.panel-body {
padding: 15px;
}
.panel .list-group {
margin: 15px -15px -15px;
margin-bottom: 0;
}
.panel .list-group .list-group-item {
@@ -2615,17 +2618,12 @@ a.list-group-item:focus {
border-bottom: 0;
}
.panel-heading + .list-group {
margin-top: -15px;
}
.panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0;
}
.panel-heading {
padding: 10px 15px;
margin: -15px -15px 15px;
background-color: #f5f5f5;
border-bottom: 1px solid #dddddd;
border-top-right-radius: 3px;
@@ -2644,13 +2642,38 @@ a.list-group-item:focus {
.panel-footer {
padding: 10px 15px;
margin: 15px -15px -15px;
background-color: #f5f5f5;
border-top: 1px solid #dddddd;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
.panel-group .panel {
margin-bottom: 0;
overflow: hidden;
border-radius: 4px;
}
.panel-group .panel + .panel {
margin-top: 5px;
}
.panel-group .panel-heading {
border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse .panel-body {
border-top: 1px solid #dddddd;
}
.panel-group .panel-footer {
border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
border-bottom: 1px solid #dddddd;
}
.panel-primary {
border-color: #428bca;
}
@@ -2661,6 +2684,14 @@ a.list-group-item:focus {
border-color: #428bca;
}
.panel-primary .panel-heading + .panel-collapse .panel-body {
border-top-color: #428bca;
}
.panel-primary .panel-footer + .panel-collapse .panel-body {
border-bottom-color: #428bca;
}
.panel-success {
border-color: #d6e9c6;
}
@@ -2671,6 +2702,14 @@ a.list-group-item:focus {
border-color: #d6e9c6;
}
.panel-success .panel-heading + .panel-collapse .panel-body {
border-top-color: #d6e9c6;
}
.panel-success .panel-footer + .panel-collapse .panel-body {
border-bottom-color: #d6e9c6;
}
.panel-warning {
border-color: #fbeed5;
}
@@ -2681,6 +2720,14 @@ a.list-group-item:focus {
border-color: #fbeed5;
}
.panel-warning .panel-heading + .panel-collapse .panel-body {
border-top-color: #fbeed5;
}
.panel-warning .panel-footer + .panel-collapse .panel-body {
border-bottom-color: #fbeed5;
}
.panel-danger {
border-color: #eed3d7;
}
@@ -2691,6 +2738,14 @@ a.list-group-item:focus {
border-color: #eed3d7;
}
.panel-danger .panel-heading + .panel-collapse .panel-body {
border-top-color: #eed3d7;
}
.panel-danger .panel-footer + .panel-collapse .panel-body {
border-bottom-color: #eed3d7;
}
.panel-info {
border-color: #bce8f1;
}
@@ -2701,6 +2756,14 @@ a.list-group-item:focus {
border-color: #bce8f1;
}
.panel-info .panel-heading + .panel-collapse .panel-body {
border-top-color: #bce8f1;
}
.panel-info .panel-footer + .panel-collapse .panel-body {
border-bottom-color: #bce8f1;
}
.well {
min-height: 20px;
padding: 19px;

File diff suppressed because one or more lines are too long

View File

@@ -539,7 +539,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var actives = this.$parent && this.$parent.find('> .accordion-group > .in')
var actives = this.$parent && this.$parent.find('> .panel > .in')
if (actives && actives.length) {
var hasData = actives.data('bs.collapse')

File diff suppressed because one or more lines are too long