Bugzilla – Attachment 158493 Details for
Bug 35265
Remove drag and drop in Elasticsearch mappings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35265: Remove drag and drop in Elasticsearch mappings
Bug-35265-Remove-drag-and-drop-in-Elasticsearch-ma.patch (text/plain), 3.90 KB, created by
Fridolin Somers
on 2023-11-06 06:57:22 UTC
(
hide
)
Description:
Bug 35265: Remove drag and drop in Elasticsearch mappings
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-11-06 06:57:22 UTC
Size:
3.90 KB
patch
obsolete
>From 49798098226d60db193b3d895aeffb19b297f36d Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Sun, 5 Nov 2023 20:53:43 -1000 >Subject: [PATCH] Bug 35265: Remove drag and drop in Elasticsearch mappings > >Bug 18827 says ordering search fields in Elasticsearch mappings is useless. > >This patch removes it. > >Test plan : >1) Enable Elasticsearch >2) Go to Administration > Search engine configuration (Elasticsearch) >3) Go to tab 'Bibliographic records' >4) Check there is no Javscript error >5) Check you can't drag and drop lines anymore >--- > .../admin/searchengine/elasticsearch/mappings.tt | 5 ++--- > .../intranet-tmpl/prog/js/elasticsearch-mappings.js | 12 ------------ > 2 files changed, 2 insertions(+), 15 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 242eae6758..3287c35f45 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 >@@ -261,7 +261,7 @@ a.add, a.delete { > [% WRAPPER tab_panel tabname="mapping_${ index.index_name }" %] > <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"> >+ <tr> > <th>Search field</th> > <th>Sortable</th> > <th>Facetable</th> >@@ -387,7 +387,7 @@ a.add, a.delete { > [% END %] > </tbody> > <tfoot> >- <tr class="nodrag nodrop"> >+ <tr> > <td> > <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" /> > <select data-id="mapping_search_field_name"> >@@ -520,7 +520,6 @@ a.add, a.delete { > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.tablednd.js") | $raw %] > [% Asset.js("js/elasticsearch-mappings.js") | $raw %] > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >index 8bead3c010..610b0d3e8b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >@@ -7,7 +7,6 @@ function clean_line(line) { > > function clone_line(line) { > var new_line = $(line).clone(); >- $(new_line).removeClass("nodrag nodrop"); > $(new_line).find('td:last-child>a').removeClass("add").addClass("delete").html( __("Delete") ); > $(new_line).find('[data-id]').each(function () { > $(this).attr({ name: $(this).attr('data-id') }).removeAttr('data-id'); >@@ -58,10 +57,6 @@ $(document).ready(function () { > } > }); > >- $("table.mappings").tableDnD({ >- onDragClass: "dragClass highlighted-row", >- }); >- > $('.add').click(function () { > var table = $(this).closest('table'); > let table_id = table.attr('id'); >@@ -81,15 +76,8 @@ $(document).ready(function () { > } ); > > clean_line(line); >- >- $(table).tableDnD({ >- onDragClass: "dragClass highlighted-row", >- }); > } > }); >- $("#facet_biblios > table").tableDnD({ >- onDragClass: "dragClass highlighted-row", >- }); > > $("#es_mappings").on("submit", function(e){ > let table_ids = ['search_fields_table', 'mapping_biblios_table', 'mapping_authorities_table']; >-- >2.42.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 35265
:
158493
|
158582
|
159083
|
159781
|
159835
|
160605