Lines 19-24
Link Here
|
19 |
[% MACRO jsinclude BLOCK %] |
19 |
[% MACRO jsinclude BLOCK %] |
20 |
<script type="text/javascript"> |
20 |
<script type="text/javascript"> |
21 |
$(document).ready(function(){ |
21 |
$(document).ready(function(){ |
|
|
22 |
[% IF tag_number == 'rancor' %] |
23 |
function RancorReplaceField( new_text ){ |
24 |
var cur_field = opener.opener.jQuery(".CodeMirror")[0].CodeMirror.marceditor.getCurrentField(); |
25 |
cur_field.setText(new_text); |
26 |
return true; |
27 |
} |
28 |
[% IF ( clear ) %] |
29 |
var new_line = ""; |
30 |
[% ELSE %] |
31 |
var new_line = " |
32 |
[%- FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP -%]‡ |
33 |
[%- SUBFIELD_LOO.marc_subfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r ') -%] |
34 |
[%- FOREACH marc_value IN SUBFIELD_LOO.marc_values -%] |
35 |
[%- marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') -%] |
36 |
[%- END -%] |
37 |
[%- END -%]‡9[% authid %]"; |
38 |
[% END %] |
39 |
RancorReplaceField( new_line ); |
40 |
[% ELSE %] |
22 |
var index_start = "[% index %]"; |
41 |
var index_start = "[% index %]"; |
23 |
var whichfield; |
42 |
var whichfield; |
24 |
try { |
43 |
try { |
Lines 88-104
Link Here
|
88 |
} |
107 |
} |
89 |
|
108 |
|
90 |
[% UNLESS ( clear ) %] |
109 |
[% UNLESS ( clear ) %] |
91 |
[% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] |
110 |
[% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] |
92 |
SetSubfieldValues( |
111 |
SetSubfieldValues( |
93 |
"[% tag_number |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %][% SUBFIELD_LOO.marc_subfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]" |
112 |
"[% tag_number |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %][% SUBFIELD_LOO.marc_subfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]" |
94 |
[% FOREACH marc_value IN SUBFIELD_LOO.marc_values %] |
113 |
[% FOREACH marc_value IN SUBFIELD_LOO.marc_values %] |
95 |
,"[% marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]" |
114 |
,"[% marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]" |
|
|
115 |
[% END %] |
116 |
); |
96 |
[% END %] |
117 |
[% END %] |
97 |
); |
118 |
var indicators = field_start.getElementsByClassName('indicator flat'); |
98 |
[% END %] |
119 |
indicators[0].value="[% indicator1 %]"; |
99 |
var indicators = field_start.getElementsByClassName('indicator flat'); |
120 |
indicators[1].value="[% indicator2 %]"; |
100 |
indicators[0].value="[% indicator1 %]"; |
|
|
101 |
indicators[1].value="[% indicator2 %]"; |
102 |
[% END %] |
121 |
[% END %] |
103 |
|
122 |
|
104 |
// browse all its subfields (clear and $9) |
123 |
// browse all its subfields (clear and $9) |
Lines 120-125
Link Here
|
120 |
[% END %] |
139 |
[% END %] |
121 |
} |
140 |
} |
122 |
} |
141 |
} |
|
|
142 |
[% END %] |
123 |
|
143 |
|
124 |
opener.close(); |
144 |
opener.close(); |
125 |
window.close(); |
145 |
window.close(); |