There is a new version of DataTables. I propose to incrementally replace references to the old plugin in intranet-tmpl/prog/en/lib/jquery/plugins to an upgraded version in intranet-tmpl/lib/jquery/plugins. I also propose that templates load DataTables assets via an include file which will contain our customized configuration file (intranet-tmpl/prog/en/js/datatables.js), the translatable strings contained now in datatables-strings.inc, and the main DataTables library file. This change affects a lot of files, so I plan to do this in batches, starting with Acquisitions-related templates. Once all templates have been corrected I'll remove the scripts in intranet-tmpl/prog/en/lib/jquery/plugins which are no longer needed.
Created attachment 19964 [details] [review] Bug 10649 - Upgrade DataTables and move scripts out of theme directory This patch adds an upgraded copy of the DataTables plugin to the jQuery plugin directory outside the theme directories. Copies of the old DataTables plugin scripts have been left in the old location while templates are incrementally updated. To test, visit each affected page in Acquisitions and confirm that table sorting still words correctly: - Acquisitions home - Acquisitions -> Late orders - Acquisitions -> Order search - Acquisitions -> Ordered (from table of available funds) - Acquisitions -> Spent (from table of available funds) - Acquisitions -> Vendor search - Acquisitions -> Vendor detail - Acquisitions -> Vendor -> Basket - Acquisitions -> Vendor -> Basket -> Add order from existing record -> Add order from suggestion -> Add order from subscription -> Add order from external source -> Add order from staged file - Acquisitions -> Vendor -> Basket groups - Acquisitions -> Vendor -> Uncertain prices - Acquisitions -> Vendor -> Invoices - Acquisitions -> Vendor -> Invoices -> Invoice - Acquisitions -> Vendor -> Receive shipments - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click invoice number) Also test one or more pages which have not been modified to confirm that old DataTables assets are still in place and working (ex: Circulation, Quotes editor, Saved reports, etc.)
Created attachment 19972 [details] [review] [SIGNED-OFF] Bug 10649 - Upgrade DataTables and move scripts out of theme directory This patch adds an upgraded copy of the DataTables plugin to the jQuery plugin directory outside the theme directories. Copies of the old DataTables plugin scripts have been left in the old location while templates are incrementally updated. To test, visit each affected page in Acquisitions and confirm that table sorting still words correctly: - Acquisitions home - Acquisitions -> Late orders - Acquisitions -> Order search - Acquisitions -> Ordered (from table of available funds) - Acquisitions -> Spent (from table of available funds) - Acquisitions -> Vendor search - Acquisitions -> Vendor detail - Acquisitions -> Vendor -> Basket - Acquisitions -> Vendor -> Basket -> Add order from existing record -> Add order from suggestion -> Add order from subscription -> Add order from external source -> Add order from staged file - Acquisitions -> Vendor -> Basket groups - Acquisitions -> Vendor -> Uncertain prices - Acquisitions -> Vendor -> Invoices - Acquisitions -> Vendor -> Invoices -> Invoice - Acquisitions -> Vendor -> Receive shipments - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click invoice number) Also test one or more pages which have not been modified to confirm that old DataTables assets are still in place and working (ex: Circulation, Quotes editor, Saved reports, etc.) Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
I got "YAHOO not defined" on the Receipt summary, but that's got nothing to do with this change I presume.
Owen, Could you explain why this patch adds dataTables.fnReloadAjax.js and jquery.dataTables.columnFilter.js?
(In reply to Jonathan Druart from comment #4) > Owen, Could you explain why this patch adds dataTables.fnReloadAjax.js and > jquery.dataTables.columnFilter.js? They already exist, I'm just copying them to the new location. I thought it was sensible to move them at the same time I moved the other DataTables library js even though the templates where they are used (detail.tt and quotes.tt) are not affected by this patch.
I think it is a great idea to have a dt.inc. But I disagree with the idea to duplicate files. Particularly if catalogue/detail.tt and tools/quotes.tt are not modified. I let someone else QA this patch.
Hi Owen, there is a small conflict in basketgroup.tt, but I am not sure how to solve it - could you rebase and switch back to signed off please?
Created attachment 20631 [details] [review] [SIGNED-OFF] Bug 10649 - Upgrade DataTables and move scripts out of theme directory This patch adds an upgraded copy of the DataTables plugin to the jQuery plugin directory outside the theme directories. Copies of the old DataTables plugin scripts have been left in the old location while templates are incrementally updated. To test, visit each affected page in Acquisitions and confirm that table sorting still words correctly: - Acquisitions home - Acquisitions -> Late orders - Acquisitions -> Order search - Acquisitions -> Ordered (from table of available funds) - Acquisitions -> Spent (from table of available funds) - Acquisitions -> Vendor search - Acquisitions -> Vendor detail - Acquisitions -> Vendor -> Basket - Acquisitions -> Vendor -> Basket -> Add order from existing record -> Add order from suggestion -> Add order from subscription -> Add order from external source -> Add order from staged file - Acquisitions -> Vendor -> Basket groups - Acquisitions -> Vendor -> Uncertain prices - Acquisitions -> Vendor -> Invoices - Acquisitions -> Vendor -> Invoices -> Invoice - Acquisitions -> Vendor -> Receive shipments - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click invoice number) Also test one or more pages which have not been modified to confirm that old DataTables assets are still in place and working (ex: Circulation, Quotes editor, Saved reports, etc.) Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Edit: Rebased on current master
Currently working on this.
I am almost done with testing, but the last one gives me a lot of trouble, even with the patch for 10786 applied: - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click invoice number) /cgi-bin/koha/acqui/parcel.pl?invoiceid=2 Having almost 6.000 orders in that table might factor into that. Owen, could you take a look at 10786 and that page again?
Created attachment 20714 [details] [review] [PASSED QA] Bug 10649 - Upgrade DataTables and move scripts out of theme directory This patch adds an upgraded copy of the DataTables plugin to the jQuery plugin directory outside the theme directories. Copies of the old DataTables plugin scripts have been left in the old location while templates are incrementally updated. To test, visit each affected page in Acquisitions and confirm that table sorting still words correctly: - Acquisitions home - Acquisitions -> Late orders - Acquisitions -> Order search - Acquisitions -> Ordered (from table of available funds) - Acquisitions -> Spent (from table of available funds) - Acquisitions -> Vendor search - Acquisitions -> Vendor detail - Acquisitions -> Vendor -> Basket - Acquisitions -> Vendor -> Basket -> Add order from existing record -> Add order from suggestion -> Add order from subscription -> Add order from external source -> Add order from staged file - Acquisitions -> Vendor -> Basket groups - Acquisitions -> Vendor -> Uncertain prices - Acquisitions -> Vendor -> Invoices - Acquisitions -> Vendor -> Invoices -> Invoice - Acquisitions -> Vendor -> Receive shipments - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click invoice number) Also test one or more pages which have not been modified to confirm that old DataTables assets are still in place and working (ex: Circulation, Quotes editor, Saved reports, etc.) Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Edit: Rebased on current master Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests und QA script pass. I found some smaller bugs, that also appeared on master without the patch applied. For some datatables I struggled with a result set of over 5.000 lines - there is room for improvement where a lot of data can be shown. testing notes: - Acquisitions home - Amounts don't sort correctly before and after the patch, see bug 10792. - Acquisitions -> Late orders - OK. - Acquisitions -> Order search - OK. - Acquisitions -> Ordered (from table of available funds) - OK. - Acquisitions -> Spent (from table of available funds) - OK. - Acquisitions -> Vendor detail - OK. - Acquisitions -> Vendor -> Basket - OK. - Acquisitions -> Vendor -> Basket -> Add order from existing record - Datatables seems not to be in use here? -> Add order from suggestion - OK. -> Add order from subscription - OK. -> Add order from external source - OK. -> Add order from staged file
(In reply to Katrin Fischer from comment #10) > I am almost done with testing, but the last one gives me a lot of trouble, > even with the patch for 10786 applied: > > - Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click > invoice number) > > /cgi-bin/koha/acqui/parcel.pl?invoiceid=2 > > Having almost 6.000 orders in that table might factor into that. Owen, could > you take a look at 10786 and that page again? Using smaller result set and the patch from 10786 the page tested was ok.
Pushed to master. Thanks, Owen!
Comment on attachment 20714 [details] [review] [PASSED QA] Bug 10649 - Upgrade DataTables and move scripts out of theme directory Setting back to assigned as this is an omnibus bug.
Owen, I just looked at the bugs that you marked this one as blocking. I'll leave it to you to indicate whether you want this one set back to 'pushed to master' (in which case, please open bugs for the remaining modules that need the new DataTables).
I will be opening separate bugs for the other modules, so this can be "pushed to master," thanks.
(In reply to Owen Leonard from comment #16) > I will be opening separate bugs for the other modules, so this can be > "pushed to master," thanks. Ping Galen