Lines 479-485
Link Here
|
479 |
[% INCLUDE 'select2.inc' %] |
479 |
[% INCLUDE 'select2.inc' %] |
480 |
<script> |
480 |
<script> |
481 |
$(document).ready(function() { |
481 |
$(document).ready(function() { |
482 |
$('.subfield_line select').select2(); |
482 |
$('.subfield_line select').select2({ |
|
|
483 |
width: "100%" |
484 |
}); |
483 |
}); |
485 |
}); |
484 |
</script> |
486 |
</script> |
485 |
|
487 |
|
Lines 787-867
Link Here
|
787 |
[% FOREACH subfield_loo IN innerloo.subfield_loop %] |
789 |
[% FOREACH subfield_loo IN innerloo.subfield_loop %] |
788 |
<!-- One line on the marc editor --> |
790 |
<!-- One line on the marc editor --> |
789 |
<li class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]"> |
791 |
<li class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]"> |
|
|
792 |
<div class="subfieldcode"> |
793 |
<input type="text" |
794 |
title="[% subfield_loo.marc_lib | $raw %]" |
795 |
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" |
796 |
name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" |
797 |
value="[% subfield_loo.subfield | html %]" |
798 |
size="1" |
799 |
maxlength="1" |
800 |
class="flat" |
801 |
tabindex="0" /> |
802 |
</div> |
790 |
[% UNLESS advancedMARCEditor %] |
803 |
[% UNLESS advancedMARCEditor %] |
791 |
[% IF ( subfield_loo.fixedfield ) %] |
804 |
[% IF ( subfield_loo.mandatory ) %] |
792 |
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield"> |
805 |
<div class="subfield subfield_mandatory"> |
|
|
806 |
[% ELSIF ( subfield_loo.important ) %] |
807 |
<div class="subfield subfield_important"> |
793 |
[% ELSE %] |
808 |
[% ELSE %] |
794 |
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield"> |
809 |
<div class="subfield"> |
795 |
[% END %] |
810 |
[% END %] |
796 |
[% END %] |
811 |
[% IF ( subfield_loo.fixedfield ) %] |
797 |
|
812 |
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield"> |
798 |
<span class="subfieldcode"> |
|
|
799 |
<input type="text" |
800 |
title="[% subfield_loo.marc_lib | $raw %]" |
801 |
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" |
802 |
name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" |
803 |
value="[% subfield_loo.subfield | html %]" |
804 |
size="1" |
805 |
maxlength="1" |
806 |
class="flat" |
807 |
tabindex="0" /> |
808 |
</span> |
809 |
|
810 |
[% UNLESS advancedMARCEditor %] |
811 |
[% IF ( subfield_loo.mandatory ) %] |
812 |
<span class="subfield subfield_mandatory"> |
813 |
[% ELSIF ( subfield_loo.important ) %] |
814 |
<span class="subfield subfield_important"> |
815 |
[% ELSE %] |
813 |
[% ELSE %] |
816 |
<span class="subfield"> |
814 |
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield"> |
817 |
[% END %] |
815 |
[% END %] |
818 |
[% subfield_loo.marc_lib | $raw %] |
816 |
[% subfield_loo.marc_lib | $raw %] |
819 |
</span> |
817 |
</label> |
820 |
</label> |
818 |
</div> |
821 |
[% END %] |
819 |
[% END %] |
822 |
|
820 |
|
823 |
[% SET mv = subfield_loo.marc_value %] |
|
|
824 |
[% IF ( mv.type == 'text' ) %] |
825 |
[% IF ( mv.readonly == 1 ) %] |
826 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" /> |
827 |
[% ELSE %] |
828 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> |
829 |
[% END %] |
830 |
|
821 |
|
831 |
[% IF ( mv.authtype ) %] |
822 |
[% SET mv = subfield_loo.marc_value %] |
832 |
<span class="subfield_controls"><a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','biblio'); return false;" tabindex="1" title="Tag editor">Tag editor</a></span> |
823 |
<div id="field_marceditor[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]" class="field_marceditor"> |
833 |
[% END %] |
824 |
[% IF ( mv.type == 'text' ) %] |
834 |
[% ELSIF ( mv.type == 'text_complex' ) %] |
825 |
[% IF ( mv.readonly == 1 ) %] |
835 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> |
826 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" /> |
836 |
<span class="subfield_controls"> |
|
|
837 |
[% IF mv.noclick %] |
838 |
<span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span> |
839 |
[% ELSE %] |
827 |
[% ELSE %] |
840 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> |
828 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> |
841 |
[% END %] |
829 |
[% END %] |
842 |
</span> |
830 |
|
843 |
[% mv.javascript | $raw %] |
831 |
[% ELSIF ( mv.type == 'text_complex' ) %] |
844 |
[% ELSIF ( mv.type == 'hidden' ) %] |
832 |
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> |
845 |
<input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> |
833 |
|
846 |
[% ELSIF ( mv.type == 'textarea' ) %] |
834 |
[% mv.javascript | $raw %] |
847 |
<textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea> |
835 |
[% ELSIF ( mv.type == 'hidden' ) %] |
848 |
[% ELSIF ( mv.type == 'select' ) %] |
836 |
<input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> |
849 |
<select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]"> |
837 |
[% ELSIF ( mv.type == 'textarea' ) %] |
850 |
[% FOREACH aval IN mv.values %] |
838 |
<textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea> |
851 |
[% IF aval == mv.default %] |
839 |
[% ELSIF ( mv.type == 'select' ) %] |
852 |
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> |
840 |
<select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]"> |
853 |
[% ELSE %] |
841 |
[% FOREACH aval IN mv.values %] |
854 |
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> |
842 |
[% IF aval == mv.default %] |
|
|
843 |
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> |
844 |
[% ELSE %] |
845 |
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> |
846 |
[% END %] |
855 |
[% END %] |
847 |
[% END %] |
856 |
[% END %] |
848 |
</select> |
857 |
</select> |
849 |
[% END # /IF (mv.type...) %] |
858 |
[% END # /IF (mv.type...) %] |
850 |
</div> |
859 |
[% IF ( subfield_loo.mandatory ) %] |
851 |
[% IF ( subfield_loo.mandatory ) %] |
860 |
<span class="required">Required</span> |
852 |
<div class="subfield_loop_mandatory"> |
|
|
853 |
<span class="required">Required</span> |
854 |
</div> |
861 |
[% ELSIF ( subfield_loo.important ) %] |
855 |
[% ELSIF ( subfield_loo.important ) %] |
862 |
<span class="important">Important</span> |
856 |
<div class="subfield_loop_mandatory"> |
|
|
857 |
<span class="important">Important</span> |
858 |
</div> |
863 |
[% END %] |
859 |
[% END %] |
864 |
<span class="subfield_controls"> |
860 |
<div class="subfield_controls"> |
|
|
861 |
[% IF ( mv.type == 'text' ) %] |
862 |
[% IF ( mv.authtype ) %] |
863 |
<a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','biblio'); return false;" tabindex="1" title="Tag editor">Tag editor</a> |
864 |
[% END %] |
865 |
[% ELSIF ( mv.type == 'text_complex' ) %] |
866 |
[% IF mv.noclick %] |
867 |
<span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span> |
868 |
[% ELSE %] |
869 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> |
870 |
[% END %] |
871 |
</span> |
872 |
[% END %] |
865 |
[% IF ( subfield_loo.repeatable ) %] |
873 |
[% IF ( subfield_loo.repeatable ) %] |
866 |
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;"> |
874 |
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;"> |
867 |
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
875 |
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
Lines 870-876
Link Here
|
870 |
<img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /> |
878 |
<img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /> |
871 |
</a> |
879 |
</a> |
872 |
[% END %] |
880 |
[% END %] |
873 |
</span> |
881 |
</div> |
874 |
</li> <!-- /.subfield_line --> |
882 |
</li> <!-- /.subfield_line --> |
875 |
<!-- End of the line --> |
883 |
<!-- End of the line --> |
876 |
[% END # /FOREACH subfield_loop %] |
884 |
[% END # /FOREACH subfield_loop %] |