removeAllItems:function(){return _("Remove all items")},
removeItem:function(){return _("Remove item")}
});
+
+ $(document).ready(function(){
+ $(".select2").select2();
+ $(".select2").on("select2:clear", function (evt) {
+ $(this).on("select2:opening.cancelOpen", function (evt) {
+ evt.preventDefault();
+
+ $(this).off("select2:opening.cancelOpen");
+ });
+ });
+ });
+
</script>
<!-- / select2.inc -->
[% Asset.css("css/addbiblio.css") | $raw %]
[% INCLUDE 'select2.inc' %]
-<script>
- $(document).ready(function() {
- $('.subfield_line select').select2();
- });
-</script>
</head>
<body id="auth_authorities" class="auth">
[% SET mv = subfield_loo.marc_value %]
[% IF ( mv.type == 'select' ) %]
- <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
+ <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
[% FOREACH aval IN mv.values %]
[% IF aval == mv.default %]
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
[% Asset.css("css/addbiblio.css") | $raw %]
[% INCLUDE 'select2.inc' %]
-<script>
- $(document).ready(function() {
- $('.subfield_line select').select2();
- });
-</script>
</head>
<body id="cat_addbiblio" class="cat">
[% ELSIF ( mv.type == 'textarea' ) %]
<textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
[% ELSIF ( mv.type == 'select' ) %]
- <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
+ <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
[% FOREACH aval IN mv.values %]
[% IF aval == mv.default %]
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
<input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
[% ELSIF ( mv.type == 'select' ) %]
[% IF ( mv.readonly || ite.IS_RETURN_CLAIM ) %]
- <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
+ <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor select2" readonly="readonly" disabled="disabled">
[% ELSE %]
- <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor">
+ <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor select2">
[% END %]
[% FOREACH aval IN mv.values %]
[% IF aval == mv.default %]
<label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
[% END %]
[% IF ( iteminformatio.marc_value.type == 'select' ) %]
- <select name="field_value" size="1">
+ <select name="field_value" size="1" class="select2">
[% FOREACH value IN iteminformatio.marc_value.values %]
[% IF ( value == iteminformatio.marc_value.default ) %]
<option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
multiCopyControl.toggle();
});
- $('.subfield_line select').select2();
});
function Check(f) {