Bugzilla – Attachment 90271 Details for
Bug 21852
Add more columns and column configuration to overdues report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21852: (follow up) Remove persistent DataTables user configuration
Bug-21852-follow-up-Remove-persistent-DataTables-u.patch (text/plain), 2.95 KB, created by
Owen Leonard
on 2019-06-03 14:33:54 UTC
(
hide
)
Description:
Bug 21852: (follow up) Remove persistent DataTables user configuration
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-06-03 14:33:54 UTC
Size:
2.95 KB
patch
obsolete
>From 8a312b304587ff09ee3295d6fbc08707cc3a6b13 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 4 Feb 2019 18:55:38 +0000 >Subject: [PATCH] Bug 21852: (follow up) Remove persistent DataTables user > configuration > >This patch removes the DataTables function for restoring a user's >previous configuration. >--- > .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 4 +--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 28 ---------------------- > 2 files changed, 1 insertion(+), 31 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index 26df7c3..80e66cf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -277,8 +277,6 @@ > $(document).ready(function(){ > > var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %]; >- var od_table = localStorage.getItem("DataTables_overduest_/cgi-bin/koha/circ/overdue.pl"); >- var updated_settings = get_columns_saved_state( od_table, columns_settings ); > > KohaTable("overduest", { > "sPaginationType": "four_button", >@@ -289,7 +287,7 @@ > ], > "autoWidth": false, > "stateSave": true >- }, updated_settings); >+ }, columns_settings); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 56f12f4..dd07ddc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -604,31 +604,3 @@ function filterDataTable( table, column, term ){ > table.search( term ).draw("page"); > } > } >- >-/* get_columns_saved_state checks for a DataTables configuration saved >- * in the browser's local storage. If it is present, the columns >- * configuration supplied by Koha is overwritten >- * >- * It takes two parameters: >- * - localstorage_config, the DataTables saved state object from local storage >- * - columns_settings, the columns settings object supplied by the template >- */ >- >-function get_columns_saved_state( localstorage_config, columns_settings ){ >- var tables = JSON.parse( localstorage_config ); >- // if a table configuration was found in local storage, parse it >- if( tables ){ >- var stateSave_column_visibility = []; >- $(tables.columns).each(function(){ >- stateSave_column_visibility.push( this.visible === true ? 0 : 1 ); >- }); >- $.each( columns_settings, function( index, key ){ >- if( stateSave_column_visibility[ index ] !== columns_settings[key] ){ >- columns_settings[ index ].is_hidden = stateSave_column_visibility[ index ]; >- } >- }); >- return columns_settings; >- } else { >- return columns_settings; >- } >-} >-- >2.1.4
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 21852
:
82550
|
84281
|
84638
|
84639
|
84648
|
84649
|
84663
|
84664
|
84735
|
90269
|
90270
|
90271
|
92369
|
92370
|
92371
|
92373
|
92374
|
92375
|
92575
|
92823