Lines 15-30
Link Here
|
15 |
</div> |
15 |
</div> |
16 |
</div> |
16 |
</div> |
17 |
|
17 |
|
18 |
|
|
|
19 |
[% MACRO jsinclude BLOCK %] |
18 |
[% MACRO jsinclude BLOCK %] |
20 |
<script type="text/javascript"> |
19 |
<script type="text/javascript"> |
21 |
$(document).ready(function(){ |
20 |
$(document).ready(function(){ |
22 |
[% IF tag_number == 'rancor' %] |
21 |
[% IF rancor %] |
23 |
function RancorReplaceField( new_text, ind_1, ind_2 ){ |
22 |
function RancorReplaceField( new_text, ind_1, ind_2 ){ |
24 |
var cur_field = opener.opener.jQuery(".CodeMirror")[0].CodeMirror.marceditor.getCurrentField(); |
23 |
var cur_field = opener.opener.jQuery(".CodeMirror")[0].CodeMirror.marceditor.getCurrentField(); |
25 |
cur_field.setText(new_text); |
24 |
cur_field.setText(new_text); |
26 |
cur_field.setIndicator1(ind_1); |
25 |
if ( [% IF update_ind1 %]true[% ELSE %]false[% END %] ) cur_field.setIndicator1(ind_1); |
27 |
cur_field.setIndicator2(ind_2); |
26 |
if ( [% IF update_ind2 %]true[% ELSE %]false[% END %] ) cur_field.setIndicator2(ind_2); |
28 |
return true; |
27 |
return true; |
29 |
} |
28 |
} |
30 |
[% IF ( clear ) %] |
29 |
[% IF ( clear ) %] |
Lines 47-53
Link Here
|
47 |
} catch(e) { |
46 |
} catch(e) { |
48 |
return; |
47 |
return; |
49 |
} |
48 |
} |
50 |
|
|
|
51 |
var field_start = whichfield.parentNode.parentNode; |
49 |
var field_start = whichfield.parentNode.parentNode; |
52 |
|
50 |
|
53 |
// Sets the good number of form fields for the specified subfield |
51 |
// Sets the good number of form fields for the specified subfield |
Lines 107-113
Link Here
|
107 |
i++; |
105 |
i++; |
108 |
}); |
106 |
}); |
109 |
} |
107 |
} |
110 |
|
|
|
111 |
[% UNLESS ( clear ) %] |
108 |
[% UNLESS ( clear ) %] |
112 |
[% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] |
109 |
[% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] |
113 |
SetSubfieldValues( |
110 |
SetSubfieldValues( |
Lines 117-123
Link Here
|
117 |
[% END %] |
114 |
[% END %] |
118 |
); |
115 |
); |
119 |
[% END %] |
116 |
[% END %] |
120 |
[% END %] |
|
|
121 |
var indicators = field_start.getElementsByClassName('indicator flat'); |
117 |
var indicators = field_start.getElementsByClassName('indicator flat'); |
122 |
[% IF update_ind1 %] |
118 |
[% IF update_ind1 %] |
123 |
indicators[0].value="[% indicator1 %]"; |
119 |
indicators[0].value="[% indicator1 %]"; |
124 |
- |
|
|