]> git.koha-community.org Git - koha.git/commit
Bug 37697: use shadow DOM for additional contents preview
authorDavid Cook <dcook@prosentient.com.au>
Wed, 21 Aug 2024 05:58:59 +0000 (05:58 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 29 Aug 2024 15:24:04 +0000 (17:24 +0200)
commit92ec49fca4ba94f55697920b8a02b32e1312253e
tree843fb17434cb5bc630def874ac4a387db7801c74
parentdf1ec831bfc33e3ef46cce5afaef04abebc4f886
Bug 37697: use shadow DOM for additional contents preview

This change uses the declarative HTML style of Shadow DOM
to encapsulate the additional contents preview so that they don't
affect the main Koha page.

Test plan:
0. Create opacheader with following content:
<style>* { background-color: red }</style>
<p>This is awesome</p>
1. Note that most background-color in /cgi-bin/koha/tools/additional-contents.pl
is now red
2. Click "Preview content" for "opacheader"
3. Note that the background-color of the "p" in "opacheader" is red

4. Apply the patch

5. Refresh the page at /cgi-bin/koha/tools/additional-contents.pl
6. Note that the background-color is normal again
7. Click "Preview content for "opacheader"
8. Note that the background-color of the "p" in "opacheader" is red

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt