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

(-)a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css (-15 / +44 lines)
Lines 109-116 li.subfield_line { Link Here
109
li.subfield_line label {
109
li.subfield_line label {
110
    font-size:89%;
110
    font-size:89%;
111
    float: left;
111
    float: left;
112
	 padding-right : .4em;
112
    padding-right: .4em;
113
    width: 16em;
113
    width: 10em;
114
    text-align: left;
114
    text-align: left;
115
    clear:left;
115
    clear:left;
116
}
116
}
Lines 151-162 a.tagnum { Link Here
151
}
151
}
152
152
153
.subfieldcode {
153
.subfieldcode {
154
	display: block;
154
    display: block;
155
	float: left;
155
    float: left;
156
}
156
}
157
157
158
.labelsubfield {
158
.labelsubfield {
159
	float:left;
159
    float: left;
160
}
161
162
#cat_addbiblio .subfieldcode {
163
    float: none;
164
}
165
166
#cat_addbiblio .labelsubfield {
167
    font-size: 90%;
168
}
169
170
#cat_addbiblio .subfield {
171
    float: none;
172
    padding: .25em .5em;
173
}
174
175
#cat_addbiblio .subfield label {
176
    color: #00698a;
160
}
177
}
161
178
162
.input_marceditor {
179
.input_marceditor {
Lines 164-169 a.tagnum { Link Here
164
	width:30em;
181
	width:30em;
165
}
182
}
166
183
184
#cat_addbiblio .input_marceditor {
185
    float: none;
186
    width: 100%;
187
}
188
189
#cat_addbiblio .subfield_line {
190
    display: flex;
191
}
192
193
#cat_addbiblio .field_marceditor {
194
    flex-grow: 1;
195
    padding: .25em .5em;
196
}
197
198
#cat_addbiblio .subfield_loop_mandatory {
199
    padding: .25em .5em;
200
}
201
167
.indicator {
202
.indicator {
168
    width: 1em;
203
    width: 1em;
169
    box-sizing: content-box;
204
    box-sizing: content-box;
Lines 177-188 a.tagnum { Link Here
177
#cataloguing_additem_newitem fieldset.rows li {
212
#cataloguing_additem_newitem fieldset.rows li {
178
	padding-bottom : 3px;
213
	padding-bottom : 3px;
179
}
214
}
215
180
#cataloguing_additem_newitem .input_marceditor {
216
#cataloguing_additem_newitem .input_marceditor {
181
	width : auto;
217
    width: auto;
182
}
218
}
183
219
184
#cataloguing_additem_newitem textarea.input_marceditor {
220
#cataloguing_additem_newitem textarea.input_marceditor {
185
     width : 31em;
221
    width: 31em;
186
}
222
}
187
223
188
.mandatory_marker {
224
.mandatory_marker {
Lines 193-210 a.tagnum { Link Here
193
.linktools a {margin:0 2px;padding:2px;background-color:#FFF;text-align:center; }
229
.linktools a {margin:0 2px;padding:2px;background-color:#FFF;text-align:center; }
194
.linktools a:first-child { border-bottom: 1px solid #DDD; }
230
.linktools a:first-child { border-bottom: 1px solid #DDD; }
195
.linktools a:hover { background-color: #FFC; }
231
.linktools a:hover { background-color: #FFC; }
196
.subfield_controls { margin : 0 .5em; }
232
.subfield_controls { margin: 0 .5em; }
197
233
198
#cataloguing_additem_itemlist {
234
#cataloguing_additem_itemlist {
199
	margin-bottom : 1em;
235
	margin-bottom : 1em;
200
}
236
}
201
.yui-gf div.first {
202
	width : 19%;
203
}
204
205
.yui-gf .yui-u {
206
	width: 79.2%;
207
}
208
237
209
tbody tr.active:nth-child(2n+1) td,
238
tbody tr.active:nth-child(2n+1) td,
210
tbody tr.active td {
239
tbody tr.active td {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-62 / +70 lines)
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 %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js (-36 / +39 lines)
Lines 65-74 function ExpandField(index) { Link Here
65
        if(lis[i].getAttribute('id').match(/^subfield/)){  // if it s a subfield
65
        if(lis[i].getAttribute('id').match(/^subfield/)){  // if it s a subfield
66
            if (!lis[i].style.display) {
66
            if (!lis[i].style.display) {
67
                // first time => show all subfields
67
                // first time => show all subfields
68
                lis[i].style.display = 'block';
68
                lis[i].style.display = 'flex';
69
            } else if (lis[i].style.display == 'none') {
69
            } else if (lis[i].style.display == 'none') {
70
                // show
70
                // show
71
                lis[i].style.display = 'block';
71
                lis[i].style.display = 'flex';
72
            } else {
72
            } else {
73
                // hide
73
                // hide
74
                lis[i].style.display = 'none';
74
                lis[i].style.display = 'none';
Lines 91-97 var Select2Utils = { Link Here
91
        if ($.fn.select2) {
91
        if ($.fn.select2) {
92
            var selects = element.getElementsByTagName('select');
92
            var selects = element.getElementsByTagName('select');
93
            for (var i=0; i < selects.length; i++) {
93
            for (var i=0; i < selects.length; i++) {
94
                $(selects[i]).select2();
94
                $(selects[i]).select2({
95
                    width: "100%"
96
                });
95
            }
97
            }
96
        }
98
        }
97
    }
99
    }
Lines 124-130 function CloneField(index, hideMarc, advancedMARCEditor) { Link Here
124
    // settings all subfields
126
    // settings all subfields
125
    var divslen = divs.length;
127
    var divslen = divs.length;
126
    for( i=0; i < divslen ; i++ ){      // foreach div/li
128
    for( i=0; i < divslen ; i++ ){      // foreach div/li
127
        if(divs[i].getAttribute("id").match(/^subfield/)){  // if it s a subfield
129
        if( divs[i].getAttribute("id") && divs[i].getAttribute("id").match(/^subfield/)){  // if it s a subfield
128
130
129
            // set the attribute for the new 'li' subfields
131
            // set the attribute for the new 'li' subfields
130
            divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
132
            divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
Lines 145-182 function CloneField(index, hideMarc, advancedMARCEditor) { Link Here
145
                    textareas[j].value = "";
147
                    textareas[j].value = "";
146
                }
148
                }
147
            }
149
            }
150
            if( inputs.length > 0 ){
151
                inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
152
                inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
148
153
149
            inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
154
                try {
150
            inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
155
                    id_input = inputs[1].getAttribute('id')+new_key;
151
156
                    inputs[1].setAttribute('id',id_input);
152
            try {
157
                    inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
153
                id_input = inputs[1].getAttribute('id')+new_key;
158
                } catch(e) {
154
                inputs[1].setAttribute('id',id_input);
159
                    try{ // it s a select if it is not an input
155
                inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
160
                        var selects = divs[i].getElementsByTagName('select');
156
            } catch(e) {
161
                        id_input = selects[0].getAttribute('id')+new_key;
157
                try{ // it s a select if it is not an input
162
                        selects[0].setAttribute('id',id_input);
158
                    var selects = divs[i].getElementsByTagName('select');
163
                        selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
159
                    id_input = selects[0].getAttribute('id')+new_key;
164
                    }catch(e2){ // it is a textarea if it s not a select or an input
160
                    selects[0].setAttribute('id',id_input);
165
                        var textareas = divs[i].getElementsByTagName('textarea');
161
                    selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
166
                        if( textareas.length > 0 ){
162
                }catch(e2){ // it is a textarea if it s not a select or an input
167
                            id_input = textareas[0].getAttribute('id')+new_key;
163
                    var textaeras = divs[i].getElementsByTagName('textarea');
168
                            textareas[0].setAttribute('id',id_input);
164
                    id_input = textaeras[0].getAttribute('id')+new_key;
169
                            textareas[0].setAttribute('name',textareas[0].getAttribute('name')+new_key);
165
                    textaeras[0].setAttribute('id',id_input);
170
                        }
166
                    textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key);
171
                    }
172
                }
173
                if( $(inputs[1]).hasClass('framework_plugin') ) {
174
                    olddiv= original.getElementsByTagName('li')[i];
175
                    oldcontrol= olddiv.getElementsByTagName('input')[1];
176
                    AddEventHandlers( oldcontrol,inputs[1],id_input );
167
                }
177
                }
168
            }
178
            }
169
            if( $(inputs[1]).hasClass('framework_plugin') ) {
179
            // when cloning a subfield, re set its label too.
170
                olddiv= original.getElementsByTagName('li')[i];
180
            var labels = divs[i].getElementsByTagName('label');
171
                oldcontrol= olddiv.getElementsByTagName('input')[1];
181
            labels[0].setAttribute('for', id_input);
172
                AddEventHandlers( oldcontrol,inputs[1],id_input );
173
            }
174
175
            if (advancedMARCEditor == '0') {
176
                // when cloning a subfield, re set its label too.
177
                var labels = divs[i].getElementsByTagName('label');
178
                labels[0].setAttribute('for',id_input);
179
            }
180
182
181
            // setting its '+' and '-' buttons
183
            // setting its '+' and '-' buttons
182
            try {
184
            try {
Lines 227-233 function CloneField(index, hideMarc, advancedMARCEditor) { Link Here
227
            }
229
            }
228
230
229
        } else { // it's a indicator div
231
        } else { // it's a indicator div
230
            if(divs[i].getAttribute('id').match(/^div_indicator/)){
232
            if ( divs[i].getAttribute("id") && divs[i].getAttribute('id').match(/^div_indicator/)) {
231
233
232
                // setting a new id for the indicator div
234
                // setting a new id for the indicator div
233
                divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
235
                divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
Lines 331-337 function CloneSubfield(index, advancedMARCEditor){ Link Here
331
    if(advancedMARCEditor == '0') {
333
    if(advancedMARCEditor == '0') {
332
        // when cloning a subfield, reset its label too.
334
        // when cloning a subfield, reset its label too.
333
        var label = clone.getElementsByTagName('label')[0];
335
        var label = clone.getElementsByTagName('label')[0];
334
        label.setAttribute('for',id_input);
336
        if( label ){
337
            label.setAttribute('for',id_input);
338
        }
335
    }
339
    }
336
340
337
    // setting a new id for the parent div
341
    // setting a new id for the parent div
338
- 

Return to bug 22399