]> git.koha-community.org Git - koha.git/commit
Bug 22660: (follow-up) Improve asset handling, add linting
authorOwen Leonard <oleonard@myacpl.org>
Thu, 23 Jul 2020 17:58:22 +0000 (17:58 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 6 Aug 2020 20:24:06 +0000 (20:24 +0000)
commitfa7f9049cae584c5065e9a84b360aa6256540b42
tree713d06543a439d83672bd7c0b15152e655bb6b7e
parentfb0c35650c59a9bbe420d016a3f169b71c578fee
Bug 22660: (follow-up) Improve asset handling, add linting

This patch makes some changes to the way assets are included based on
the value of the system preferece in order to minimize unnecessary
JavaScript includes.

The patch also adds HTML syntax-highlighting and linting like we have in
the system preferences editor.

Removed are two JS files which were not required.

To test, apply the patch and set the NewsToolEditor preference to
"CodeMirror."

 - Edit a news item and confirm that the contents of the
   editor show HTML syntax highlighting.
 - Test HTML linting by adding some malformed HTML (missing closing tag,
   for instance). The error should be highlighted.
 - Set the NewsToolEditor to "TinyMCE" and confirm that WYSIWYG editing
   still works correctly.

https://bugs.koha-community.org/show_bug.cgi?id=22600

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5bec404420c6dd9251b511d12e2425e5a6039a95)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt