View | Details | Raw Unified | Return to bug 5546
Collapse All | Expand All

(-)a/cataloguing/addbiblio.pl (+3 lines)
Lines 1023-1032 $template->param( title => $record->title() ) if ( $record ne "-1" ); Link Here
1023
if (C4::Context->preference("marcflavour") eq "MARC21"){
1023
if (C4::Context->preference("marcflavour") eq "MARC21"){
1024
    $template->param(MARC21 => 1);
1024
    $template->param(MARC21 => 1);
1025
}
1025
}
1026
1027
1026
$template->param(
1028
$template->param(
1027
    popup => $mode,
1029
    popup => $mode,
1028
    frameworkcode => $frameworkcode,
1030
    frameworkcode => $frameworkcode,
1029
    itemtype => $frameworkcode,
1031
    itemtype => $frameworkcode,
1032
    borrowernumber => $loggedinuser
1030
);
1033
);
1031
1034
1032
output_html_with_http_headers $input, $cookie, $template->output;
1035
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl (-5 / +55 lines)
Lines 26-34 Link Here
26
                fields_in_use[field_id] = 1;
26
                fields_in_use[field_id] = 1;
27
            }
27
            }
28
        });
28
        });
29
	 });
29
		/* check cookie to hide/show marcdocs*/
30
	 
30
		if($.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->") == 'false'){
31
	 $('#header_search > ul').tabs().bind('show.ui-tabs', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); });
31
			hideMARCdocLinks();
32
			$("#marcDocsSelect").attr('checked',false);
33
		} else {
34
			/* reset cookie expire date */
35
			$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'true',
36
						{ path: "/", expires: 365 });
37
		}
38
39
	});
40
41
	$('#header_search > ul').tabs().bind('show.ui-tabs', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); });
42
32
43
33
function confirmnotdup(redirect){
44
function confirmnotdup(redirect){
34
	$("#confirm_not_duplicate").attr("value","1");
45
	$("#confirm_not_duplicate").attr("value","1");
Lines 101-106 function _UNIMARCFieldDoc(field, blocknumber) { Link Here
101
    }
112
    }
102
}
113
}
103
114
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
135
 */
136
function hideMARCdocLinks() {
137
	loadCSS("marcDocsCSS",".marcdocs{display: none;}");
138
	$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'false', { path: "/", expires: 365 });
139
}
140
141
function showMARCdocLinks() {
142
	unloadCSS("marcDocsCSS");
143
	$.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'true', { path: "/", expires: 365 });
144
}
145
146
function toggleMARCDocs(checked) {
147
  if (checked) {
148
    showMARCdocLinks();
149
  } else {
150
    hideMARCdocLinks();
151
  }
152
}
153
104
/**
154
/**
105
 * check if mandatory subfields are written
155
 * check if mandatory subfields are written
106
 */
156
 */
Lines 641-646 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
641
691
642
692
643
<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 -->
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 -->
694
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" onclick="toggleMARCDocs(this.checked)"/> Show MARC tag documentation links<br/></div>
644
695
645
<!-- TMPL_UNLESS name="number" -->
696
<!-- TMPL_UNLESS name="number" -->
646
    <!-- show duplicate warning on tab 0 only -->
697
    <!-- show duplicate warning on tab 0 only -->
Lines 786-792 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
786
            	<!-- TMPL_IF NAME="advancedMARCEditor" -->
837
            	<!-- TMPL_IF NAME="advancedMARCEditor" -->
787
		<a href="#" tabindex="1" class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib"--> - Click to Expand this Tag" onclick="ExpandField('tag_<!-- TMPL_VAR NAME="tag"-->_<!-- TMPL_VAR NAME='index' --><!-- TMPL_VAR NAME="random" -->'); return false;"><!-- TMPL_VAR NAME="tag" --></a>
838
		<a href="#" tabindex="1" class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib"--> - Click to Expand this Tag" onclick="ExpandField('tag_<!-- TMPL_VAR NAME="tag"-->_<!-- TMPL_VAR NAME='index' --><!-- TMPL_VAR NAME="random" -->'); return false;"><!-- TMPL_VAR NAME="tag" --></a>
788
		<!-- TMPL_ELSE -->
839
		<!-- TMPL_ELSE -->
789
                        <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --><a 
840
                        <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --><a class="marcdocs"
790
                 onclick="PopupMARCFieldDoc('<!-- TMPL_VAR NAME="tag" -->', <!-- TMPL_VAR NAME="number" -->); return false;">&nbsp;?</a></span>
841
                 onclick="PopupMARCFieldDoc('<!-- TMPL_VAR NAME="tag" -->', <!-- TMPL_VAR NAME="number" -->); return false;">&nbsp;?</a></span>
791
		<!-- /TMPL_IF -->
842
		<!-- /TMPL_IF -->
792
                <!-- TMPL_IF NAME="fixedfield" -->
843
                <!-- TMPL_IF NAME="fixedfield" -->
793
- 

Return to bug 5546