Bug 29648: Notice template - only sort
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Dec 2021 13:09:28 +0000 (14:09 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 27 Apr 2022 21:20:44 +0000 (11:20 -1000)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/columns_settings.yml
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
koha-tmpl/intranet-tmpl/prog/js/letter.js

index e76ff5c..7f05834 100644 (file)
@@ -1694,6 +1694,7 @@ modules:
               cannot_be_modified: 1
     notices:
       lettert:
+        default_sort_order: 3
         columns:
             -
               columnname: library
index 3e1e0da..5df1673 100644 (file)
         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 %];
      </script>
     [% Asset.js("js/letter.js") | $raw %]
 [% END %]
index f543ab4..7ab4f7f 100644 (file)
@@ -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 = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>";
 
@@ -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() {