Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 5bfce49

Browse files
committed
Merge release
1 parent 2751c6e commit 5bfce49

File tree

4 files changed

+42
-48
lines changed

4 files changed

+42
-48
lines changed

build/js/main.js

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@
4141
$(this).siblings('.search-field').focus().val('');
4242
});
4343

44-
$('body').on('click', function () {
45-
$('#search-field').val('');
46-
});
47-
4844
}) (jQuery, (typeof searchData === 'undefined' ? false : searchData));
4945

5046
/* ==========================================================
@@ -104,7 +100,7 @@ function carouselInit ($) {
104100
(function($) {
105101

106102
// Normal Collapse
107-
$('.collapse:not(tbody)').on('show.bs.collapse', function () {
103+
$('.collapse').on('show.bs.collapse', function () {
108104
$(this)
109105
.prev()
110106
.addClass('active icon--root')
@@ -114,7 +110,7 @@ function carouselInit ($) {
114110
'aria-expanded': 'true'
115111
});
116112
});
117-
$('.collapse:not(tbody)').on('hide.bs.collapse', function () {
113+
$('.collapse').on('hide.bs.collapse', function () {
118114
$(this)
119115
.prev()
120116
.removeClass('active icon--root')
@@ -127,25 +123,26 @@ function carouselInit ($) {
127123

128124
// Table Collapse
129125

130-
$('tbody.collapse').on('show.bs.collapse', function () {
131-
$(this)
132-
.prev().find('[data-toggle=collapse]')
133-
.addClass('active')
134-
.attr({
135-
'aria-selected': 'true',
136-
'aria-expanded': 'true'
137-
});
138-
});
139-
$('tbody.collapse').on('hide.bs.collapse', function () {
140-
$(this)
141-
.prev().find('[data-toggle=collapse]')
142-
.removeClass('active')
143-
.attr({
144-
'aria-selected': 'false',
145-
'aria-expanded': 'false'
146-
});
126+
var $tableToggle = $('th[data-toggle="collapse"], td[data-toggle="collapse"]');
127+
128+
checkCollapseTableStatus();
129+
130+
$tableToggle.click(function () {
131+
setTimeout(function(){
132+
checkCollapseTableStatus();
133+
}, 360);
147134
});
148135

136+
function checkCollapseTableStatus() {
137+
$tableToggle.each(function () {
138+
var $collapseTarget = $(this).data('target');
139+
$(this).removeClass('icon--bottom').addClass('icon--right');
140+
if($($collapseTarget).hasClass('in')){
141+
$(this).addClass('icon--bottom').removeClass('icon--right');
142+
}
143+
});
144+
}
145+
149146
}) (jQuery);
150147
/* ==========================================================
151148
* drilldown.js

build/js/main.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)