Bug 17817: (Follow up) Fix reordering subfields issues

Authority controlled subfields have invisible divs which produced
a strange behavior when reordering (multiple clicks were needed
to push a subfield up over an authority controlled subfield)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c7a0272580)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Patricio Marrone 2017-01-11 12:39:21 -03:00 committed by Katrin Fischer
parent 57866dc731
commit cfcc84b007
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ function upSubfield(index) {
var tag = line.parentNode; // get the dad of this line. (should be "<div id='tag_...'>")
// getting all visible subfields for this tag
var subfields = tag.querySelectorAll("div.subfield_line");
var subfields = tag.querySelectorAll("div.subfield_line:not( [style*='display:none;'] )");
var subfieldsLength = subfields.length;
if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.