[Bug 9294] New: Move JavaScript out of circulation template
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Bug ID: 9294 Summary: Move JavaScript out of circulation template Classification: Unclassified 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 Depends on: 9283 I would like to start working harder to keep JavaScript separated from the templates. I hope that in doing so we can have JavaScript which is more easily cached by the browser, more testable, and potentially able to be minified and/or concatenated with other JS files. To that end I have begun moving JavaScript out of the circulation template into a page-specific file, circulation.js. I hope that further improvements can be made, perhaps by moving some of the template variables required by the template into HTML5 data- attributes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 14154 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14154&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work - With checkout exports enabled, warnings should be displayed if you have no checkouts selected, or if you try to export as CSV and have no CSV profile specified in your ExportWithCsvProfile. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Sorry, meant to point out: This patch depends on the one for Bug 9283. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14154|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 14251 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14251&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work - With checkout exports enabled, warnings should be displayed if you have no checkouts selected, or if you try to export as CSV and have no CSV profile specified in your ExportWithCsvProfile. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Oops sorry, this bug depends on Bug 9283 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- I prefer to wait before passing qa on this patch. It depends on another one not already pushed and it interferes with Bug 9289. On rebasing, we won't forget to uncomment this line! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14251|0 |1 is obsolete| | --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 14417 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14417&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work - With checkout exports enabled, warnings should be displayed if you have no checkouts selected, or if you try to export as CSV and have no CSV profile specified in your ExportWithCsvProfile. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Fixed conflict with Bug 9289. Still waiting on Bug 9283, on which this patch depends. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: If ExportRemoveFields is filled and no csv profile defined in ExportWithCsvProfile, the csv choice appears in the dropdown list but does not work. I think we should remove it from the list if no profile is defined. Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 16127 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16127&action=edit Bug 9294: Followup FIX csv choice for export If ExportRemoveFields is filled and no csv profile defined in ExportWithCsvProfile, the csv choice appears in the dropdown list but does not work. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- I think this quick followup fixes the issue, could you confirm? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16127|0 |1 is obsolete| | --- Comment #13 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 16303 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16303&action=edit Bug 9294 [Follow-up] Move JavaScript out of circulation template This patch corrects a JavaScript error in the original patch caused by an incorrectly named variable. Instead of correcting the name I'm removing the error-handling around missing CSV profiles alltogether in favor of Jonathan's suggestion to simply hide the CSV option if no formats are specified. To test this follow-up perform exports of checkouts with ExportRemoveFields filled and with ExportWithCsvProfile both empty and not empty. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Owen, the first patch does not apply fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt). Could your rebase it please? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #14)
Owen, the first patch does not apply fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt). Could your rebase it please?
In fact it is the second one! fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #16 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 20382 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20382&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Campbell Reid-Tait <campbellreidtait@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20382|0 |1 is obsolete| | Status|Needs Signoff |Signed Off CC| |campbellreidtait@gmail.com Assignee|oleonard@myacpl.org |campbellreidtait@gmail.com --- Comment #17 from Campbell Reid-Tait <campbellreidtait@gmail.com> --- Created attachment 20684 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20684&action=edit SIGNED OFF: Bug-9294-Move-JavaScript-out-of-circulation-template.patch Bug 9294 - Move JavaScript out of circulation template (14.29 KB, patch) 2013-01-04 14:11 UTC, Owen Leonard and Bug 9294 [Follow-up] Move JavaScript out of circulation template (3.16 KB, patch) 2013-03-18 18:26 UTC, Owen Leonard were unable to be applied error fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 9294 - Move JavaScript out of circulation template -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Campbell Reid-Tait <campbellreidtait@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|campbellreidtait@gmail.com |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16303|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14417|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20684|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21090 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21090&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21090|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21091 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21091&action=edit Bug 9294 - Move JavaScript out of circulation template This patch creates a new js file, js/pages/circulation.js, and begins the process of moving JavaScript into it from circulation.tt. I have started the process by focusing on sections which are least dependent on template variables. To test, load a patron for checkout who has something checked out. There should be no JavaScript errors: - Tabs should work. - Showing and hiding the "Add message" form should work. - The "specify due date" datepicker should work. - Controls for selecting checkboxes in the checkouts table should work Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Just found a weird behavior with checkboxes in the checkouts table, but still exists on master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #20 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Jonathan Druart from comment #19)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Just found a weird behavior with checkboxes in the checkouts table, but still exists on master.
Arg! It is weird on master, but much more with this patch. With this patch, checkboxes can be all checked together. Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 --- Comment #21 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21092 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21092&action=edit Bug 9294: Followup : add missing lines. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #22 from Jonathan Druart <jonathan.druart@biblibre.com> --- Found, 2 lines were missing in the js file. Now we have the same behavior as master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10884 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #23 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9294 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.8. It is needed for 10884. Thanks Owen! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org