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>
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.