]> git.koha-community.org Git - koha.git/commit
Bug 20260: Use CodeMirror for the SQL reports editor
authorOwen Leonard <oleonard@myacpl.org>
Wed, 10 Oct 2018 16:44:10 +0000 (16:44 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 12 Oct 2018 18:50:39 +0000 (15:50 -0300)
commit56ab53702013f36c7f174e1a219b7b450098412a
treeae16c107137014f58960b4631b1ff10de8cfe674
parentbe4f22f5a0745ef64c6bf20b89bd9f4fcbe40403
Bug 20260: Use CodeMirror for the SQL reports editor

This patch adds CodeMirror syntax highlighting to the SQL reports
editor. Newly added is a file containing the sql-specific syntax
highlighting code, in both compressed and uncompressed versions.

Unrelated changes:

 - Some JavaScript has been moved from inside the body of the page to
   the footer.
 - Paths to some assets have been corrected to no use relative paths.

To test, apply the patch and go to Reports -> Saved SQL reports

- Edit an existing report and confirm that the SQL is correctly
  highlighted and that there are no display problems when editing.
- Confirm that changes are saved successfully.
- Perform the same test when creating a new SQL report.
- View an existing report and confirm that the SQL is syntax-highlighted
  but is read-only.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/lib/codemirror/sql.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/codemirror/sql.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt