Skip to content

Commit

Permalink
Fix js foldable in tree view for dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Jan 6, 2025
1 parent d3caa5c commit 6292902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Resources/public/js/generalDriver_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ var BackendGeneral =
item.setStyle('display', 'inline');
image.src = image.src.replace('folPlus.svg', 'folMinus.svg');
$(el).store('tip:title', Contao.lang.collapse);
$(el).addClass('foldable--open');
new Request.Contao({url: data.url, field: el}).post(data);
} else {
item.setStyle('display', 'none');
image.src = image.src.replace('folMinus.svg', 'folPlus.svg');
$(el).store('tip:title', Contao.lang.expand);
$(el).removeClass('foldable--open');
new Request.Contao({url: data.url, field: el}).post(data);
}
return false;
Expand Down Expand Up @@ -84,6 +86,7 @@ var BackendGeneral =

$(el).store('tip:title', Contao.lang.collapse);
image.src = image.src.replace('folPlus.svg', 'folMinus.svg');
$(el).addClass('foldable--open');
window.fireEvent('structure');
AjaxRequest.hideBox();

Expand Down

0 comments on commit 6292902

Please sign in to comment.