Bugzilla – Attachment 177234 Details for
Bug 26553
Remove KohaTable (columns_settings.inc) and use kohaTable (datatables.js)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26553: Replace KohaTable with kohaTable
Bug-26553-Replace-KohaTable-with-kohaTable.patch (text/plain), 71.95 KB, created by
Jonathan Druart
on 2025-01-28 09:42:49 UTC
(
hide
)
Description:
Bug 26553: Replace KohaTable with kohaTable
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-28 09:42:49 UTC
Size:
71.95 KB
patch
obsolete
>From e70b0a73d81ab5de0b58cf7cce4e14d30d41869a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Nov 2024 16:57:21 +0100 >Subject: [PATCH] Bug 26553: Replace KohaTable with kohaTable > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >JD Amended patch: replace wrong occurrences of "kohatable" with "kohaTable" >--- > .../prog/en/modules/acqui/acqui-home.tt | 3 +- > .../prog/en/modules/acqui/duplicate_orders.tt | 5 +-- > .../prog/en/modules/acqui/histsearch.tt | 10 +++-- > .../prog/en/modules/acqui/lateorders.tt | 3 +- > .../prog/en/modules/admin/aqbudgets.tt | 3 +- > .../en/modules/admin/authorised_values.tt | 7 ++-- > .../prog/en/modules/admin/currency.tt | 6 +-- > .../prog/en/modules/admin/desks.tt | 5 +-- > .../prog/en/modules/admin/itemtypes.tt | 10 +++-- > .../en/modules/admin/patron-attr-types.tt | 12 +++--- > .../prog/en/modules/admin/smart-rules.tt | 20 ++++++---- > .../prog/en/modules/catalogue/detail.tt | 29 ++++++++------ > .../prog/en/modules/catalogue/issuehistory.tt | 14 ++++--- > .../prog/en/modules/catalogue/itemsearch.tt | 3 +- > .../prog/en/modules/cataloguing/addbooks.tt | 10 +++-- > .../en/modules/cataloguing/z3950_search.tt | 18 ++++----- > .../prog/en/modules/circ/overdue.tt | 12 +++--- > .../prog/en/modules/circ/pendingreserves.tt | 19 +++++---- > .../prog/en/modules/circ/reserveratios.tt | 23 ++++++----- > .../prog/en/modules/circ/returns.tt | 18 +++++---- > .../prog/en/modules/circ/view_holdsqueue.tt | 14 ++++--- > .../prog/en/modules/circ/waitingreserves.tt | 39 ++++++++++-------- > .../modules/course_reserves/course-details.tt | 12 +++--- > .../course_reserves/course-reserves.tt | 12 +++--- > .../prog/en/modules/members/boraccount.tt | 14 ++++--- > .../prog/en/modules/members/holdshistory.tt | 12 +++--- > .../prog/en/modules/members/housebound.tt | 7 ++-- > .../en/modules/members/moremember-print.tt | 40 +++++++++++-------- > .../prog/en/modules/members/pay.tt | 12 +++--- > .../prog/en/modules/members/readingrec.tt | 13 +++--- > .../prog/en/modules/patron_lists/list.tt | 10 +++-- > .../prog/en/modules/plugins/plugins-home.tt | 5 +-- > .../intranet-tmpl/prog/en/modules/pos/pay.tt | 15 ++++--- > .../en/modules/reports/catalogue_stats.tt | 13 +++--- > .../modules/reports/guided_reports_start.tt | 19 ++++----- > .../prog/en/modules/reports/itemslost.tt | 22 +++++----- > .../en/modules/reports/orders_by_budget.tt | 10 +++-- > .../prog/en/modules/reserve/request.tt | 12 +++--- > .../en/modules/serials/subscription-detail.tt | 23 ++++++----- > .../prog/en/modules/suggestion/suggestion.tt | 12 +++--- > .../prog/en/modules/tools/inventory.tt | 3 +- > .../prog/en/modules/tools/modborrowers.tt | 12 +++--- > .../prog/en/modules/tools/upload.tt | 4 +- > .../prog/js/cataloging_additem.js | 17 ++++---- > koha-tmpl/intranet-tmpl/prog/js/categories.js | 3 +- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 4 +- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 2 +- > .../intranet-tmpl/prog/js/ill-availability.js | 2 +- > .../intranet-tmpl/prog/js/ill-batch-modal.js | 2 +- > .../intranet-tmpl/prog/js/ill-batch-table.js | 3 +- > koha-tmpl/intranet-tmpl/prog/js/letter.js | 13 +++--- > .../prog/js/marc_modification_templates.js | 5 +-- > .../intranet-tmpl/prog/js/pages/batchMod.js | 14 +++---- > .../prog/js/pages/stockrotation.js | 40 +++++++++++-------- > .../intranet-tmpl/prog/js/restrictiontypes.js | 27 +++++++------ > koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 13 +++--- > 56 files changed, 397 insertions(+), 313 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 529018ab100..aa1ec5a4563 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -225,13 +225,12 @@ > [% INCLUDE 'datatables.inc' %] > [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > dt_overwrite_html_sorting_localeCompare(); > > $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %]; >- var oTable = KohaTable("accounts", { >+ var oTable = $("#accounts").kohaTable({ > "drawCallback": function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) > { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >index 38f577c5797..4ada59a85c4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >@@ -313,7 +313,6 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/acq.js") | $raw %] > [% Asset.js("js/funds_sorts.js") | $raw %] > <script> >@@ -330,8 +329,8 @@ > var MSG_NO_FUND_SELECTED = _("No fund selected."); > $(document).ready(function() { > $('span.hint').hide(); >- KohaTable("table_orders", { >- "paginate": false >+ $("#table_orders").kohaTable({ >+ paginate: false, > }); > > [% IF op == 'search' OR op == 'select' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index 80029bc358c..ff17c6b95e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -161,14 +161,16 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var MSG_REMOVE_PATRON = _("Remove"); > $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %]; >- KohaTable("histsearcht", { >- "pagingType": "full" >- }, table_settings ); >+ $("#histsearcht").kohaTable( >+ { >+ pagingType: "full", >+ }, >+ table_settings >+ ); > > function AddPatron( patron_name, value, container, input_name ) { > div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index 337974523be..ba263030b07 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -331,7 +331,6 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'calendar.inc' %] > <script> > var late_orderst; >@@ -348,7 +347,7 @@ > $(document).ready(function() { > > var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %]; >- late_orderst = KohaTable("late_orders", { >+ late_orderst = $("#late_orders").kohaTable({ > "sorting": [[ 1, "asc" ]], > "pagingType": "full", > "autoWidth": false, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index 479ab848953..085d8b306af 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -687,13 +687,12 @@ > > [% ELSIF op == 'list' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] > > <script> > $(document).ready(function() { > [% IF budgets %] >- var oTable = KohaTable("budgeth", { >+ var oTable = $("#budgeth").kohaTable({ > "drawCallback": function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) > { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index b25ac29e6ad..9e7fd2442f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -403,13 +403,12 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > >- KohaTable("categoriest", { >- "order": [[ 0, "asc" ]], >- "pagingType": "full" >+ $("#categoriest").kohaTable({ >+ order: [[0, "asc"]], >+ pagingType: "full", > }); > > if ( $("#branches option:selected").length < 1 ) { >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 cce27e7b6d5..d5e5f21422b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >@@ -288,7 +288,6 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > > function check_currency(val) { >@@ -303,9 +302,8 @@ > } > > $(document).ready(function() { >- columns_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] >- var issuest = KohaTable("currencies-table", { >- }, columns_settings ); >+ let table_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] >+ $("#currencies-table").kohaTable({}, table_settings); > > // prevents users to check active with a currency != 1 > $("#rate").keyup(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >index 67a69f1e472..49e35b82bae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >@@ -225,11 +225,10 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { >- KohaTable("table_desks", { >- "order": [[ 1, "asc" ]] >+ $("#table_desks").kohaTable({ >+ order: [[1, "asc"]], > }); > }); > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >index 278d10815f6..c107f8b4ede 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -542,7 +542,6 @@ > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'greybox.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %]; >@@ -551,9 +550,12 @@ > [% END %] > > $(document).ready(function() { >- KohaTable("table_item_type", { >- "pagingType": "full" >- }, table_settings); >+ $("#table_item_type").kohaTable( >+ { >+ pagingType: "full", >+ }, >+ table_settings >+ ); > }); > > $( "#itemtypeentry" ).validate({ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >index 57748196e1d..d6e6fe37ebb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >@@ -407,7 +407,6 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > >@@ -456,10 +455,13 @@ > > $(".patron_attributes_types").each(function(){ > var tableid = $(this).attr("id"); >- KohaTable( tableid, { >- "paginate": false, >- 'autoWidth': false, >- }, null ); >+ $(tableid).kohaTable( >+ { >+ paginate: false, >+ autoWidth: false, >+ }, >+ null >+ ); > }); > }); > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 999ef3edb3e..345972aa340 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1465,18 +1465,22 @@ > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'format_price.inc' %] > <script> > $(document).ready(function() { >- KohaTable("default-circulation-rules", { >- "columnDefs": [ >- { "visible": false, "targets": [ 0,2 ] }, >- { "orderable": false, "targets": ["_all"] } >+ $("#default-circulation-rules").kohaTable({ >+ columnDefs: [ >+ { visible: false, targets: [0, 2] }, >+ { orderable: false, targets: ["_all"] }, > ], >- "orderFixed": [ [0,'asc'], [1,'asc'], [2,'asc'], [3,'asc'] ], >- "paginate": false, >- "autoWidth": false >+ orderFixed: [ >+ [0, "asc"], >+ [1, "asc"], >+ [2, "asc"], >+ [3, "asc"], >+ ], >+ paginate: false, >+ autoWidth: false, > }); > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 477116e6bf1..976121a40b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1655,7 +1655,6 @@ > <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script> > [% END %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'js-date-format.inc' %] > [% Asset.js("lib/dayjs/plugin/isSameOrAfter.js") | $raw %] > [% Asset.js("lib/dayjs/plugin/isSameOrBefore.js") | $raw %] >@@ -2023,12 +2022,15 @@ > > [% IF Koha.Preference('AcquisitionDetails') %] > var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; >- var acquisitiondetails_table = KohaTable("orders", { >- "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >- "paginate": false, >- "autoWidth": false, >- "order": [[ 4, "desc" ]], >- }, table_settings); >+ var acquisitiondetails_table = $("#orders").kohaTable( >+ { >+ dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >+ paginate: false, >+ autoWidth: false, >+ order: [[4, "desc"]], >+ }, >+ table_settings >+ ); > [% END %] > > [% IF suggestions.count %] >@@ -2043,11 +2045,14 @@ > > [% IF ( reviews ) %] > var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %]; >- var comments_table = KohaTable("comments_table", { >- "paginate": false, >- "autoWidth": false, >- "order": [[ 2, "desc" ]], >- }, comment_table_settings); >+ var comments_table = $("#comments_table").kohaTable( >+ { >+ paginate: false, >+ autoWidth: false, >+ order: [[2, "desc"]], >+ }, >+ comment_table_settings >+ ); > [% END %] > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >index 8025e2bc2f6..33937add33e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >@@ -136,7 +136,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >-[% INCLUDE 'columns_settings.inc' %] > <script id="js"> > $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'checkoutshistory-table', 'json') | $raw %]; >@@ -144,11 +143,14 @@ > // Remove the patron column definition > table_settings['columns'].splice(0,1); > [% END %] >- var table = KohaTable("table_issues", { >- "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >- "order": [[ 5, "desc" ]], >- "pagingType": "full_numbers" >- }, table_settings); >+ var table = $("#table_issues").kohaTable( >+ { >+ dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >+ order: [[5, "desc"]], >+ pagingType: "full_numbers", >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index 8799ec51a9f..bb894f84228 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -361,7 +361,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'select2.inc' %] > <script> > var authorised_values = [% authorised_values_json | $raw %]; >@@ -630,7 +629,7 @@ > }; > > var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %]; >- KohaTable('results' , { >+ $('#results').kohaTable( { > "bKohaColumnsUseNames": true, > "destroy": true, > "serverSide": true, >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 9e4b2c6fb39..5d6565e883e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -273,7 +273,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > > $(document).ready(function() { >@@ -319,9 +318,12 @@ > }); > > var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'addbooks', 'reservoir-table', 'json' ) | $raw %] >- var reservoirt = KohaTable("reservoir-table", { >- "pagingType": "simple" >- }, table_settings ); >+ var reservoirt = $("#reservoir-table").kohaTable( >+ { >+ pagingType: "simple", >+ }, >+ table_settings >+ ); > }); > > /* this function open a popup to search on z3950 server. */ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >index ebd775da043..300def229ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >@@ -259,21 +259,21 @@ > [% END %] > > [% MACRO jsinclude BLOCK %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'z3950_search.inc' %] > [% Asset.js("js/z3950_search.js") | $raw %] > <script> > $(document).ready(function(){ > var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %]; >- var thetable = KohaTable("resultst", { >- "columnDefs": [ >- { "targets": [ 1 ], "type": "nsb-nse" }, >- ], >- "paginate": false, >- "searching": false, >- "info": false >- }, table_settings ); >+ var thetable = $("#resultst").kohaTable( >+ { >+ columnDefs: [{ targets: [1], type: "nsb-nse" }], >+ paginate: false, >+ searching: false, >+ info: false, >+ }, >+ table_settings >+ ); > InitLastAction(); > }); > >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 8a985c11e92..962b453321e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -293,7 +293,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'select2.inc' %] > [% INCLUDE 'js-date-format.inc' %] > [% PROCESS 'modal-claims-js' %] >@@ -338,10 +337,13 @@ > table_settings['columns'].splice(13, 1); > [% END %] > >- KohaTable("overduest", { >- "pagingType": "full", >- "autoWidth": false, >- }, table_settings); >+ $("#overduest").kohaTable( >+ { >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ table_settings >+ ); > > $("#showall").on("change", function(){ > update_date_due_filters_visibility(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 8769a5be973..29ef396f3bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -303,7 +303,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function get_options(column){ > let regex = /(<([^>]+)>)/ig; // Remove html tags >@@ -330,12 +329,18 @@ > > > var table_settings = [% TablesSettings.GetTableSettings('circ', 'holds', 'holds-to-pull', 'json') | $raw %]; >- var holdst = KohaTable("holdst", { >- "pagingType": "full_numbers", >- "columnDefs": [ >- { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, >- ], >- }, table_settings, true, null, filters_options); >+ var holdst = $("#holdst").kohaTable( >+ { >+ pagingType: "full_numbers", >+ columnDefs: [ >+ { orderable: false, searchable: false, targets: ["NoSort"] }, >+ ], >+ }, >+ table_settings, >+ true, >+ null, >+ filters_options >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index fad019d7415..fbcef91a3b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -202,19 +202,24 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %]; > $(document).ready(function() { >- KohaTable("holds-ratios", { >- "order": [ [2,'desc'], [3,'asc'] ], >- "columnDefs": [ >- { "type": "anti-the", "targets": [ "anti-the" ] }, >- { "type": "natural", "targets": [ "natural" ] }, >+ $("#holds-ratios").kohaTable( >+ { >+ order: [ >+ [2, "desc"], >+ [3, "asc"], > ], >- "pagingType": "full", >- "autoWidth": false >- }, table_settings); >+ columnDefs: [ >+ { type: "anti-the", targets: ["anti-the"] }, >+ { type: "natural", targets: ["natural"] }, >+ ], >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index cf42ce558c3..02f8b734655 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1460,7 +1460,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'calendar.inc' %] > [% Asset.js("js/pages/circulation.js") | $raw %] > [% Asset.js("js/modal_printer.js") | $raw %] >@@ -1521,13 +1520,16 @@ > Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]'); > [% END %] > >- var returns_table = KohaTable("checkedintable", { >- "searching":false, >- "paginate":false, >- "info": false, >- "ordering":false, >- "dom": '<"table_controls"B>rt', >- }, table_settings); >+ var returns_table = $("#checkedintable").kohaTable( >+ { >+ searching: false, >+ paginate: false, >+ info: false, >+ ordering: false, >+ dom: '<"table_controls"B>rt', >+ }, >+ table_settings >+ ); > > $("#exemptcheck").change(function () { > if (this.checked == true) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >index b9c051d67cd..0505f970324 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >@@ -324,7 +324,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > var holdst; >@@ -343,11 +342,14 @@ > $('#holdst thead input').on('change keyup keydown', filterColumn); > > var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %]; >- var holdst = KohaTable("holdst", { >- "dom": 'B<"clearfix">t', >- "orderCellsTop": true, >- "paginate": false >- }, table_settings); >+ var holdst = $("#holdst").kohaTable( >+ { >+ dom: 'B<"clearfix">t', >+ orderCellsTop: true, >+ paginate: false, >+ }, >+ table_settings >+ ); > > }); > </script> >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 2405b4da0f5..1d999b0e460 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -210,7 +210,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); > var holdst_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %]; >@@ -218,21 +217,29 @@ > var holdscr_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdscr', 'json' ) | $raw %]; > > $(document).ready(function() { >- >- KohaTable("holdst", { >- "pagingType": "full", >- "order": [[1, 'asc']] >- }, holdst_table_settings); >- >- KohaTable("holdso", { >- "pagingType": "full", >- "order": [[1, 'asc']] >- }, holdso_table_settings); >- >- KohaTable("holdscr", { >- "pagingType": "full", >- "order": [[1, 'asc']] >- }, holdscr_table_settings); >+ $("#holdst").kohaTable( >+ { >+ pagingType: "full", >+ order: [[1, "asc"]], >+ }, >+ holdst_table_settings >+ ); >+ >+ $("#holdso").kohaTable( >+ { >+ pagingType: "full", >+ order: [[1, "asc"]], >+ }, >+ holdso_table_settings >+ ); >+ >+ $("#holdscr").kohaTable( >+ { >+ pagingType: "full", >+ order: [[1, "asc"]], >+ }, >+ holdscr_table_settings >+ ); > > let cancel_link; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 79b74086eee..582fe5bfbc2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -323,7 +323,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %]; > $(document).ready(function(){ >@@ -337,10 +336,13 @@ > $('#rm_items').submit(); > }); > >- var rtable = KohaTable("course_reserves_table", { >- "pagingType": "full", >- "autoWidth": false, >- }, table_settings ); >+ var rtable = $("#course_reserves_table").kohaTable( >+ { >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ table_settings >+ ); > > $("#course_reserves_table").on( 'click', " .delete_item", function(e){ > e.preventDefault(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >index b5ef855ee94..ec3b0518741 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >@@ -94,14 +94,16 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %]; > $(document).ready(function() { >- var ctable = KohaTable("course_reserves_table", { >- "pagingType": "full", >- "autoWidth": false >- }, table_settings ); >+ var ctable = $("#course_reserves_table").kohaTable( >+ { >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index 13cc95051b1..6cba36cefba 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -394,7 +394,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'format_price.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > <script> >@@ -406,11 +405,14 @@ > var txtActivefilter = _("Filter paid transactions"); > var txtInactivefilter = _("Show all transactions"); > var table_settings = [% TablesSettings.GetTableSettings('members', 'fines', 'account-fines', 'json') | $raw %]; >- var table_account_fines = KohaTable("table_account_fines", { >- "pagingType": "full", >- "order": [[0, 'desc']], >- "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >- }, table_settings); >+ var table_account_fines = $("#table_account_fines").kohaTable( >+ { >+ pagingType: "full", >+ order: [[0, "desc"]], >+ dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >+ }, >+ table_settings >+ ); > $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>'); > $('#filter_transacs').click(function(e) { > e.preventDefault(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index f224391bec1..3c7b82d632d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -139,7 +139,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > <script> >@@ -149,10 +148,13 @@ > //Remove item type column settings > table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';}); > [% END %] >- var table = KohaTable("table_holdshistory", { >- "pagingType": "full", >- "order": [[4, 'desc']] >- }, table_settings); >+ var table = $("#table_holdshistory").kohaTable( >+ { >+ pagingType: "full", >+ order: [[4, "desc"]], >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >index 4bdfe610921..a24807e1a1c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >@@ -451,16 +451,15 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > $(".delete").click(function(){ > return confirm(_("Are you sure you want to delete this delivery?")); > }); > }); >- KohaTable("deliveries", { >- "pagingType": "full", >- "autoWidth": false, >+ $("#deliveries").kohaTable({ >+ pagingType: "full", >+ autoWidth: false, > }); > </script> > [% INCLUDE 'str/members-menu.inc' %] >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 1fd878dd136..7c478144a86 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 >@@ -216,30 +216,38 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'slip-print.inc' #printThenClose %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > 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 initTables(){ >- KohaTable("print-summary-checkouts", { >- "dom": '<"dt-info"><"top pager"<"table_controls"B>>t', >- "paging": false, >- "autoWidth": false, >- }, checkouts_columns); >+ $("#print-summary-checkouts").kohaTable( >+ { >+ dom: '<"dt-info"><"top pager"<"table_controls"B>>t', >+ paging: false, >+ autoWidth: false, >+ }, >+ checkouts_columns >+ ); > >- KohaTable("print-summary-holds", { >- "dom": '<"dt-info"><"top pager"<"table_controls"B>>t', >- "paging": false, >- "autoWidth": false, >- }, holds_columns); >+ $("#print-summary-holds").kohaTable( >+ { >+ dom: '<"dt-info"><"top pager"<"table_controls"B>>t', >+ paging: false, >+ autoWidth: false, >+ }, >+ holds_columns >+ ); > >- KohaTable("print-summary-fines", { >- "dom": '<"dt-info"><"top pager"<"table_controls"B>>t', >- "paging": false, >- "autoWidth": false, >- }, fines_columns); >+ $("#print-summary-fines").kohaTable( >+ { >+ dom: '<"dt-info"><"top pager"<"table_controls"B>>t', >+ paging: false, >+ autoWidth: false, >+ }, >+ fines_columns >+ ); > } > > if( autoprint ){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >index 918afe0890d..13e8264281b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -226,7 +226,6 @@ > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function enableCheckboxActions(){ > // Enable/disable controls if checkboxes are checked >@@ -281,10 +280,13 @@ > }); > > var table_settings = [% TablesSettings.GetTableSettings('members', 'pay', 'pay-fines-table', 'json') | $raw %]; >- KohaTable("finest", { >- "paging": false, >- "autoWidth": false >- }, table_settings ); >+ $("#finest").kohaTable( >+ { >+ paging: false, >+ autoWidth: false, >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index de899d726ea..6450d5d79ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -175,7 +175,6 @@ > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'modals/checkout_renewals.inc' %] > [% INCLUDE 'js-date-format.inc' %] > [% INCLUDE 'js-patron-format.inc' %] >@@ -183,15 +182,19 @@ > <script id="js"> > $(document).ready(function() { > [% IF Koha.Preference('RecordStaffUserOnCheckout') %] >+ // FIXME This cannot work without bKohaColumnsUseNames > var column_sort = 11; > [% ELSE %] > var column_sort = 10; > [% END %] > var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %]; >- var table = KohaTable("table_readingrec", { >- "pagingType": "full", >- "order": [[column_sort, 'desc']] >- }, table_settings); >+ var table = $("#table_readingrec").kohaTable( >+ { >+ pagingType: "full", >+ order: [[column_sort, "desc"]], >+ }, >+ table_settings >+ ); > > let table_dt = table.DataTable(); > $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >index 831f0a0d30d..76d7b90a1f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >@@ -6,7 +6,6 @@ > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-[% INCLUDE 'columns_settings.inc' %] > <title>[% FILTER collapse %] > [% list.name | html %] › > [% t("Patron lists") | html %] › >@@ -245,9 +244,12 @@ > $('#patrons_to_add_fieldset').hide(); > > var table_settings = [% TablesSettings.GetTableSettings('members', 'patron-lists', 'patron-list-table', 'json') | $raw %] >- KohaTable('patron-list-table', { >- "pagingType": "full" >- }, table_settings); >+ $("#patron-list-table").kohaTable( >+ { >+ pagingType: "full", >+ }, >+ table_settings >+ ); > > function AddPatron( patron_name, value, container, input_name ) { > div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >index 86187d44a1c..4468d341db9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >@@ -272,7 +272,6 @@ > [% Asset.js("js/tools-menu.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function(){ > $(".uninstall_plugin").on("click", function(){ >@@ -285,8 +284,8 @@ > $("#plugin-search-form").submit(); > }); > >- KohaTable("installed_plugins", { >- "paginate": false >+ $("#installed_plugins").kohaTable({ >+ paginate: false, > }); > }); > </script> >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 058585c83c2..9a489c29127 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -246,7 +246,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'format_price.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function moneyFormat(textObj) { > var newValue = textObj.value; >@@ -435,11 +434,15 @@ > }); > > var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %]; >- var items_table = KohaTable("invoices", { >- "pagingType": "full", >- "order": [[ 0, "asc" ]], >- "autoWidth": false >- }, items_table_settings, false); >+ var items_table = $("#invoices").kohaTable( >+ { >+ pagingType: "full", >+ order: [[0, "asc"]], >+ autoWidth: false, >+ }, >+ items_table_settings, >+ false >+ ); > > $("#invoices").on("click", ".add_button", function(e) { > e.preventDefault(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >index 70e20b5be34..f71083ef829 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >@@ -342,7 +342,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function changeRemovedDateTrStatus() { > var Cellvalue = $("input[name='Cellvalue']:checked").val(); >@@ -366,6 +365,7 @@ > }); > changeRemovedDateTrStatus(); > >+ // FIXME This does not work, we need to pass table settings, not the columns > columns_settings = [% FILTER collapse %] > [ > { >@@ -391,10 +391,13 @@ > ]; > [% END %] > >- var catalogue_stats = KohaTable("catalogue_stats", { >- 'autoWidth': false, >- 'paging': false, >- }, columns_settings ); >+ var catalogue_stats = $("#catalogue_stats").kohaTable( >+ { >+ autoWidth: false, >+ paging: false, >+ }, >+ columns_settings >+ ); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 127e9f42a3a..03810e3d3a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1563,7 +1563,6 @@ > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] > [% IF ( saved1 ) %] >- [% INCLUDE 'columns_settings.inc' %] > [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %] > [% END %] > [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] >@@ -2018,15 +2017,17 @@ > > [% IF (saved1) %] > var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %]; >- var rtable = KohaTable("table_reports", { >- "autoWidth": false, >- "pagingType": 'full', >- "order": [[ 1, "asc" ]], >- "language": { >- "zeroRecords": _("No matching reports found") >+ var rtable = $("#table_reports").kohaTable( >+ { >+ autoWidth: false, >+ pagingType: "full", >+ order: [[1, "asc"]], >+ language: { >+ zeroRecords: _("No matching reports found"), >+ }, > }, >- >- }, table_settings); >+ table_settings >+ ); > let table_dt = rtable.DataTable(); > > $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index 48baa773a74..7c4e5b8f73c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -206,23 +206,27 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %]; > [% IF csv_profiles.count %] > // Add the first (checkbox) column if it is displayed >+ // FIXME This cannot work without bKohaColumnsUseNames > table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0}); > [% END %] > >- var lostitems_table = KohaTable("lostitems-table", { >- "order": [], >- "columnDefs": [ >- { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] } >- ], >- "autoWidth": false, >- "paginate": false, >- }, table_settings, 'with_filters'); >+ var lostitems_table = $("#lostitems-table").kohaTable( >+ { >+ order: [], >+ columnDefs: [ >+ { orderable: false, searchable: false, targets: ["NoSort"] }, >+ ], >+ autoWidth: false, >+ paginate: false, >+ }, >+ table_settings, >+ "with_filters" >+ ); > > function itemSelectionBuildExportLink() { > var itemnumbers = new Array(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >index 3073fe35cb0..59656b30539 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt >@@ -173,13 +173,15 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %]; > $(document).ready( function () { >- var funds_table = KohaTable("funds", { >- 'autoWidth': false, >- }, table_settings ); >+ var funds_table = $("#funds").kohaTable( >+ { >+ autoWidth: false, >+ }, >+ table_settings >+ ); > > showallbudgets = $('#budgetfilter').html(); > $('#budgetfilter .b_inactive').remove(); >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 038354e02c7..83572d838fb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1482,7 +1482,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'select2.inc' %] > [% Asset.js("js/holds.js") | $raw%] > [% Asset.js("js/form-submit.js") | $raw%] >@@ -1495,10 +1494,13 @@ > <script> > $(document).ready(function () { > hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %]; >- KohaTable("patron_holds_table", { >- "bPaginate":false, >- "bKohaColumnsUseNames": true, >- }, hold_table_settings); >+ $("#patron_holds_table").kohaTable( >+ { >+ bPaginate: false, >+ bKohaColumnsUseNames: true, >+ }, >+ hold_table_settings >+ ); > }); > var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; > var borrowernumber = "[% patron.borrowernumber | $raw %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 53b43ff26e8..b32a362a479 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -444,7 +444,6 @@ > [% Asset.js("js/mana.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > // the english words used in display purposes > var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern", >@@ -457,16 +456,18 @@ > }) > > var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %]; >- var table = KohaTable("orders", { >- "columnDefs": [ >- { "visible": false, "targets": [ 'NoVisible' ] }, >- { "orderable": false, "targets": ["_all"] }, >- ], >- >- "paginate": false, >- "autoWidth": false, >- "ordering": false, >- }, table_settings); >+ var table = $("#orders").kohaTable( >+ { >+ columnDefs: [ >+ { visible: false, targets: ["NoVisible"] }, >+ { orderable: false, targets: ["_all"] }, >+ ], >+ paginate: false, >+ autoWidth: false, >+ ordering: false, >+ }, >+ table_settings >+ ); > > [% IF orders_grouped.size %] > $(table).treetable({ >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 8c2fcf15db4..37aec1f3433 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1386,7 +1386,6 @@ > [% END %] > [% IF op == 'else' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > if( $("#suggestiontabs .tab-pane.active").length < 1 ){ >@@ -1397,10 +1396,13 @@ > > [% FOREACH suggestion IN suggestions %] > [% IF suggestion.suggestions.size %] >- KohaTable("table_[% suggestion.suggestiontype | html %]", { >- "sorting": [[ 4, "asc" ]], >- "autoWidth": false, >- }, table_settings ); >+ $("#table_[% suggestion.suggestiontype | html %]").kohaTable( >+ { >+ sorting: [[4, "asc"]], >+ autoWidth: false, >+ }, >+ table_settings >+ ); > [% END %] > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index 86ef5690c53..9fab56c7c15 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -413,7 +413,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function checkForm() { > if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) { >@@ -467,7 +466,7 @@ > > $(document).ready(function(){ > var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %]; >- inventorydt = KohaTable("inventoryt", { >+ inventorydt = $("#inventoryt").kohaTable({ > "pagingType": 'full_numbers', > [% IF compareinv2barcd %] > // sort on callnumber >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 ed7cd00492b..e44b21a8163 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -484,7 +484,6 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% Asset.js("js/members-patron-selections.js") | $raw %] > <script> >@@ -502,10 +501,13 @@ > [% END %] > $(document).ready(function() { > [% IF borrowers %] >- let patron_table = KohaTable("borrowerst", { >- "order": [[ 1, "asc" ]], >- "autoWidth": true, >- }, table_settings); >+ let patron_table = $("#borrowerst").kohaTable( >+ { >+ order: [[1, "asc"]], >+ autoWidth: true, >+ }, >+ table_settings >+ ); > > $("#selectallbutton").click(function() { > $("#borrowerst").find("input:checkbox").each(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >index 5dfdafdcce1..af0f5322148 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >@@ -353,7 +353,6 @@ > [% Asset.js("js/tools-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/file-upload.js") | $raw %] >- [% INCLUDE 'columns_settings.inc' %] > <script> > function StartUpload() { > if( $('#fileToUpload').prop('files').length == 0 ) return; >@@ -486,8 +485,7 @@ > table_settings['columns'].splice(5, 1); > [% END %] > $(document).ready(function() { >- KohaTable("uploadresults",{ >- }, table_settings); >+ $("#uploadresults").kohaTable({}, table_settings); > > [% IF msg %] > ShowAlerts( [% msg | html %] ); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index d4f28bbf841..7674a757fa6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -1,4 +1,4 @@ >-/* global KOHA searchid biblionumber frameworkcode popup op LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM columns_settings CheckMandatorySubfields CheckMultipleAdd */ >+/* global KOHA searchid biblionumber frameworkcode popup op LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM table_settings CheckMandatorySubfields CheckMultipleAdd */ > > var browser = KOHA.browser(searchid, parseInt(biblionumber, 10)); > browser.show(); >@@ -41,12 +41,15 @@ $(document).ready(function(){ > // Skip the first column > table_settings['columns'].unshift( { cannot_be_toggled: "1" } ); > >- var itemst = KohaTable("itemst", { >- "paging": false, >- "info": false, >- "autoWidth": false, >- "bKohaColumnsUseNames": true >- }, table_settings); >+ var itemst = $("#itemst").kohaTable( >+ { >+ paging: false, >+ info: false, >+ autoWidth: false, >+ bKohaColumnsUseNames: true, >+ }, >+ table_settings >+ ); > > var multiCopyControl = $("#add_multiple_copies_span"); > var addMultipleBlock = $("#addmultiple"); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/categories.js b/koha-tmpl/intranet-tmpl/prog/js/categories.js >index 786613d50e6..be4fc5923e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/categories.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/categories.js >@@ -33,8 +33,7 @@ jQuery.validator.addMethod( > ); > > $(document).ready(function () { >- KohaTable( >- "patron_categories", >+ $("#patron_categories").kohaTable( > { > columnDefs: [ > { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 6bb9f8cc17b..c96d189fc34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -50,7 +50,7 @@ function LoadIssuesTable() { > c => c.columnname == "export" > ).is_hidden = 1; > } >- issuesTable = KohaTable("issues-table", { >+ issuesTable = $("#issues-table").kohaTable({ > "language": { > "emptyTable": msg_loading, > "processing": msg_loading, >@@ -814,7 +814,7 @@ $(document).ready(function() { > var relativesIssuesTable; > $("#relatives-issues-tab").click( function() { > if ( ! relativesIssuesTable ) { >- relativesIssuesTable = KohaTable("relatives-issues-table", { >+ relativesIssuesTable = $("#relatives-issues-table").kohaTable({ > "autoWidth": false, > "dom": '<"table_controls"B>rt', > "order": [], >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index fd728c04100..b6560c838db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -126,7 +126,7 @@ $(document).ready(function() { > var holds = new Array(); > if ( ! holdsTable ) { > var title; >- holdsTable = KohaTable("holds-table", { >+ holdsTable = $("#holds-table").kohaTable({ > "autoWidth": false, > "dom": '<"table_controls"B>rt', > "columns": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js b/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >index 24d65ea713f..b4721c0e0ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >@@ -234,7 +234,7 @@ $(document).ready(function() { > .find('.dt-paging'); > pagination.toggle(this.api().page.info().pages > 1); > } >- KohaTable(service.id, tableDef, table_settings); >+ $("#" + service.id).kohaTable(tableDef, table_settings); > }); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >index 6661556ae88..95c0253e811 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >@@ -944,7 +944,7 @@ > }; > > function buildTable(identifiers) { >- table = KohaTable('identifier-table', { >+ table = $('#identifier-table').kohaTable({ > processing: true, > ordering: false, > paging: false, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-table.js >index 5413bc512df..93dfb00bff9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-table.js >@@ -44,9 +44,8 @@ > }; > > // Initialise the Datatable >- // FIXME: This should be a kohaTable not KohaTable > var initTable = function () { >- return KohaTable("ill-batch-requests", { >+ return $("#ill-batch-requests").kohaTable({ > data: batchesProxy.data, > columns: [ > { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/letter.js b/koha-tmpl/intranet-tmpl/prog/js/letter.js >index dbd7dcc6462..413a857c419 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/letter.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/letter.js >@@ -1,5 +1,5 @@ > /* Variables defined in letter.tt: */ >-/* global _ module add_form copy_form no_op_set code interface theme KohaTable table_settings */ >+/* global _ module add_form copy_form no_op_set code interface theme kohaTable table_settings */ > > var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>"; > >@@ -57,10 +57,13 @@ function confirmFormatOverwrite( event ) { > } > > $(document).ready(function() { >- var ntable = KohaTable("lettert", { >- "autoWidth": false, >- "paging": false, >- }, table_settings); >+ var ntable = $("#lettert").kohaTable( >+ { >+ autoWidth: false, >+ paging: false, >+ }, >+ table_settings >+ ); > > if( no_op_set ){ > $('#branch').change(function() { >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 594985403a0..d42f392a04b 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 table_settings */ >+/* global __ kohaTable table_settings */ > $(document).ready(function() { > window.modaction_legend_innerhtml = $("#modaction_legend").text(); > window.action_submit_value = $("#action_submit").val(); >@@ -104,8 +104,7 @@ $(document).ready(function() { > updateAllEvery(); > }); > >- KohaTable("templatest", { >- }, table_settings); >+ $("#templatest").kohaTable({}, table_settings); > > $(".confirm-delete-action").on("click", function(){ > return confirm( __("Are you sure you wish to delete this template action?") ); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >index df428f831bf..662f35e32dd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >@@ -1,4 +1,4 @@ >-/* global KohaTable allColumns Cookies */ >+/* global kohaTable allColumns Cookies */ > // Set expiration date for cookies > var date = new Date(); > date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); >@@ -118,13 +118,13 @@ function hideAllColumns() { > } > > $(document).ready(function () { >- var items_table = KohaTable("itemst", { >- "columnDefs": [ >- { "targets": [0, 1], "orderable": false, "searchable": true }, >- { "targets": [0], "visible": false }, >- { "type": "anti-the", "targets": ["anti-the"] } >+ var items_table = $("#itemst").kohaTable({ >+ columnDefs: [ >+ { targets: [0, 1], orderable: false, searchable: true }, >+ { targets: [0], visible: false }, >+ { type: "anti-the", targets: ["anti-the"] }, > ], >- "paging": false, >+ paging: false, > }); > > hideColumns(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >index 9b702933ae8..43da170172e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >@@ -1,4 +1,4 @@ >-/* global KohaTable columns_settings Sortable */ >+/* global kohaTable columns_settings Sortable */ > > function init() { > $('#ajax_status').hide(); >@@ -67,21 +67,27 @@ $(document).ready(function() { > }); > } > >- KohaTable("stock_rotation_manage_items", { >- "columnDefs": [ >- { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, >- { "type": "anti-the", "targets": [ "anti-the" ] } >- ], >- "pagingType": "full", >- "autoWidth": false, >- }, stock_rotation_items_table_settings); >+ $("#stock_rotation_manage_items").kohaTable( >+ { >+ columnDefs: [ >+ { orderable: false, searchable: false, targets: ["NoSort"] }, >+ { type: "anti-the", targets: ["anti-the"] }, >+ ], >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ stock_rotation_items_table_settings >+ ); > >- KohaTable("stock_rotation", { >- "columnDefs": [ >- { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, >- { "type": "anti-the", "targets": [ "anti-the" ] } >- ], >- "pagingType": "full", >- "autoWidth": false, >- }, stock_rotation_table_settings); >+ $("#stock_rotation").kohaTable( >+ { >+ columnDefs: [ >+ { orderable: false, searchable: false, targets: ["NoSort"] }, >+ { type: "anti-the", targets: ["anti-the"] }, >+ ], >+ pagingType: "full", >+ autoWidth: false, >+ }, >+ stock_rotation_table_settings >+ ); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js b/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >index 5bf64f05e81..9440b5dcb68 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >@@ -16,20 +16,21 @@ jQuery.validator.addMethod( "restrictionDisplayText", function(value){ > }, MSG_DUPLICATE_DISPLAY_TEXT); > > $(document).ready(function() { >- KohaTable("restriction_types", { >- "columnDefs": [{ >- "targets": [-1], >- "orderable": false, >- "searchable": false >- }, { >- "targets": [0, 1], >- "type": "natural" >- }, ], >- "order": [ >- [1, "asc"] >+ $("#restriction_types").kohaTable({ >+ columnDefs: [ >+ { >+ targets: [-1], >+ orderable: false, >+ searchable: false, >+ }, >+ { >+ targets: [0, 1], >+ type: "natural", >+ }, > ], >- "pagingType": "full", >- "exportColumns": [0,1], >+ order: [[1, "asc"]], >+ pagingType: "full", >+ exportColumns: [0, 1], > }); > > $("#restriction_form").validate({ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >index 25478703046..35a6c122470 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >@@ -106,11 +106,14 @@ $(document).ready(function(){ > } > }); > >- var logst = KohaTable("logst", { >- "autoWidth": false, >- "order": [[0, "desc"]], >- "pagingType" : "full" >- }, table_settings); >+ var logst = $("#logst").kohaTable( >+ { >+ autoWidth: false, >+ order: [[0, "desc"]], >+ pagingType: "full", >+ }, >+ table_settings >+ ); > > $("body").on("click", ".compare_link", function(e){ > e.preventDefault(); >-- >2.34.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 26553
:
175186
|
175187
|
175188
|
175189
|
175190
|
175191
|
175874
|
175875
|
175876
|
175877
|
175878
|
175879
|
176359
|
176360
|
176361
|
176362
|
176363
|
176364
|
176588
|
176589
|
176590
|
176591
|
177087
|
177088
|
177089
|
177090
|
177091
|
177092
|
177152
|
177153
|
177154
|
177155
|
177156
|
177157
|
177158
|
177234
|
177235
|
177236
|
177237
|
177238
|
177239
|
177240
|
177241
|
177242
|
177243
|
177246
|
177247
|
177264
|
177265
|
177271
|
177888
|
177889
|
177890
|
177891
|
177892
|
177893
|
177894
|
177895
|
177896
|
177897
|
177898
|
177899
|
177900
|
178508
|
178509
|
178510
|
178511
|
178512
|
178513
|
178514
|
178515
|
178516
|
178517
|
178518
|
178519
|
178520
|
178521
|
178522
|
178523
|
178524
|
178525
|
178526
|
178527
|
178528
|
178529
|
178530
|
178531
|
178532
|
178533