Bug 33484: Add tables_settings.default_save_state_search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-10-03 10:44:01 +02:00 committed by Katrin Fischer
parent 9060d4a305
commit 8de5c02514
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
5 changed files with 12 additions and 3 deletions

View File

@ -116,6 +116,7 @@ modules:
parcel:
pending_orders:
default_save_state_search: 1
columns:
-
columnname: checkbox
@ -213,6 +214,7 @@ modules:
suggestions:
suggestions:
default_save_state_search: 1
columns:
-
columnname: selections
@ -1960,6 +1962,7 @@ modules:
circ-overdues:
default_display_length: 20
default_sort_order: 0
default_save_state_search: 1
columns:
-
columnname: due_date

View File

@ -13,5 +13,12 @@ return {
});
say $out "Added column 'tables_settings.default_save_state'";
}
if ( !column_exists( 'tables_settings', 'default_save_state_search' ) ) {
$dbh->do(q{
ALTER TABLE tables_settings
ADD COLUMN default_save_state_search tinyint(1) DEFAULT 0 AFTER default_save_state
});
say $out "Added column 'tables_settings.default_save_state_search'";
}
},
};

View File

@ -6297,6 +6297,7 @@ CREATE TABLE `tables_settings` (
`default_display_length` smallint(6) DEFAULT NULL,
`default_sort_order` varchar(255) DEFAULT NULL,
`default_save_state` tinyint(1) DEFAULT 1,
`default_save_state_search` tinyint(1) DEFAULT 0,
PRIMARY KEY (`module`(191),`page`(191),`tablename`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@ -374,7 +374,7 @@
if ( $("#receivedt").length ) {
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
"stateSave": true,
"stateSave": true, // We do not have table settings on this table
"pageLength": 10,
"lengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
"columnDefs": [
@ -413,7 +413,6 @@
"current_item_level_holds+count",
"items"
],
"stateSave": true, // remember state on page reload
"columns": [
{ "data": "basket.name",
"searchable": true,

View File

@ -339,7 +339,6 @@
KohaTable("overduest", {
"pagingType": "full",
"autoWidth": false,
"stateSave": true
}, table_settings);
$("#showall").on("change", function(){