From 0db812765234a699c982540d5edb004aa174143f 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 (cherry picked from commit 60e3f1024ba485573e53488575afd605a364a8bb) Signed-off-by: Fridolin Somers (cherry picked from commit 01d85cfd0baa511354f39b2074463abc3394d121) Signed-off-by: Lucas Gass --- 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/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 | 10 +- .../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 +- .../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 | 2 +- .../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 | 6 +- .../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 | 188 +++++++++--------- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 8 +- koha-tmpl/intranet-tmpl/prog/js/holds.js | 26 +-- .../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 +- 123 files changed, 781 insertions(+), 752 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 13db52850b..d6cf0f6155 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 c83940c228..cae7ee921c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -396,7 +396,7 @@ [% END %] }, [% END %] - "iDeferLoading": defer_loading, + "deferLoading": defer_loading, "columns": [ [% FOR column IN columns %] [% IF default_sort_column == column %] @@ -620,9 +620,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 6fa7008a90..a0e30aa1b5 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 @@ -218,7 +218,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; @@ -248,14 +248,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 227590042b..1b13c277fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1079,13 +1079,13 @@ table_settings['columns'].splice(16, 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[% IF (Koha.Preference('EDIFACT') && ediaccount) %],16[% 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/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index b0c7a01add..3ac9edb98d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -254,13 +254,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 4b09a4d8f2..75aa3fbbff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -355,18 +355,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, @@ -376,7 +376,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 45bd57cfe2..e4654d9a1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -241,7 +241,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 bba5f5ce6a..2ff3de8855 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -625,10 +625,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 acd34da334..963048a771 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -174,10 +174,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 1d0b26f925..a1eaedbecf 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 @@ -352,8 +352,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 00f340f70a..fa458c6ec2 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 @@ -157,10 +157,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 00dfa35f4f..d0f59ca6c5 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 @@ -231,10 +231,10 @@ Cash registers › Administration › Koha $(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 2eb8f443b0..cfbcbdfd2b 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 @@ -235,14 +235,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 0bd97fed85..13e02752e8 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 @@ -253,14 +253,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 57209f1053..37772531bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -533,7 +533,7 @@ Item types › Administration › Koha $(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 6b8aea71be..5cc181c6e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt @@ -102,8 +102,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 dde2683174..0880761943 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt @@ -185,7 +185,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 ab3d0559be..7356ba7393 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 @@ -377,18 +377,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 0027043715..40c49eb3b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt @@ -318,10 +318,10 @@ MARC frameworks › Administration › Koha 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 607ba305cf..a97a675c4a 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 @@ -383,7 +383,7 @@ Patron attribute types › Administration › Koha $(".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 6871a7e5dd..bb030743cb 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 @@ -1393,13 +1393,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 e3197dbfb4..450b952c9c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -309,10 +309,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 9f3b0a280f..725ca167c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2136,11 +2136,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' ); @@ -2174,20 +2174,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 %] @@ -2209,21 +2209,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 `