@@ -, +, @@ - Open a MARC record for editing in the basic cataloging editor. - Test the JavaScript-driven functionality affected by the changed file: - Open the authority browser from a field (e.g. 100a) which is linked to an authority type. - Clone a repeatable tag. - Clone a repeatable subfield - "Unclone" a tag or subfield: This should remove the tag or subfield (if possible) or clear the contents of the tag or subfield if not. - Clone a subfield on the item edit page (In my MARC21 installation I had to modify the default framework in order to have a repeatable item subfield to test with). --- koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 100 ++++++++------------------ 1 file changed, 28 insertions(+), 72 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js +++ a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js @@ -1,3 +1,5 @@ +/* exported openAuth ExpandField CloneField CloneSubfield UnCloneField CloneItemSubfield CheckMandatorySubfields */ + /* * Unified file for catalogue edition */ @@ -52,7 +54,7 @@ function openAuth(tagsubfieldid,authtype,source) { } } mainstring = mainstring.join(' '); - newin=window.open("../authorities/auth_finder.pl?source="+source+"&authtypecode="+authtype+"&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); + window.open("../authorities/auth_finder.pl?source="+source+"&authtypecode="+authtype+"&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); } function ExpandField(index) { @@ -120,7 +122,8 @@ function CloneField(index, hideMarc, advancedMARCEditor) { } // settings all subfields - for(var i=0,divslen = divs.length ; i") - - // getting all visible subfields for this tag - 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. - - // among all subfields - for(var i=0;i