[Bug 28058] New: Move javascript out of columns_settings.inc into separate file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Bug ID: 28058 Summary: Move javascript out of columns_settings.inc into separate file Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 28055 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. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28055 [Bug 28055] Convert DataTables option names to current version -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 119024 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119024&action=edit Bug 28058: Move javascript out of columns_settings.inc into separate file This patch moves the JavaScript contained in a <script> block inside columns_settings.inc into a separate file. The new JavaScript file, tablesettings.js, contains some corrections to minor errors highlighted by eslint (missing semicolons, undeclared variables, etc). I'm also moving the contents of table_filters.js into tablesettings.js and removing table_filters.js. I don't think it necessary to have a whole separate JS file which is only used on pages which already include columns_settings.inc. To test, apply the patch and perform a catalog search in the staff client. - On the bibliographic detail page, confirm that the table of holdings still works correctly: Sorting, search, column filters, and export. - Confirm that clicking the "Activate filters" control activates the filter fields at the top of each table column. - Go to Reports -> Lost items and perform the same tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119024|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 119163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119163&action=edit Bug 28058: Move javascript out of columns_settings.inc into separate file This patch moves the JavaScript contained in a <script> block inside columns_settings.inc into a separate file. The new JavaScript file, tablesettings.js, contains some corrections to minor errors highlighted by eslint (missing semicolons, undeclared variables, etc). I'm also moving the contents of table_filters.js into tablesettings.js and removing table_filters.js. I don't think it necessary to have a whole separate JS file which is only used on pages which already include columns_settings.inc. To test, apply the patch and perform a catalog search in the staff client. - On the bibliographic detail page, confirm that the table of holdings still works correctly: Sorting, search, column filters, and export. - Confirm that clicking the "Activate filters" control activates the filter fields at the top of each table column. - Go to Reports -> Lost items and perform the same tests. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119163|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 119165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119165&action=edit Bug 28058: Move javascript out of columns_settings.inc into separate file This patch moves the JavaScript contained in a <script> block inside columns_settings.inc into a separate file. The new JavaScript file, tablesettings.js, contains some corrections to minor errors highlighted by eslint (missing semicolons, undeclared variables, etc). I'm also moving the contents of table_filters.js into tablesettings.js and removing table_filters.js. I don't think it necessary to have a whole separate JS file which is only used on pages which already include columns_settings.inc. To test, apply the patch and perform a catalog search in the staff client. - On the bibliographic detail page, confirm that the table of holdings still works correctly: Sorting, search, column filters, and export. - Confirm that clicking the "Activate filters" control activates the filter fields at the top of each table column. - Go to Reports -> Lost items and perform the same tests. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Shouldn't we also apply the changes to the OPAC? Shouldn't the file be named table_settings.js instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |ASSIGNED --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- 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 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 119321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119321&action=edit Bug 28058: (follow-up) Make same change in the OPAC; Use "table_settings" as file name This patch moves the JavaScript contained in a <script> block inside columns_settings.inc in the OPAC into a separate file. The new JavaScript file, table_settings.js, contains some corrections to minor errors highlighted by eslint (missing semicolons, undeclared variables, etc). This patch also moves template include files and corresponding JavaScript files to the name "table_settings" instead of "columns_settings." Updated are all files where "columns_settings.inc" was referenced. To test, apply the patch and test pages in the OPAC and staff interface that use the table_settings include file, e.g. Staff interface: - Administration -> Libraries - Circulation -> Check out OPAC: - Course reserves - Logged in patron -> "Your summary" In all cases DataTable should display correctly, with all associated controls. Changes made to the tables' configuration via 'Administration -> Table settings' should be reflected in the corresponding page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |david@davidnind.com --- Comment #9 from David Nind <david@davidnind.com> --- Patch no longer applies 8-(.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move javascript out of |Move JavaScript out of |columns_settings.inc into |columns_settings.inc into |separate file |separate file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119165|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119321|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |34913 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Bug 28058 depends on bug 34913, which changed state. Bug 34913 Summary: Upgrade DataTables from 1.10.18 to 1.13.6 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34913 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Bug 28058 depends on bug 34913, which changed state. Bug 34913 Summary: Upgrade DataTables from 1.10.18 to 1.13.6 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34913 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Bug 28058 depends on bug 34913, which changed state. Bug 34913 Summary: Upgrade DataTables from 1.10.18 to 1.13.6 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34913 What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28058 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|ASSIGNED |RESOLVED --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- *** This bug has been marked as a duplicate of bug 26553 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org