From 93866a23205983df93cc954c10acb31ca61ad804 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Sep 2023 17:43:32 +0000 Subject: [PATCH] Bug 34913: DataTables upgrade: Update CSS and option names This patch makes two categories of changes: 1. CSS changes to accommodate changes in DataTables default CSS and markup structure. I've tried to make sure all of our Koha-specific styles are still applying. This change necessitates a rebuild of staff interface CSS. 2. DataTables option names: In this version of DataTables you can't override a default which uses CamelCase (e.g. "pagingType") with one in "Hungarian" notation, e.g. "sPaginationType." Since we define many default options in prog/js/datatables.js in camel case, any template which previously used a Hungarian notation option to override the default has now been updated to use the CamelCase version. See https://datatables.net/upgrade/1.10-convert#Options for a summary of the different option name changes. Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- Koha/Template/Plugin/TablesSettings.pm | 4 +- .../intranet-tmpl/prog/css/src/_tables.scss | 165 +++++++++------ .../prog/en/includes/patron-search.inc | 6 +- .../prog/en/modules/acqui/acqui-home.tt | 16 +- .../prog/en/modules/acqui/basket.tt | 4 +- .../prog/en/modules/acqui/basketgroup.tt | 8 +- .../prog/en/modules/acqui/booksellers.tt | 14 +- .../prog/en/modules/acqui/duplicate_orders.tt | 2 +- .../prog/en/modules/acqui/histsearch.tt | 2 +- .../prog/en/modules/acqui/invoice-files.tt | 12 +- .../prog/en/modules/acqui/invoice.tt | 20 +- .../prog/en/modules/acqui/invoices.tt | 8 +- .../prog/en/modules/acqui/lateorders.tt | 6 +- .../en/modules/acqui/newordersubscription.tt | 8 +- .../en/modules/acqui/newordersuggestion.tt | 8 +- .../prog/en/modules/acqui/ordered.tt | 6 +- .../prog/en/modules/acqui/parcel.tt | 24 +-- .../prog/en/modules/acqui/parcels.tt | 2 +- .../prog/en/modules/acqui/spent.tt | 6 +- .../prog/en/modules/acqui/supplier.tt | 6 +- .../prog/en/modules/acqui/uncertainprice.tt | 6 +- .../prog/en/modules/acqui/z3950_search.tt | 12 +- .../en/modules/admin/additional-fields.tt | 12 +- .../prog/en/modules/admin/aqbudgetperiods.tt | 26 +-- .../prog/en/modules/admin/aqbudgets.tt | 16 +- .../en/modules/admin/auth_tag_structure.tt | 6 +- .../en/modules/admin/authorised_values.tt | 4 +- .../modules/admin/branch_transfer_limits.tt | 6 +- .../prog/en/modules/admin/cash_registers.tt | 6 +- .../prog/en/modules/admin/credit_types.tt | 14 +- .../prog/en/modules/admin/debit_types.tt | 14 +- .../prog/en/modules/admin/itemtypes.tt | 2 +- .../prog/en/modules/admin/koha2marclinks.tt | 4 +- .../prog/en/modules/admin/localization.tt | 2 +- .../en/modules/admin/marc-overlay-rules.tt | 24 +-- .../prog/en/modules/admin/marctagstructure.tt | 6 +- .../prog/en/modules/admin/overdrive.tt | 6 +- .../en/modules/admin/patron-attr-types.tt | 2 +- .../prog/en/modules/admin/smart-rules.tt | 12 +- .../en/modules/admin/systempreferences.tt | 8 +- .../prog/en/modules/admin/z3950servers.tt | 6 +- .../prog/en/modules/catalogue/detail.tt | 44 ++-- .../prog/en/modules/catalogue/issuehistory.tt | 6 +- .../prog/en/modules/catalogue/itemsearch.tt | 58 ++--- .../en/modules/catalogue/itemsearch_json.tt | 2 +- .../en/modules/catalogue/search-history.tt | 8 +- .../modules/cataloguing/z3950_auth_search.tt | 10 +- .../en/modules/cataloguing/z3950_search.tt | 8 +- .../prog/en/modules/circ/article-requests.tt | 12 +- .../prog/en/modules/circ/checkout-notes.tt | 2 +- .../circ/circulation_batch_checkouts.tt | 12 +- .../prog/en/modules/circ/overdue.tt | 2 +- .../prog/en/modules/circ/pendingreserves.tt | 2 +- .../prog/en/modules/circ/reserveratios.tt | 10 +- .../prog/en/modules/circ/returns.tt | 14 +- .../prog/en/modules/circ/transfers_to_send.tt | 10 +- .../en/modules/circ/transferstoreceive.tt | 10 +- .../prog/en/modules/circ/view_holdsqueue.tt | 6 +- .../prog/en/modules/circ/waitingreserves.tt | 6 +- .../prog/en/modules/clubs/club-enrollments.tt | 8 +- .../prog/en/modules/clubs/clubs.tt | 16 +- .../modules/course_reserves/course-details.tt | 4 +- .../course_reserves/course-reserves.tt | 4 +- .../en/modules/labels/label-edit-batch.tt | 10 +- .../prog/en/modules/labels/label-manage.tt | 8 +- .../prog/en/modules/members/boraccount.tt | 6 +- .../prog/en/modules/members/holdshistory.tt | 4 +- .../prog/en/modules/members/housebound.tt | 2 +- .../en/modules/members/moremember-print.tt | 6 +- .../prog/en/modules/members/notices.tt | 4 +- .../modules/members/purchase-suggestions.tt | 8 +- .../prog/en/modules/members/readingrec.tt | 4 +- .../prog/en/modules/members/statistics.tt | 4 +- .../prog/en/modules/members/update-child.tt | 10 +- .../prog/en/modules/patron_lists/list.tt | 2 +- .../prog/en/modules/patron_lists/lists.tt | 6 +- .../prog/en/modules/patroncards/edit-batch.tt | 10 +- .../prog/en/modules/plugins/plugins-home.tt | 2 +- .../intranet-tmpl/prog/en/modules/pos/pay.tt | 38 ++-- .../prog/en/modules/pos/registers.tt | 2 +- .../en/modules/recalls/recalls_to_pull.tt | 10 +- .../en/modules/recalls/recalls_waiting.tt | 6 +- .../en/modules/reports/cash_register_stats.tt | 4 +- .../modules/reports/guided_reports_start.tt | 14 +- .../prog/en/modules/reports/itemslost.tt | 10 +- .../prog/en/modules/reports/itemtypes.tt | 4 +- .../prog/en/modules/reports/serials_stats.tt | 2 +- .../prog/en/modules/reserve/request.tt | 4 +- .../prog/en/modules/serials/claims.tt | 10 +- .../en/modules/serials/serials-collection.tt | 16 +- .../prog/en/modules/serials/serials-search.tt | 24 +-- .../en/modules/serials/subscription-detail.tt | 12 +- .../serials/subscription-numberpatterns.tt | 6 +- .../prog/en/modules/tags/list.tt | 8 +- .../prog/en/modules/tools/access_files.tt | 6 +- .../en/modules/tools/additional-contents.tt | 4 +- .../en/modules/tools/batch_delete_records.tt | 24 +-- .../modules/tools/batch_extend_due_dates.tt | 24 +-- .../tools/batch_record_modification.tt | 24 +-- .../prog/en/modules/tools/holidays.tt | 8 +- .../prog/en/modules/tools/inventory.tt | 14 +- .../en/modules/tools/manage-marc-import.tt | 32 +-- .../prog/en/modules/tools/problem-reports.tt | 2 +- .../prog/en/modules/tools/quotes-upload.tt | 20 +- .../prog/en/modules/virtualshelves/shelves.tt | 40 ++-- .../virtualshelves/tables/shelves_results.tt | 2 +- .../intranet-tmpl/prog/js/addorderiso2709.js | 10 +- koha-tmpl/intranet-tmpl/prog/js/authtype.js | 10 +- .../intranet-tmpl/prog/js/biblio_framework.js | 10 +- koha-tmpl/intranet-tmpl/prog/js/cart.js | 14 +- .../prog/js/cataloging_additem.js | 6 +- koha-tmpl/intranet-tmpl/prog/js/categories.js | 14 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 200 +++++++++--------- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 8 +- koha-tmpl/intranet-tmpl/prog/js/holds.js | 36 ++-- .../prog/js/marc_subfields_structure.js | 4 +- .../intranet-tmpl/prog/js/pages/batchMod.js | 10 +- .../prog/js/pages/preferences.js | 8 +- .../prog/js/pages/stockrotation.js | 16 +- .../prog/js/pages/tags-review.js | 10 +- koha-tmpl/intranet-tmpl/prog/js/recalls.js | 10 +- .../intranet-tmpl/prog/js/restrictiontypes.js | 16 +- .../prog/js/rotating-collections.js | 6 +- .../intranet-tmpl/prog/js/subscription-add.js | 8 +- .../intranet-tmpl/prog/js/table_filters.js | 4 +- 125 files changed, 830 insertions(+), 801 deletions(-) diff --git a/Koha/Template/Plugin/TablesSettings.pm b/Koha/Template/Plugin/TablesSettings.pm index 2eb443f74e..9e6eccc433 100644 --- a/Koha/Template/Plugin/TablesSettings.pm +++ b/Koha/Template/Plugin/TablesSettings.pm @@ -41,7 +41,7 @@ Koha::Template::Plugin::TablesSettings This plugin allows to get the column configuration for a table. It should be used both in table markup @@ -65,7 +65,7 @@ use C4::Utils::DataTables::TablesSettings; Used to get the full column settings configuration for datatables, usually requires a format of 'json' to pass into diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss index 8e96f4dfe6..0adfb7532b 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -112,31 +112,45 @@ table { padding: 0; } } - } - .sorting_asc { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L2c+PC9zdmc+" ) no-repeat scroll right center $table-header-background; - padding-right: 19px; + th { + padding: .5em; + text-align: center; - &.fixed_sort { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L3N2Zz4=" ) no-repeat scroll right center $table-header-background; - cursor: default; - } - } + &.sorting { + position: static; + } - .sorting_desc { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvZz48L3N2Zz4=" ) no-repeat scroll right center $table-header-background; - padding-right: 19px; + &.sorting::before, + &.sorting::after { + content: unset; + } - &.fixed_sort { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvc3ZnPg==" ) no-repeat scroll right center $table-header-background; - cursor: default; - } - } + &.sorting_asc { + background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L2c+PC9zdmc+" ) no-repeat scroll right center $table-header-background; + padding-right: 22px; + + &.fixed_sort { + background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L3N2Zz4=" ) no-repeat scroll right center $table-header-background; + cursor: default; + } + } + + &.sorting_desc { + background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvZz48L3N2Zz4=" ) no-repeat scroll right center $table-header-background; + padding-right: 22px; + + &.fixed_sort { + background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvc3ZnPg==" ) no-repeat scroll right center $table-header-background; + cursor: default; + } + } - .sorting:not(.sorting_asc):not(.sorting_desc) { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi41NTFtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMyAyLjU1MDY2MTQiPjxwYXRoIGZpbGw9IiNhY2FjYWMiIGQ9Ik00LjA1IDEuNDVoLTIuMUwzIDIuNTV6Ii8+PHBhdGggZmlsbD0iI2FjYWNhYyIgZD0iTTQuMDUgMS4xaC0yLjFMMyAweiIvPjwvc3ZnPg==" ) no-repeat scroll right center $table-header-background; - padding-right: 19px; + &.sorting:not(.sorting_asc):not(.sorting_desc) { + background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi41NTFtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMyAyLjU1MDY2MTQiPjxwYXRoIGZpbGw9IiNhY2FjYWMiIGQ9Ik00LjA1IDEuNDVoLTIuMUwzIDIuNTV6Ii8+PHBhdGggZmlsbD0iI2FjYWNhYyIgZD0iTTQuMDUgMS4xaC0yLjFMMyAweiIvPjwvc3ZnPg==" ) no-repeat scroll right center $table-header-background; + padding-right: 22px; + } + } } } @@ -392,8 +406,6 @@ tbody { color: #333; height: unset; left: 50%; - margin-left: -125px; - margin-top: -15px; padding: 1.5em; position: fixed; text-align: center; @@ -419,6 +431,11 @@ tbody { float: none; padding-right: 1em; white-space: nowrap; + + input { + border-radius: 0; + padding: 1px 2px; + } } .dt-buttons { @@ -561,65 +578,68 @@ tbody { } } /* /.pager */ -button, -div, -a { - &.dt-button { - background: transparent none; - border: 1px solid transparent; - border-radius: 4px; - color: #000; - font-size: 1em; - line-height: 1.7em; - margin: 0 3px 0; - padding: 0 .5em; - - &::before { - content: ""; - } - - &.disabled { +.dt-buttons { + button, + div, + a { + &.dt-button { background: transparent none; border: 1px solid transparent; - color: #999; - cursor: default; + border-radius: 4px; + color: #000; + font-size: 1em; + line-height: 1.7em; + margin: 0 3px 0; + padding: 0 .5em; - &:focus { - border: 1px solid #ADADAD; + &::before { + content: ""; } - a, - span { + &.disabled { background: transparent none; - } - } + border: 1px solid transparent; + color: #999; + cursor: default; + opacity: 1; - &:active:not( .disabled ), - &:focus:not( .disabled ) { - background: transparent none; - border: 1px solid #ADADAD; - box-shadow: none; - text-shadow: none; + &:focus { + border: 1px solid #ADADAD; + } - &:not( .disabled ):hover:not( .disabled ) { - background: #EEE none; - border: 1px solid transparent; + a, + span { + background: transparent none; + } + } + + &:active:not( .disabled ), + &:focus:not( .disabled ) { + background: transparent none; + border: 1px solid #ADADAD; box-shadow: none; + text-shadow: none; + + &:not( .disabled ):hover:not( .disabled ) { + background: #EEE none; + border: 1px solid transparent; + box-shadow: none; + } } - } - &:hover { - background: transparent none; - border: 1px solid transparent; + &:hover { + background: transparent none; + border: 1px solid transparent; - &:not( .disabled ) { - background: #EEE none; + &:not( .disabled ) { + background: #EEE none; + } } - } - &.active:not( .disabled ):hover:not( .disabled ) { - background: #EEE none; - border: 1px solid transparent; + &.active:not( .disabled ):hover:not( .disabled ) { + background: #EEE none; + border: 1px solid transparent; + } } } } @@ -650,6 +670,7 @@ a { div { &.dt-button-collection { + padding: 8px 8px 4px 8px; width: auto; button { @@ -657,6 +678,10 @@ div { border-radius: 2px; text-align: left; + &:hover:not(.disabled) { + border: 1px solid #EEE; + } + &.buttons-collection { border: 0; } @@ -670,6 +695,10 @@ div { padding: .3em .7em; text-shadow: none; + &::after { + content: unset; + } + &::before { color: #CC0000; content: "\f00d"; @@ -699,7 +728,7 @@ div { box-shadow: none; } - &.active { + &.dt-button-active { background: #E6F0F2 none; border-color: #999; box-shadow: none; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 11fc20a8e2..1ffaf22b8c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -398,7 +398,7 @@ [% END %] }, [% END %] - "iDeferLoading": defer_loading, + "deferLoading": defer_loading, "columns": [ [% FOR column IN columns %] [% IF default_sort_column == column %] @@ -624,9 +624,9 @@ ], 'embed': [% To.json(embed) | $raw %], "order": [[ [% order_column_index | html %], "asc" ]], - 'bAutoWidth': false, + "autoWidth": false, 'lengthMenu': [aLengthMenu, aLengthMenuLabel], - 'sPaginationType': 'full_numbers', + "pagingType": 'full_numbers', "pageLength": [% Koha.Preference('PatronsPerPage') | html %], [% IF sticky_header %] "initComplete": function(settings, json) { 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 51f98886f9..cef41587e6 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 @@ -231,7 +231,7 @@ $(document).ready(function() { var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %]; var oTable = KohaTable("accounts", { - "fnDrawCallback": function ( oSettings ) { + "drawCallback": function ( oSettings ) { if ( oSettings.aiDisplay.length == 0 ) { return; @@ -261,14 +261,14 @@ var api = this.api(), data; footer_column_sum( api, [ 6, 7, 8, 9 ] ); }, - "aoColumnDefs": [ - { "bVisible": false, "aTargets": [ 0, 1 ] }, - { "bSortable": false, "aTargets": ["_all"] } + "columnDefs": [ + { "visible": false, "targets": [ 0, 1 ] }, + { "orderable": false, "targets": ["_all"] } ], - 'bSort': true, - 'aaSortingFixed': [[ 1, 'asc' ]], - 'bPaginate': false, - "bAutoWidth": false + "ordering": true, + "orderFixed": [[ 1, 'asc' ]], + "paginate": false, + "autoWidth": false }, table_settings ); $(oTable).treetable({ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 129567a290..0837f1ee24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1112,13 +1112,13 @@ table_settings['columns'].splice(18, 1); [% END %] KohaTable("orders", { - "sPaginationType": "full", + "pagingType": "full", "autoWidth": false, "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18[% IF (Koha.Preference('EDIFACT') && ediaccount) %],19[% END %]], }, table_settings); var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { - "sPaginationType": "full" + "pagingType": "full" } ) ); $("#reopenbutton").on("click",function(e){ e.preventDefault(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 48824adea3..c98f9794fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -383,11 +383,11 @@ [% END %] [% UNLESS ( grouping ) %] $("table").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + "columnDefs": [ + { "targets": [ -1 ], "orderable": false, "searchable": false }, ], - "bAutoWidth": false, - "sPaginationType": "full" + "autoWidth": false, + "pagingType": "full" } )); [% ELSE %] grouped = $("#grouped").DataTable($.extend(true, {}, dataTablesDefaults, { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index fbf2d71fbe..7be416289d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -257,13 +257,13 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index c015324c2b..f5fb1ae912 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -360,18 +360,18 @@ if ( $("#receivedt").length ) { var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { - "bStateSave": true, - "iDisplayLength": 10, - "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], - "aoColumnDefs": [ - { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false }, + "stateSave": true, + "pageLength": 10, + "lengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], + "columnDefs": [ + { "targets": [ 5, -1 ], "orderable": false, "searchable": false }, ], - "aoColumns": [ - { "sType": "html" }, - { "sType": "html" }, - { "sType": "html" }, - { "sType": "num-html" }, - { "sType": "anti-the" }, + "columns": [ + { "type": "html" }, + { "type": "html" }, + { "type": "html" }, + { "type": "num-html" }, + { "type": "anti-the" }, null, null, null, @@ -381,7 +381,7 @@ null, null ], - "sPaginationType": "full" + "pagingType": "full" })); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index 915bf002a5..e341ea7c55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -246,7 +246,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index fae8f92e65..c7c7d0ad5f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -681,10 +681,10 @@ $(document).ready(function() { var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] } + "columnDefs": [ + { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] } ], - 'sDom': 't' + "dom": 't' } ) ); $('body').on('click', '.delete-contact', null, delete_contact); $('#add-contact').click(add_contact); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index f5ead80507..11a1b2f43a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -182,10 +182,10 @@ 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 a7915d3189..5691485626 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 @@ -365,8 +365,8 @@ $(document).ready(function() { KohaTable("categoriest", { - "aaSorting": [[ 0, "asc" ]], - "sPaginationType": "full" + "order": [[ 0, "asc" ]], + "pagingType": "full" }); if ( $("#branches option:selected").length < 1 ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index fb5b811c8e..73f390aecc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -164,10 +164,10 @@ }); $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + "columnDefs": [ + { "targets": [ -1 ], "orderable": false, "searchable": false }, ], - 'bPaginate': false + "paginate": false })); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt index 123db80777..ba5009746e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt @@ -242,10 +242,10 @@ $(document).ready(function() { var crtable = $("#table_cash_registers").DataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable":false }, + "columnDefs": [ + { "targets": [ -1, -2 ], "orderable": false, "searchable": false }, ], - "aaSorting": [[ 1, "asc" ]], + "order": [[ 1, "asc" ]], "paginationType": "full", })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt index bf8ceaec6a..53351e13ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt @@ -238,14 +238,14 @@ var txtActivefilter = _("Filter system credit types"); var txtInactivefilter = _("Show all credit types"); var table_credit_types = $("#table_credit_types").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, - { "aTargets": [ 0, 1 ], "bSortable": false, "bVisible": false }, + "columnDefs": [ + { "targets": [ -1 ], "orderable": false, "searchable": false }, + { "targets": [ 0, 1 ], "orderable": false, "visible": false }, ], - "aaSorting": [[ 0, "asc" ],[ 2, "asc" ]], - "sDom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>', - "iDisplayLength": 20, - "sPaginationType": "full_numbers" + "order": [[ 0, "asc" ],[ 2, "asc" ]], + "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>', + "pageLength": 20, + "pagingType": "full_numbers" })); $("#filter_s").html('

'+txtActivefilter+''); $('#filter_system').click(function(e) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt index 8ba8cc4077..acd3043893 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt @@ -257,14 +257,14 @@ var txtActivefilter = _("Filter system debit types"); var txtInactivefilter = _("Show all debit types"); var table_debit_types = $("#table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, - { "aTargets": [ 0, 1 ], "bSortable": false, "bVisible": false }, + "columnDefs": [ + { "targets": [ -1 ], "orderable": false, "searchable": false }, + { "targets": [ 0, 1 ], "orderable": false, "visible": false }, ], - "aaSorting": [[ 0, "asc" ],[ 2, "asc" ]], - "sDom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>', - "iDisplayLength": 20, - "sPaginationType": "full_numbers" + "order": [[ 0, "asc" ],[ 2, "asc" ]], + "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>', + "pageLength": 20, + "pagingType": "full_numbers" })); $("#filter_s").html('

'+txtActivefilter+''); $('#filter_system').click(function(e) { 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 97f463c1cb..0e4b865519 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -539,7 +539,7 @@ $(document).ready(function() { KohaTable("table_item_type", { - "sPaginationType": "full" + "pagingType": "full" }, table_settings); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt index 9f4173498a..a08faafe41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt @@ -111,8 +111,8 @@ } $(document).ready(function() { $("#kohafields").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + "columnDefs": [ + { "targets": [ -1 ], "orderable": false, "searchable": false }, ], "paging": false } )); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt index 408be93034..78ebc09054 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt @@ -189,7 +189,7 @@ "columnDefs": [ { 'sortable': false, 'targets': [ 'NoSort' ] } ], - 'bPaginate': false, + "paginate": false, 'autoWidth': false, })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index 75598ae042..1f85eb86af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -382,18 +382,18 @@ } $('#marc-overlay-rules').dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumns": [ - {"bSearchable": false, "bSortable": false}, - {"sSortDataType": "dom-input"}, - {"sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "sSortDataType": "dom-input"}, - {"bSearchable": false, "bSortable": false}, - {"bSearchable": false, "bSortable": false} + "columns": [ + {"searchable": false, "orderable": false}, + {"orderDataType": "dom-input"}, + {"orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderDataType": "dom-input"}, + {"searchable": false, "orderable": false}, + {"searchable": false, "orderable": false} ], "pagingType": "simple" })); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt index 964823038f..7b5ee0db99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt @@ -331,10 +331,10 @@ 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 fe792072b1..dcd70629c8 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 @@ -431,7 +431,7 @@ $(".patron_attributes_types").each(function(){ var tableid = $(this).attr("id"); KohaTable( tableid, { - "bPaginate": false, + "paginate": false, 'autoWidth': false, }, null ); }); 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 1818256328..05ac96ea3b 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 @@ -1425,13 +1425,13 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index 8167404fdc..77cd40feb2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -317,10 +317,10 @@ [% ELSE %] $(document).ready(function() { $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [-1], "bSortable": false, "bSearchable": false }, + "columnDefs": [ + { "targets": [-1], "orderable": false, "searchable": false }, ], - "sPaginationType": "full" + "pagingType": "full" })); $(".delete").on("click",function(e){ var servername = $(this).data("servername"); 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 8f1f9c2d74..9d300688a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2149,11 +2149,11 @@ table_settings[index].columns.splice(1,1); } var dt_parameters = { - 'sDom': 't', - 'bPaginate': false, - 'bAutoWidth': false, + "dom": 't', + "paginate": false, + "autoWidth": false, "bKohaColumnsUseNames": true, - "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', + "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', }; var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' ); @@ -2187,20 +2187,20 @@ [% IF Koha.Preference('AcquisitionDetails') %] var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; var acquisitiondetails_table = KohaTable("orders", { - "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', - 'bPaginate': false, - 'bAutoWidth': false, - "aaSorting": [[ 4, "desc" ]], + "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', + "paginate": false, + "autoWidth": false, + "order": [[ 4, "desc" ]], }, table_settings); [% END %] [% IF suggestions.count %] $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, - { "sType": "anti-the", "aTargets" : [ "anti-the" ] } + "columnDefs": [ + { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, + { "type": "anti-the", "targets": [ "anti-the" ] } ], - "sPaginationType": "full" + "pagingType": "full" })); [% END %] @@ -2222,21 +2222,21 @@ [% IF Koha.Preference('EnableItemGroups') %] // Load item groups table var itemGroupsTable = KohaTable("items-group-table", { - "bAutoWidth": false, - 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r', - "aoColumns": [ + "autoWidth": false, + "dom": '<"top pager"ilp>t<"bottom pager"ip>r', + "columns": [ { - "mDataProp": function( oObj ) { + "data": function( oObj ) { return oObj.display_order; }, }, { - "mDataProp": function( oObj ) { + "data": function( oObj ) { return oObj.description; }, }, { - "mDataProp": function( oObj ) { + "data": function( oObj ) { [% IF CAN_user_editcatalogue_manage_item_groups %] return `