Bug 10235: Add DataTables filters on local use prefs
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 14 Apr 2015 14:07:07 +0000 (16:07 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 14 May 2015 15:23:10 +0000 (12:23 -0300)
There is no way to search for local use prefs.
This patch provides an easy way to search for pref present in
of local use prefs table.

Test plan:
1/ Go on the system preferences administration page
2/ Click on the Local Use table
3/ Confirm you are able to filter the table by pref name or description
using the DataTables filters on top of it.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Local use tab is distinct from other tabs, so implementing
      'Search system preferences' across all tabs would be very
      difficult. This patch adds a filter to the Local Use tab,
      which nicely allows for filtering, as per Owen's suggestion
      in comment #1.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt

index 2d27d83..dba6c08 100644 (file)
@@ -9,9 +9,9 @@
     //<![CDATA[
      $(document).ready(function() {
         [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
-            "sDom": 't',
+            "sDom": '<"top pager"ilf>t',
             "aoColumnDefs": [
-                { "aTargets": [ -1, -2, -3, -4 ], "bSortable": false, "bSearchable": false }
+                { "aTargets": [ -1, -2, -3, -4 ], "bSortable": false }
             ],
             "bPaginate": false
         }));[% END %]