Bugzilla – Attachment 129806 Details for
Bug 29648
Make KohaTable tables 'default length' and 'default sort' configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29648: Fix occurrences of GetColumns
Bug-29648-Fix-occurrences-of-GetColumns.patch (text/plain), 16.09 KB, created by
Owen Leonard
on 2022-01-25 15:41:46 UTC
(
hide
)
Description:
Bug 29648: Fix occurrences of GetColumns
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-01-25 15:41:46 UTC
Size:
16.09 KB
patch
obsolete
>From 7e810d0ad145b74c102b7d0f8470be8e60a1cc19 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 6 Jan 2022 15:11:40 +0100 >Subject: [PATCH] Bug 29648: Fix occurrences of GetColumns > >We could add the configuration to these tables as well, but let go first >but the others (read: feeling lazy right now). > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt | 2 +- > .../intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt | 4 ++-- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- > .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 8 ++++---- > .../prog/en/modules/members/moremember-print.tt | 6 +++--- > .../intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 4 ++-- > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- > .../prog/en/modules/suggestion/suggestion.tt | 4 ++-- > .../prog/en/modules/tools/marc_modification_templates.tt | 2 +- > .../intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 2 +- > .../intranet-tmpl/prog/en/modules/tools/stockrotation.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 +- > .../intranet-tmpl/prog/js/circ-patron-search-results.js | 2 +- > .../intranet-tmpl/prog/js/marc_modification_templates.js | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js | 4 ++-- > 16 files changed, 28 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >index cc9fce0a83..bee03ce702 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >@@ -281,7 +281,7 @@ > } > > $(document).ready(function() { >- columns_settings = [% TablesSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] >+ columns_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] > var issuest = KohaTable("currencies-table", { > dom: 'B<"clearfix">t', > }, columns_settings ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 5fa257b4fd..df74ffea26 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -311,10 +311,10 @@ > $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); > >- columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'addbooks', 'reservoir-table', 'json' ) | $raw %] >+ var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'addbooks', 'reservoir-table', 'json' ) | $raw %] > var reservoirt = KohaTable("reservoir-table", { > "pagingType": "simple" >- }, columns_settings ); >+ }, table_settings ); > }); > > /* this function open a popup to search on z3950 server. */ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index a5ada8c27b..36543e1117 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -981,8 +981,8 @@ > [% Asset.js("js/checkouts.js") | $raw %] > [% Asset.js("js/holds.js") | $raw %] > <script> >- columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >- columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] >+ table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >+ table_settings_borrowers_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] > > [% IF borrowernumber and patron %] > if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index 5ee8efbb79..2084dc708a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -178,20 +178,20 @@ > [% INCLUDE 'columns_settings.inc' %] > <script> > var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); >- var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %]; >- var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %]; >+ var holdst_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %]; >+ var holdso_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %]; > > $(document).ready(function() { > > KohaTable("holdst", { > "sPaginationType": "full", > "order": [[1, 'asc']] >- }, holdst_columns_settings); >+ }, holdst_table_settings); > > KohaTable("holdso", { > "sPaginationType": "full", > "order": [[1, 'asc']] >- }, holdso_columns_settings); >+ }, holdso_table_settings); > > $('#resultlist').tabs(); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >index 84dfbffd8f..bc993c3670 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >@@ -210,9 +210,9 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- var checkouts_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-checkouts', 'json' ) | $raw %]; >- var holds_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-holds', 'json' ) | $raw %]; >- var fines_columns = [% TablesSettings.GetColumns( 'circ', 'print_summary', 'print-summary-fines', 'json' ) | $raw %]; >+ var checkouts_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-checkouts', 'json' ) | $raw %]; >+ var holds_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-holds', 'json' ) | $raw %]; >+ var fines_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-fines', 'json' ) | $raw %]; > > function moveColumnsButton( tableId ){ > /* Hide the export button */ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 951c3e1023..1aafe007b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -891,7 +891,7 @@ > [% Asset.js("js/members-menu.js") | $raw %] > <script> > >- columns_settings_issues_table = [% TablesSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] >+ table_settings_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] > > $(document).ready(function() { > $("#info_digests").tooltip(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 243c0baaae..0c0ac9e39e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -354,12 +354,12 @@ > sale_table.DataTable().row($(this).parents('tr')).remove().draw(false); > }); > >- var items_columns_settings = [% TablesSettings.GetColumns('pos', 'pay', 'invoices', 'json') | $raw %]; >+ var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %]; > var items_table = KohaTable("invoices", { > "sPaginationType": "full", > "aaSorting": [[ 0, "asc" ]], > "autoWidth": false >- }, items_columns_settings, false); >+ }, items_table_settings, false); > > $("#invoices").on("click", ".add_button", function(e) { > e.preventDefault(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 7d89d9f524..11d68122b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1163,7 +1163,7 @@ > } > > var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); >- columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; >+ table_settings_borrowers_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; > $.fn.select2.defaults.set("width", "100%" ); > $.fn.select2.defaults.set("dropdownAutoWidth", true ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 27ca89ba9e..0f703d69f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1305,13 +1305,13 @@ > $(document).ready(function() { > $('#suggestiontabs').tabs(); > >- columns_settings = [% TablesSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] >+ table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] > [% FOREACH suggestion IN suggestions %] > [% IF ( suggestion.suggestions_loop ) %] > KohaTable("table_[% loop.count| html %]", { > "sorting": [[ 3, "asc" ]], > "autoWidth": false, >- }, columns_settings ); >+ }, table_settings ); > [% END %] > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >index ba67ec7622..6e16278b94 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >@@ -358,7 +358,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- columns_settings = [% TablesSettings.GetColumns('tools', 'marc-modification-templates', 'templatest', 'json') | $raw %]; >+ table_settings = [% TablesSettings.GetTableSettings('tools', 'marc-modification-templates', 'templatest', 'json') | $raw %]; > [% IF ActionsLoop %] > var mmtas = [% ActionsLoop.json | $raw %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index f60a917a9b..ddb69ff898 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -413,7 +413,7 @@ > <script> > var patron_attributes_lib = new Array(); > var patron_attributes_values = new Array(); >- var table_settings = [% TablesSettings.GetColumns( 'tools', 'batch_patron_modification', 'borrowerst', 'json' ) | $raw %]; >+ var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'batch_patron_modification', 'borrowerst', 'json' ) | $raw %]; > [% FOREACH attrh IN attributes_header %] > table_settings.push({ > columname: "[% attrh.attribute | html %]", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >index 9cdaf56000..a2e57ef472 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >@@ -615,8 +615,8 @@ > [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/pages/stockrotation.js") | $raw %] > <script> >- var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; >- var stock_rotation_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; >+ var stock_rotation_items_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; >+ var stock_rotation_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; > $("#addStageModal, #addItemsModal").on("shown.bs.modal", function(){ > $("#branch, #barcode").focus(); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index e31585814a..94b25d4f81 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -680,7 +680,7 @@ $(document).ready(function() { > .append(ul) > .insertBefore(oSettings.nTableWrapper) > }, >- }, columns_settings_issues_table); >+ }, table_settings_issues_table); > > if ( $("#issues-table").length ) { > $("#issues-table_processing").position({ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >index 578a1b8a2d..c996646742 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >@@ -9,5 +9,5 @@ $(document).ready(function() { > "sDom": "t", > "paging": false > }, >- columns_settings_borrowers_table, null); >+ table_settings_borrowers_table, null); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >index b7565b734e..e513fbe896 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >@@ -1,4 +1,4 @@ >-/* global __ KohaTable columns_settings */ >+/* global __ KohaTable table_settings */ > $(document).ready(function() { > window.modaction_legend_innerhtml = $("#modaction_legend").text(); > window.action_submit_value = $("#action_submit").val(); >@@ -110,7 +110,7 @@ $(document).ready(function() { > }); > > KohaTable("templatest", { >- }, columns_settings); >+ }, table_settings); > > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >index 19750c19a5..777adf5cf8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >@@ -72,7 +72,7 @@ $(document).ready(function() { > ], > "sPaginationType": "full", > "autoWidth": false, >- }, stock_rotation_items_columns_settings); >+ }, stock_rotation_items_table_settings); > > KohaTable("stock_rotation", { > "aoColumnDefs": [ >@@ -81,6 +81,6 @@ $(document).ready(function() { > ], > "sPaginationType": "full", > "autoWidth": false, >- }, stock_rotation_columns_settings); >+ }, stock_rotation_table_settings); > > }); >-- >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 29648
:
128592
|
128593
|
128594
|
128595
|
128596
|
128597
|
128598
|
128599
|
128600
|
128601
|
128602
|
128603
|
128604
|
128605
|
128606
|
128607
|
128608
|
128609
|
128610
|
128611
|
128612
|
128613
|
128614
|
128615
|
128616
|
128617
|
128618
|
128619
|
128620
|
128621
|
128622
|
128623
|
128624
|
128625
|
128626
|
129084
|
129085
|
129089
|
129352
|
129685
|
129686
|
129770
|
129771
|
129772
|
129773
|
129774
|
129775
|
129776
|
129777
|
129778
|
129779
|
129780
|
129781
|
129782
|
129783
|
129784
|
129785
|
129786
|
129787
|
129788
|
129789
|
129790
|
129791
|
129792
|
129793
|
129794
|
129795
|
129796
|
129797
|
129798
|
129799
|
129800
|
129801
|
129802
|
129803
|
129804
|
129805
|
129806
|
131703
|
131875
|
131876
|
133001
|
133002
|
133003
|
133004
|
133005
|
133006
|
133007
|
133008
|
133009
|
133010
|
133011
|
133012
|
133013
|
133014
|
133015
|
133016
|
133017
|
133018
|
133019
|
133020
|
133021
|
133022
|
133023
|
133024
|
133025
|
133026
|
133027
|
134018
|
134019
|
134020
|
134021
|
134022
|
134023
|
134024
|
134025
|
134026
|
134027
|
134028
|
134029
|
134030
|
134031
|
134032
|
134033
|
134034
|
134035
|
134036
|
134037
|
134038
|
134039
|
134040
|
134041
|
134042
|
134043
|
134044
|
134045
|
134046
|
134047
|
134048
|
134049
|
134050
|
134051
|
134052
|
134053
|
134054
|
134086
|
134087
|
134088
|
134089
|
134090
|
134091
|
134092
|
134093
|
134094
|
134095
|
134096
|
134097
|
134098
|
134099
|
134100
|
134101
|
134102
|
134103
|
134104
|
134105
|
134106
|
134107
|
134108
|
134109
|
134110
|
134111
|
134112
|
134113
|
134114
|
134115
|
134116
|
134117
|
134118
|
134119
|
134120
|
134121
|
134122
|
134123
|
134133
|
134134
|
134135
|
134136
|
134137
|
134138
|
134139
|
134140
|
134141
|
134142
|
134143
|
134144
|
134145
|
134146
|
134147
|
134148
|
134149
|
134150
|
134151
|
134152
|
134153
|
134154
|
134155
|
134156
|
134157
|
134158
|
134159
|
134160
|
134161
|
134162
|
134163
|
134164
|
134165
|
134166
|
134167
|
134168
|
134169
|
134170
|
134171
|
134194