Bug 29893: Prevent ES mappings UI to remove hidden rows
If you are editing ES mappings and you use the DataTable filtering option, the table won't contain all the mappings you have in the DB. If the form is submitted they will be removed and data will be lost! Test plan: Edit ES mappings, filter and submit the form. Confirm that the table are redrawn before the form submission which prevent data loss Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
0b71d861eb
commit
0fa0f486c5
|
|
@ -114,7 +114,7 @@ a.add, a.delete {
|
|||
</ol>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
<form id="es_mappings" method="post">
|
||||
<div id="tabs" class="toptabs ui-tabs" style="clear:both">
|
||||
<ul>
|
||||
<li><a href="#search_fields">Search fields</a></li>
|
||||
|
|
|
|||
|
|
@ -82,4 +82,12 @@ $(document).ready(function () {
|
|||
$("#facet_biblios > table").tableDnD({
|
||||
onDragClass: "dragClass highlighted-row",
|
||||
});
|
||||
|
||||
$("#es_mappings").on("submit", function(e){
|
||||
e.preventDefault();
|
||||
$("#search_fields_table").DataTable().search('').draw();
|
||||
$("#mapping_biblios_table").DataTable().search('').draw();
|
||||
$("#mapping_authorities_table").DataTable().search('').draw();
|
||||
this.submit();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue