From c36cd4b935b7f28d6fea38b0c1d6063b537199d5 Mon Sep 17 00:00:00 2001 From: Patricio Marrone Date: Wed, 11 Jan 2017 12:39:21 -0300 Subject: [PATCH] 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) --- koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js index 6fd9346..ed43aec 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js +++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js @@ -443,7 +443,7 @@ function upSubfield(index) { var tag = line.parentNode; // get the dad of this line. (should be "
") // 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. -- 2.1.4