Bugzilla – Attachment 115331 Details for
Bug 27467
Provide a static URL for tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27467: [SOLUTION 3] Put filter values into the column filters
Bug-27467-SOLUTION-3-Put-filter-values-into-the-co.patch (text/plain), 1.58 KB, created by
Jonathan Druart
on 2021-01-19 14:13:06 UTC
(
hide
)
Description:
Bug 27467: [SOLUTION 3] Put filter values into the column filters
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-01-19 14:13:06 UTC
Size:
1.58 KB
patch
obsolete
>From 246638f01db26cbf25380871f783f5ea560ee74f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 19 Jan 2021 14:51:32 +0100 >Subject: [PATCH] Bug 27467: [SOLUTION 3] Put filter values into the column > filters > >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 826f14d659..617ca05f4e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -51,7 +51,7 @@ var dataTablesDefaults = { > "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]], > "iDisplayLength": 20, > "fixedHeader": true, >- initComplete: function( settings) { >+ initComplete: function( settings ) { > var tableId = settings.nTable.id > // When the DataTables search function is triggered, > // enable or disable the "Clear filter" button based on >@@ -63,6 +63,16 @@ var dataTablesDefaults = { > $("#" + tableId + "_wrapper").find(".dt_button_clear_filter").removeClass("disabled"); > } > }); >+ >+ var table = this; >+ var state = table.api().state(); >+ $.each(state.columns, function(i){ >+ var v = state.columns[i].search.search; >+ if ( v != "" ) { >+ table.find('thead tr:eq(1) th:eq('+i+') input').val(v); >+ } >+ }); >+ > }, > stateSave: true, > stateSaveCallback: function (settings, data) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27467
:
115325
|
115326
|
115327
|
115328
|
115329
|
115330
|
115331
|
117962