0001-JS-add-events-cell-open-cell-close-53780.patch
combo/manager/static/js/combo.manager.js | ||
---|---|---|
347 | 347 |
}); |
348 | 348 | |
349 | 349 |
$('div.cell').each(function(i, x) { |
350 |
compute_max_height($(this)); |
|
351 |
if (window.location.hash == '#' + $(this).attr('id')) { |
|
352 |
$(this).addClass('toggled'); |
|
350 |
const $cell = $(this); |
|
351 |
compute_max_height($cell); |
|
352 |
if (window.location.hash == '#' + $cell.attr('id')) { |
|
353 |
$cell.addClass('toggled'); |
|
353 | 354 |
} else { |
354 |
$(this).addClass('untoggled');
|
|
355 |
$cell.addClass('untoggled');
|
|
355 | 356 |
} |
357 | ||
358 |
const $animated = $cell.find('h3 + div'); |
|
359 |
$animated.on('transitionend', function(el){ |
|
360 |
if ($cell.is(".toggled")) { |
|
361 |
$cell.trigger("cell:open"); |
|
362 |
} |
|
363 |
if ($cell.is(".untoggled")) { |
|
364 |
$cell.trigger("cell:close"); |
|
365 |
} |
|
366 |
}) |
|
356 | 367 |
}); |
357 | 368 | |
358 | 369 |
function show_asset($elem) { |
359 |
- |