Bugzilla – Attachment 117759 Details for
Bug 27682
Add a floating table header for Search engine configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27682: (follow-up) Make sure table is drawn with correct width
Bug-27682-follow-up-Make-sure-table-is-drawn-with-.patch (text/plain), 3.89 KB, created by
Owen Leonard
on 2021-03-04 18:43:31 UTC
(
hide
)
Description:
Bug 27682: (follow-up) Make sure table is drawn with correct width
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-03-04 18:43:31 UTC
Size:
3.89 KB
patch
obsolete
>From 72859d24651ffb9c3e7a29c769366f3ef694d84b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 4 Mar 2021 18:39:15 +0000 >Subject: [PATCH] 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. >--- > .../en/modules/admin/searchengine/elasticsearch/mappings.tt | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js | 10 ++++++---- > 2 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >index 7d9d9c8b08..9a886bd9bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >@@ -97,7 +97,7 @@ a.add, a.delete { > </div> > [% END %] > <form method="post"> >- <div id="tabs" class="toptabs" style="clear:both"> >+ <div id="tabs" class="toptabs ui-tabs" style="clear:both"> > <ul> > <li><a href="#search_fields">Search fields</a></li> > [% FOREACH index IN indexes %] >@@ -107,7 +107,7 @@ a.add, a.delete { > [% END %] > [% END %] > </ul> >- <div id="search_fields"> >+ <div id="search_fields" class="ui-tabs-panel"> > <table class="search_fields" id="search_fields_table"> > <thead> > <tr> >@@ -229,7 +229,7 @@ a.add, a.delete { > </table> > </div> > [% FOREACH index IN indexes %] >- <div id="mapping_[% index.index_name | html %]"> >+ <div id="mapping_[% index.index_name | html %]" class="ui-tabs-panel"> > <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table"> > <thead> > <tr class="nodrag nodrop"> >@@ -398,7 +398,7 @@ a.add, a.delete { > > [% IF index.index_name == 'biblios' %] > <h3>Facet order</h3> >- <div id="facet_[% index.index_name | html %]"> >+ <div id="facet_[% index.index_name | html %]" class="ui-tabs-panel"> > <table> > <thead> > <tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >index 99d9185a4b..a6bd0baa41 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >@@ -1,4 +1,4 @@ >-/* global __ */ >+/* global __ dataTablesDefaults */ > > function clean_line(line) { > $(line).find('input[type="text"]').val(""); >@@ -22,10 +22,12 @@ function clone_line(line) { > > function tableInit( oldtabid, newtabid ) { > >- var oldTableId = $("#" + oldtabid + "_table"); >- var newTableId = $("#" + newtabid + "_table"); >+ if ( oldtabid ){ >+ var oldTableId = $("#" + oldtabid + "_table"); >+ oldTableId.DataTable().destroy(); >+ } > >- oldTableId.DataTable().destroy(); >+ var newTableId = $("#" + newtabid + "_table"); > newTableId.DataTable( > $.extend(true, {}, dataTablesDefaults, { > "columnDefs": [ >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27682
:
117088
|
117104
|
117422
| 117759