Bug 14276: Keep highlight on the active item in item editor
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 26 May 2015 12:52:07 +0000 (14:52 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 5 Jun 2015 15:54:36 +0000 (12:54 -0300)
The highlight only works on even items.
This patch should resolve it.

Test plan:
Edit biblio with multiple items.
Verify that the highlight is visible on the selected item you edit.
And that there is no highlight for a new item.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

index 637dc39..ab9621b 100644 (file)
@@ -89,13 +89,6 @@ function confirm_deletion(biblionumber,itemnumber) {
        $("#row"+itemnumber).attr("class","");
     }
 }
-
-$(document).ready(function() {
-    $("#cataloguing_additem_itemlist  tr").hover(
-        function () {$(this).addClass("highlight");},
-        function () {$(this).removeClass("highlight");}
-    );
-});
 //]]>
 </script>
 <link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
@@ -146,9 +139,9 @@ $(document).ready(function() {
                 [% FOREACH item_loo IN item_loop %]
                     [% IF ( item_loo.itemnumber == itemnumber) %]
                         [% IF item_loo.nomod %]
-                           <tr id="row[% item_loo.itemnumber %]" class="active">
+                           <tr id="row[% item_loo.itemnumber %]" class="active highlight">
                         [% ELSE %]
-                            <tr id="row[% item_loo.itemnumber %]" class="active editable">
+                            <tr id="row[% item_loo.itemnumber %]" class="active editable highlight">
                         [% END %]
                     [% ELSE %]
                         [% IF item_loo.nomod %]