Commit 83cb97f6 authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - fixed codemirror bug design when parent is hidden onload

parent 57702748
...@@ -36,6 +36,17 @@ ...@@ -36,6 +36,17 @@
'Limitless::CardStop' => 'cardStop', 'Limitless::CardStop' => 'cardStop',
]; ];
public $assetAllocation;
public function __construct()
{
$this->assetAllocation = [
'Limitless::CardStart' => [
'card.js'
]
];
}
/* /*
|-------------------------------------------------------------------------------------------- |--------------------------------------------------------------------------------------------
......
$(document).ready(function() {
// Refresh codemirror elements.
// card collapse on click
$('.card [data-action=collapse]:not(.disabled)').on('click', function () {
let cardParent = $(this).parents('.card');
// check if parent is not collapsed.
if(!cardParent.hasClass('card-collapsed')) {
// loop on codemirror elements inside the card.
$(cardParent).find('.CodeMirror').each(function(i, el){
el.CodeMirror.refresh();
});
}
})
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment