Bug 36663: Hide specific inner elements, not the whole top pager container

1- Enable StaffDetailItemSelection
2- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
3- Notice there are no table configuration options on the top right (Columns, Export, Configure).
4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input.
5- Disable StaffDetailItemSelection
6- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input.
8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible.
9- Apply patches, run yarn css:build
10- Repeat 1 and 2.
11- Notice the table configuration options are shown on the top right, and no other table options exist.

Further testing:
Test clicking hide/show filters
Test with StaffDetailItemSelection enabled/disabled
Test other datatables in other pages

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-04-22 15:53:57 +00:00 committed by Katrin Fischer
parent 940538a935
commit ebd00617e1
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -819,7 +819,9 @@
if (!add_filters && settings._iRecordsDisplay == settings._iRecordsTotal && settings._iDisplayLength >= settings._iRecordsDisplay){
let container = $(this).parent();
container.find(".dt-info").remove();
container.find(".top.pager").remove();
container.find(".table_entries").remove();
container.find(".dataTables_filter").remove();
container.find(".dt_button_clear_filter").remove();
container.find(".bottom.pager").remove();
}