Bug 26970: Add row highlight on drag in Elasticsearch mapping template
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 9 Nov 2020 08:36:28 +0000 (09:36 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Apr 2021 14:08:04 +0000 (16:08 +0200)
In Elasticsearch mapping tables :
In order to better see which row is currently in drag-an-drop,
add an highlight color like in circulation and fine rules when editing a row.

Test plan :
1) Go to Administration > Search engine configuration (Elasticsearch)
2) In each table : biblio, authorities, facets
3) Clik on a row to start a drag => See row turning orange
4) Release to drop => See row turning back to original color

https://bugs.koha-community.org/show_bug.cgi?id=26970
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js

index a6bd0baa4174ae727c8abe9f758e63a2efaaeea8..4b36850c4a2ec69bc17a65162f2a9fc94e3d2d93 100644 (file)
@@ -58,7 +58,7 @@ $(document).ready(function () {
     });
 
     $("table.mappings").tableDnD({
-        onDragClass: "dragClass",
+        onDragClass: "dragClass highlighted-row",
     });
 
     $('.add').click(function () {
@@ -75,11 +75,11 @@ $(document).ready(function () {
             clean_line(line);
 
             $(table).tableDnD({
-                onDragClass: "dragClass",
+                onDragClass: "dragClass highlighted-row",
             });
         }
     });
     $("#facet_biblios > table").tableDnD({
-        onDragClass: "dragClass",
+        onDragClass: "dragClass highlighted-row",
     });
 });