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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc (+12 lines)
Lines 31-35 Link Here
31
      removeAllItems:function(){return _("Remove all items")},
31
      removeAllItems:function(){return _("Remove all items")},
32
      removeItem:function(){return _("Remove item")}
32
      removeItem:function(){return _("Remove item")}
33
    });
33
    });
34
35
    $(document).ready(function(){
36
        $(".select2").select2();
37
        $(".select2").on("select2:clear", function (evt) {
38
            $(this).on("select2:opening.cancelOpen", function (evt) {
39
                evt.preventDefault();
40
          
41
                $(this).off("select2:opening.cancelOpen");
42
            });
43
        });
44
    });
45
34
</script>
46
</script>
35
<!-- / select2.inc -->
47
<!-- / select2.inc -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-6 / +1 lines)
Lines 168-178 function confirmnotdup(redirect){ Link Here
168
[% Asset.css("css/addbiblio.css") | $raw %]
168
[% Asset.css("css/addbiblio.css") | $raw %]
169
169
170
[% INCLUDE 'select2.inc' %]
170
[% INCLUDE 'select2.inc' %]
171
<script>
172
  $(document).ready(function() {
173
    $('.subfield_line select').select2();
174
  });
175
</script>
176
171
177
</head>
172
</head>
178
<body id="auth_authorities" class="auth">
173
<body id="auth_authorities" class="auth">
Lines 375-381 function confirmnotdup(redirect){ Link Here
375
                
370
                
376
                [% SET mv = subfield_loo.marc_value %]
371
                [% SET mv = subfield_loo.marc_value %]
377
                [% IF ( mv.type == 'select' ) %]
372
                [% IF ( mv.type == 'select' ) %]
378
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
373
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
379
                     [% FOREACH aval IN mv.values %]
374
                     [% FOREACH aval IN mv.values %]
380
                         [% IF aval == mv.default %]
375
                         [% IF aval == mv.default %]
381
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
376
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-6 / +1 lines)
Lines 483-493 Link Here
483
[% Asset.css("css/addbiblio.css") | $raw %]
483
[% Asset.css("css/addbiblio.css") | $raw %]
484
484
485
[% INCLUDE 'select2.inc' %]
485
[% INCLUDE 'select2.inc' %]
486
<script>
487
  $(document).ready(function() {
488
    $('.subfield_line select').select2();
489
  });
490
</script>
491
486
492
</head>
487
</head>
493
<body id="cat_addbiblio" class="cat">
488
<body id="cat_addbiblio" class="cat">
Lines 852-858 Link Here
852
                                                [% ELSIF ( mv.type == 'textarea' ) %]
847
                                                [% ELSIF ( mv.type == 'textarea' ) %]
853
                                                    <textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
848
                                                    <textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
854
                                                [% ELSIF ( mv.type == 'select' ) %]
849
                                                [% ELSIF ( mv.type == 'select' ) %]
855
                                                    <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
850
                                                    <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
856
                                                    [% FOREACH aval IN mv.values %]
851
                                                    [% FOREACH aval IN mv.values %]
857
                                                        [% IF aval == mv.default %]
852
                                                        [% IF aval == mv.default %]
858
                                                        <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
853
                                                        <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-2 / +2 lines)
Lines 158-166 Link Here
158
                    <input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
158
                    <input type="hidden" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
159
                [% ELSIF ( mv.type == 'select' ) %]
159
                [% ELSIF ( mv.type == 'select' ) %]
160
                    [% IF ( mv.readonly || ite.IS_RETURN_CLAIM ) %]
160
                    [% IF ( mv.readonly || ite.IS_RETURN_CLAIM ) %]
161
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled">
161
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor select2" readonly="readonly" disabled="disabled">
162
                    [% ELSE %]
162
                    [% ELSE %]
163
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor">
163
                        <select name="field_value" id="[%- mv.id | html -%]" size="1" class="input_marceditor select2">
164
                    [% END %]
164
                    [% END %]
165
                    [% FOREACH aval IN mv.values %]
165
                    [% FOREACH aval IN mv.values %]
166
                        [% IF aval == mv.default %]
166
                        [% IF aval == mv.default %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt (-1 / +1 lines)
Lines 234-240 $(document).ready(function() { Link Here
234
                    <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
234
                    <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
235
                [% END %]
235
                [% END %]
236
                [% IF ( iteminformatio.marc_value.type == 'select' ) %]
236
                [% IF ( iteminformatio.marc_value.type == 'select' ) %]
237
                  <select name="field_value" size="1">
237
                  <select name="field_value" size="1" class="select2">
238
                  [% FOREACH value IN iteminformatio.marc_value.values %]
238
                  [% FOREACH value IN iteminformatio.marc_value.values %]
239
                    [% IF ( value == iteminformatio.marc_value.default ) %]
239
                    [% IF ( value == iteminformatio.marc_value.default ) %]
240
                      <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
240
                      <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-2 lines)
Lines 72-78 $(document).ready(function(){ Link Here
72
        multiCopyControl.toggle();
72
        multiCopyControl.toggle();
73
    });
73
    });
74
74
75
    $('.subfield_line select').select2();
76
});
75
});
77
76
78
function Check(f) {
77
function Check(f) {
79
- 

Return to bug 25727