Bug 12105

Summary: Remove duplicated plugin jquery.dataTables.columnFilter.js
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, mtompset
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js
[SIGNED OFF] Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js
Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js

Description Owen Leonard 2014-04-17 19:17:16 UTC
There are copies of the DataTables plugin jquery.dataTables.columnFilter.js in both intranet-tmpl/lib/jquery/plugins and intranet-tmpl/prog/en/lib/jquery/plugins. The only one we should have is the one outside translated templates.
Comment 1 Owen Leonard 2014-04-17 19:40:32 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2014-04-21 19:55:57 UTC
$ grep jquery.dataTables.columnFilter.js `find .` | cut -f1 -d':'
Binary file ./.git/index matches
./koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.dataTables.columnFilter.js
./koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
./koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
./koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
./koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.columnFilter.js
./koha-tmpl/intranet-tmpl/prog/fr-FR/modules/acqui/parcel.tt
./koha-tmpl/intranet-tmpl/prog/fr-FR/modules/tools/manage-marc-import.tt
./koha-tmpl/intranet-tmpl/prog/fr-FR/modules/catalogue/detail.tt
./koha-tmpl/intranet-tmpl/prog/fr-FR/lib/jquery/plugins/jquery.dataTables.columnFilter.js

The fr-FR template files will be regenerated from en template files, so they can be ignored.

There are two copies of the same file, and yes the non-language version should be used.

./koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt uses the [% interface %] version, which is the correct one.

./koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt loads the javascript file, but does not use it.
Comment 3 Mark Tompsett 2014-04-21 20:27:20 UTC
One question. Is Order Line supposed to sort string-based and not numerically?
Comment 4 Mark Tompsett 2014-04-21 22:21:18 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-04-22 15:59:30 UTC
Created attachment 27426 [details] [review]
Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js

This patch removes a redundant copy of the DataTables plugin
jquery.dataTables.columnFilter.js and corrects two templates.

The path to the plugin has been modified in acqui/parcel.tt:

- Go to Acquisitions and search for a vendor.
- Open the detail page for that vendor.
- Click the "Receive shipments" button.
- Select an invoice to view.
- In the table of titles, confirm that the column header search forms
  work to filter column data.

In the template for the Staged MARC management page the plugin has been
removed as it is unused. A couple of markup corrects have been made.
Confirm that table sorting is unaffected by going to Administration ->
Staged MARC management, clicking a staged MARC file, and viewing the
table of items in that batch.

There should be no more remaining instances of this path in the
templates:

[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: I believe the sort order of the Order Line column is
      strange, but unrelated to this patch. The search area
      functions (filtering, paging, page size, etc.) worked
      fine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Galen Charlton 2014-04-23 12:44:31 UTC
Pushed to master.  Thanks, Owen!
Comment 7 Fridolin Somers 2014-09-17 14:36:01 UTC
Pushed to 3.14.x, will be in 3.14.11