From 93f1c20cb492e477f3f496eca4b5ffbc59e63c67 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Dec 2021 14:09:28 +0100 Subject: [PATCH] Bug 29648: Notice template - only sort Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- admin/columns_settings.yml | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/letter.js | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index e76ff5ca7b..7f058341b5 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1694,6 +1694,7 @@ modules: cannot_be_modified: 1 notices: lettert: + default_sort_order: 3 columns: - columnname: library diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 3e1e0daa05..5df167339d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -596,7 +596,7 @@ var code = '[% code | html %]'; var new_lettercode = '[% new_lettercode | html %]'; var new_branchcode = '[% new_branchcode | html %]'; - var columns_settings = [% TablesSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; + var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; [% Asset.js("js/letter.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/letter.js b/koha-tmpl/intranet-tmpl/prog/js/letter.js index f543ab4c29..7ab4f7f46d 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 columns_settings */ +/* global _ module add_form copy_form no_op_set code interface theme KohaTable table_settings */ var modal_loading = "
\"\" "+ __('Loading...') +"
"; @@ -44,8 +44,7 @@ $(document).ready(function() { var ntable = KohaTable("lettert", { "autoWidth": false, "paging": false, - "aaSorting": [[ 3, "asc" ]], - }, columns_settings); + }, table_settings); if( no_op_set ){ $('#branch').change(function() { -- 2.39.5