Bug 28058 - Move JavaScript out of columns_settings.inc into separate file
Summary: Move JavaScript out of columns_settings.inc into separate file
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28055 34913
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-30 17:21 UTC by Owen Leonard
Modified: 2024-01-17 17:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 28058: Move javascript out of columns_settings.inc into separate file (17.88 KB, patch)
2021-03-30 17:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28058: Move javascript out of columns_settings.inc into separate file (17.92 KB, patch)
2021-04-03 20:56 UTC, David Nind
Details | Diff | Splinter Review
Bug 28058: Move javascript out of columns_settings.inc into separate file (17.98 KB, patch)
2021-04-03 22:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28058: (follow-up) Make same change in the OPAC; Use "table_settings" as file name (44.24 KB, patch)
2021-04-08 12:32 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-03-30 17:21:24 UTC
Having a separate file for JavaScript makes the file cache-able and lint-able. This patch will move the <script> block (which contains no template markup) into a separate file.
Comment 1 Owen Leonard 2021-03-30 17:24:19 UTC
I'm also moving the contents of table_filters.js into the new JS file (tablesettings.js). table_filters.js contained only two functions and was only used on pages which already include columns_settings.inc.
Comment 2 Owen Leonard 2021-03-30 17:38:28 UTC Comment hidden (obsolete)
Comment 3 David Nind 2021-04-03 20:56:57 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2021-04-03 22:10:25 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2021-04-06 13:39:11 UTC
Shouldn't we also apply the changes to the OPAC?
Shouldn't the file be named table_settings.js instead?
Comment 6 Owen Leonard 2021-04-07 00:20:30 UTC
I called it "columns_settings.js" because it corresponds to "columns_settings.inc" and I thought it made sense for them to be the same. I'm happy to change it. I could also change the name of columns_settings.inc at the same time.

Anyone have preferences?

I can do the same in the OPAC but I think that can happen on another bug without holding up this one.
Comment 7 Jonathan Druart 2021-04-07 14:27:53 UTC
(In reply to Owen Leonard from comment #6)
> I called it "columns_settings.js" because it corresponds to
> "columns_settings.inc" and I thought it made sense for them to be the same.
> I'm happy to change it. I could also change the name of columns_settings.inc
> at the same time.
> 
> Anyone have preferences?

Everything should now be "tables_settings".

> I can do the same in the OPAC but I think that can happen on another bug
> without holding up this one.

For consistency I would prefer to keep both in sync. We can do it on a separate bug report but I will push them together.
Comment 8 Owen Leonard 2021-04-08 12:32:45 UTC Comment hidden (obsolete)
Comment 9 David Nind 2021-05-17 10:48:54 UTC
Patch no longer applies 8-(..