Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 - Move collapse js away from panels to cards #17171

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/src/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Collapse = (($) => {
}

const Selector = {
ACTIVES : '.panel > .in, .panel > .collapsing',
ACTIVES : '.card > .in, .card > .collapsing',
DATA_TOGGLE : '[data-toggle="collapse"]'
}

Expand Down
36 changes: 18 additions & 18 deletions js/tests/unit/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ $(function () {
assert.expect(3)
var done = assert.async()

var accordionHTML = '<div class="panel-group" id="accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
var accordionHTML = '<div class="card-group" id="accordion">'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')

var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))

Expand Down Expand Up @@ -242,12 +242,12 @@ $(function () {
assert.expect(3)
var done = assert.async()

var accordionHTML = '<div class="panel-group accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
var accordionHTML = '<div class="card-group accordion">'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')

var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent=".accordion"/>').appendTo($groups.eq(0))

Expand Down Expand Up @@ -344,12 +344,12 @@ $(function () {
assert.expect(3)
var done = assert.async()

var accordionHTML = '<div class="panel-group" id="accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
var accordionHTML = '<div class="card-group" id="accordion">'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')

var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))

Expand Down Expand Up @@ -379,11 +379,11 @@ $(function () {
var done = assert.async()

var accordionHTML = '<div id="accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="card"/>'
+ '<div class="card"/>'
+ '</div>'
var showFired = false
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')

var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))

Expand Down