From b1f33f34b3b9d7c3b04e2ffd648a84018d346780 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2024 14:47:27 +0100 Subject: [PATCH] Bug 35138: A bit of cleaning - UI This can be moved to its own bug report, it's only a bit of cleaning trying to keep the code cleaner after than before. No behaviour changes expected. Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Clemens Tubach Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- .../searchengine/elasticsearch/mappings.tt | 16 ++--- .../prog/js/elasticsearch-mappings.js | 58 +++++++++---------- 2 files changed, 36 insertions(+), 38 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 5ee9404227..95a5c076ad 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 @@ -263,16 +263,16 @@ a.add, a.delete { [% IF search_field.is_mapped %] - Delete + Delete [% ELSE %] - Delete + Delete [% END %] [% END %] - + @@ -434,16 +434,16 @@ a.add, a.delete { [% IF mapping.search_field_mandatory %] - Delete + Delete [% ELSE %] - Delete + Delete [% END %] [% END %] [% END %] - + - Delete + Delete [% END %] - + '.format(label.escapeHtml(), search_field_name.escapeHtml()), ' %s'.format(__("Delete"))]; + new_line = [next_id, search_field_name, '%s'.format(label.escapeHtml(), search_field_name.escapeHtml()), build_delete_link()] dt.row.add(new_line).draw(); - $(table).on( 'click', '.delete', function () { - var table = $(this).closest('table'); - let dt = $(table).DataTable(); - dt.row( $(this).closest('tr') ).remove().draw(); - } ); - clean_line(line); } }); -- 2.39.5