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

(-)a/cataloguing/merge.pl (-1 / +1 lines)
Lines 238-244 sub _createMarcHash { Link Here
238
    my @fields = $record->fields();
238
    my @fields = $record->fields();
239
239
240
240
241
    foreach my $field (@fields) {
241
    foreach my $field ( sort { $a->tag() <=> $b->tag() } @fields) {
242
    my $fieldtag = $field->tag();
242
    my $fieldtag = $field->tag();
243
    if ($fieldtag < 10) {
243
    if ($fieldtag < 10) {
244
        if ($tagslib->{$fieldtag}->{'@'}->{'tab'} >= 0) {
244
        if ($tagslib->{$fieldtag}->{'@'}->{'tab'} >= 0) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt (-9 / +15 lines)
Lines 101-108 $(document).ready(function(){ Link Here
101
			// If not, we add the subfield to the first matching field
101
			// If not, we add the subfield to the first matching field
102
			var where = 0;
102
			var where = 0;
103
			$("#resultul li span.field").each(function() {
103
			$("#resultul li span.field").each(function() {
104
			    if (where == 0 && $(this).text() == field) {
104
			    if ($(this).text() == field) {
105
				where = this;
105
				where = this;
106
				return false; // break each()
106
			    }
107
			    }
107
			});
108
			});
108
109
Lines 127-140 $(document).ready(function(){ Link Here
127
		} else {
128
		} else {
128
		    // If we are a field
129
		    // If we are a field
129
		    var where = 0;
130
		    var where = 0;
130
		    // Find where to add the field
131
            // Find a greater field to add before
131
		    $("#resultul li span.field").each(function() {
132
            $("#resultul li span.field").each(function() {
132
			if (where == 0 && $(this).text() > field) {
133
                if ($(this).text() > field) {
133
			    where = this;
134
                    where = this;
134
			}
135
                    return false; // break each()
135
		    });
136
                }
137
            });
138
            if (where) {
139
                $(where).parent().before(clone);
140
            } else {
141
                // No greater field, add to the end
142
                $("#resultul").append(clone);
143
            }
136
144
137
		    $(where).parent().before(clone);
138
		}
145
		}
139
	    }
146
	    }
140
	} else {
147
	} else {
141
- 

Return to bug 10648