Lines 113-156
function _UNIMARCFieldDoc(field, blocknumber) {
Link Here
|
113 |
} |
113 |
} |
114 |
|
114 |
|
115 |
/* |
115 |
/* |
116 |
* Functions to load/unload css from the head element |
|
|
117 |
*/ |
118 |
function loadCSS(id,cssDef) { |
119 |
|
120 |
var cssElem=document.createElement("style"); |
121 |
cssElem.setAttribute("type", "text/css"); |
122 |
cssElem.setAttribute("id", id); |
123 |
cssElem.innerHTML = cssDef; |
124 |
|
125 |
document.getElementsByTagName("head")[0].appendChild(cssElem); |
126 |
} |
127 |
|
128 |
function unloadCSS(id) { |
129 |
var elem = document.getElementById(id); |
130 |
elem.parentNode.removeChild(elem); |
131 |
} |
132 |
|
133 |
/* |
134 |
* Functions to hide/show marc docs links |
116 |
* Functions to hide/show marc docs links |
135 |
*/ |
117 |
*/ |
136 |
function hideMARCdocLinks() { |
118 |
function hideMARCdocLinks() { |
137 |
loadCSS("marcDocsCSS",".marcdocs{display: none;}"); |
119 |
$(".marcdocs").hide(); |
138 |
$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'false', { path: "/", expires: 365 }); |
120 |
$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'false', { path: "/", expires: 365 }); |
139 |
} |
121 |
} |
140 |
|
122 |
|
141 |
function showMARCdocLinks() { |
123 |
function showMARCdocLinks() { |
142 |
unloadCSS("marcDocsCSS"); |
124 |
$(".marcdocs").show(); |
143 |
$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'true', { path: "/", expires: 365 }); |
125 |
$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'true', { path: "/", expires: 365 }); |
144 |
} |
126 |
} |
145 |
|
127 |
|
146 |
function toggleMARCDocs(checked) { |
|
|
147 |
if (checked) { |
148 |
showMARCdocLinks(); |
149 |
} else { |
150 |
hideMARCdocLinks(); |
151 |
} |
152 |
} |
153 |
|
154 |
/** |
128 |
/** |
155 |
* check if mandatory subfields are written |
129 |
* check if mandatory subfields are written |
156 |
*/ |
130 |
*/ |
Lines 691-697
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
691 |
|
665 |
|
692 |
|
666 |
|
693 |
<h1><!-- TMPL_IF NAME="biblionumber" -->Editing <em><!-- TMPL_VAR NAME="title" escape="html" --></em> (Record Number <!-- TMPL_VAR name="biblionumber" -->)</h1><!-- TMPL_ELSE -->Add MARC Record</h1><!-- /TMPL_IF --> |
667 |
<h1><!-- TMPL_IF NAME="biblionumber" -->Editing <em><!-- TMPL_VAR NAME="title" escape="html" --></em> (Record Number <!-- TMPL_VAR name="biblionumber" -->)</h1><!-- TMPL_ELSE -->Add MARC Record</h1><!-- /TMPL_IF --> |
694 |
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" onclick="toggleMARCDocs(this.checked)"/> Show MARC tag documentation links<br/></div> |
668 |
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div> |
695 |
|
669 |
|
696 |
<!-- TMPL_UNLESS name="number" --> |
670 |
<!-- TMPL_UNLESS name="number" --> |
697 |
<!-- show duplicate warning on tab 0 only --> |
671 |
<!-- show duplicate warning on tab 0 only --> |
Lines 736-741
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
736 |
$("#z3950searchc").empty(); |
710 |
$("#z3950searchc").empty(); |
737 |
$("#savebutton").empty(); |
711 |
$("#savebutton").empty(); |
738 |
yuiToolbar(); |
712 |
yuiToolbar(); |
|
|
713 |
|
714 |
$("#marcDocsSelect").click(function(){ |
715 |
if($(this).attr("checked")){ |
716 |
showMARCdocLinks(); |
717 |
} else { |
718 |
hideMARCdocLinks(); |
719 |
} |
720 |
}); |
739 |
}); |
721 |
}); |
740 |
|
722 |
|
741 |
function redirect(dest){ |
723 |
function redirect(dest){ |
742 |
- |
|
|