Bug 27682: (follow-up) Make sure table is drawn with correct width
authorOwen Leonard <oleonard@myacpl.org>
Thu, 4 Mar 2021 18:39:15 +0000 (18:39 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Mar 2021 14:05:25 +0000 (15:05 +0100)
commit76f929f7600417cd15d046a7c6e0c6edf74c96e9
tree53cd49079be84ddcd949da68ce1440e922d262c9
parentc9b4abac0fef33e94469d47915a30db86d482b6a
Bug 27682: (follow-up) Make sure table is drawn with correct width

The DataTables plugin calculates the width of the fixed header based on
the initial width of the corresponding table. Since these tables are
inside jQueryUI tabs, the width changes when the tabs are initialized
and jQueryUI adds its classes to the table's container.

This patch "manually" adds the relevant classes to the markup so that
the table's container is drawn with the right padding from the start.

Also fixed: Don't try to destroy "oldTableId" if the tableInit function
didn't pass an oldtabid.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt
koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js