Bug 15285

Summary: Upgrade DataTables to 1.10.10 or later
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, jonathan.druart, julian.maurice, kyle, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15916
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 15471, 16177    
Attachments: Bug 15285: Upgrade DataTables to 1.10.10
Bug 15285: Update common files
Bug 15285: POC with currency.tt
Bug 15285: Update common files
Bug 15285: Update for 3 specific tables
Screenshots table 'All funds'
Bug 15285: Fix conflict with the treetable plugin
Bug 15285: Upgrade DataTables to 1.10.10
Bug 15285: Update common files
Bug 15285: Update for 3 specific tables
Bug 15285: Fix conflict with the treetable plugin
Bug 15285: Upgrade DataTables to 1.10.10
Bug 15285: Update common files
Bug 15285: Update for 3 specific tables
Bug 15285: Fix conflict with the treetable plugin

Description Owen Leonard 2015-12-02 17:26:37 UTC
As of today DataTables is at version 1.10.10. The current version DataTables and its associated plugins (colVis, columnFilter, rowGrouping) blocks upgrade of jQuery from 1.7.x because the colVis plugin uses jQuery features which were deprecated in 1.7.x and removed in 1.11.x.

The DataTables ColVis plugin is now "retired:"

http://datatables.net/extensions/colvis/

...and the functionality moved into "buttons:"

http://datatables.net/reference/button/colvis
Comment 1 Katrin Fischer 2015-12-13 22:01:23 UTC
Can someone tell yet how bad of a rewrite this will cause?
Comment 2 Jonathan Druart 2015-12-14 12:22:05 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-12-14 12:22:08 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-12-14 12:22:13 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-12-14 12:22:32 UTC
(In reply to Katrin Fischer from comment #1)
> Can someone tell yet how bad of a rewrite this will cause?

Looks quite easy.
Comment 6 Katrin Fischer 2015-12-14 12:35:51 UTC
Glad to hear that :)
Comment 7 Marc Véron 2016-01-06 10:29:55 UTC
Tested, works with currency table and with Bug 15471. 

Status is "New" at the moment, does it need Sign-off or are there updates to come?
Comment 8 Jonathan Druart 2016-01-11 12:39:06 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2016-01-11 12:39:12 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2016-01-11 12:39:54 UTC
I let CSS experts modify the style of the new button :)
Comment 11 Marc Véron 2016-01-15 06:12:35 UTC
Created attachment 46683 [details]
Screenshots table 'All funds'

With patch the table "All funds" looks weird.
Comment 12 Jonathan Druart 2016-01-15 10:03:31 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2016-01-15 10:03:55 UTC
(In reply to Marc Véron from comment #11)
> Created attachment 46683 [details]
> Screenshots table 'All funds'
> 
> With patch the table "All funds" looks weird.

Thanks, good catch!
Comment 14 Marc Véron 2016-01-25 15:17:30 UTC Comment hidden (obsolete)
Comment 15 Marc Véron 2016-01-25 15:18:34 UTC Comment hidden (obsolete)
Comment 16 Marc Véron 2016-01-25 15:22:38 UTC Comment hidden (obsolete)
Comment 17 Marc Véron 2016-01-25 15:23:42 UTC Comment hidden (obsolete)
Comment 18 Kyle M Hall (khall) 2016-02-05 12:13:40 UTC
Created attachment 47688 [details] [review]
Bug 15285: Upgrade DataTables to 1.10.10

The ColVis DataTables plugin is now retired.
We need to upgrade the plugin to 1.10.10 and use the column visibility
module for Buttons.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Kyle M Hall (khall) 2016-02-05 12:13:48 UTC
Created attachment 47689 [details] [review]
Bug 15285: Update common files

This patch moves the Button area all tables which does not redefine the
dom/sDom DT parameter.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 20 Kyle M Hall (khall) 2016-02-05 12:13:50 UTC
Created attachment 47690 [details] [review]
Bug 15285: Update for 3 specific tables

The checkouts, currency and items lost tables redefine the dom/sDom and
the older C(olvis) should be replaced with the current B(utton).

Test plan:
To test the whole patch set, you will have to test the 4 tables impacted
by this patch as well as the others using the columns settings.

The additem has specific code and should be tested keeping that in mind.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 21 Kyle M Hall (khall) 2016-02-05 12:13:53 UTC
Created attachment 47691 [details] [review]
Bug 15285: Fix conflict with the treetable plugin

The tables using the treetable plugin don't display correctly (with JS
error).
The lazy way to fix it is to redefine the dom of the table and remove
the button area (B).

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 22 Brendan Gallagher 2016-02-24 00:04:15 UTC
pushed to Master - Should be in the May 2016 Release. Thanks
Comment 23 Julian Maurice 2016-02-26 13:14:55 UTC
More an enhancement than a bug, changing severity