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

(-)a/Koha/Util/MARC.pm (-1 / +1 lines)
Lines 40-46 sub createMergeHash { Link Here
40
    my @array;
40
    my @array;
41
    my @fields = $record->fields();
41
    my @fields = $record->fields();
42
42
43
    foreach my $field (@fields) {
43
    foreach my $field ( sort { $a->tag() <=> $b->tag() } @fields) {
44
        my $fieldtag = $field->tag();
44
        my $fieldtag = $field->tag();
45
        if ( $fieldtag < 10 ) {
45
        if ( $fieldtag < 10 ) {
46
            if ( !defined($tagslib)
46
            if ( !defined($tagslib)
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/merge-record.js (-6 / +11 lines)
Lines 79-86 function toggleField(pField) { Link Here
79
                    // If not, we add the subfield to the first matching field
79
                    // If not, we add the subfield to the first matching field
80
                    var where = 0;
80
                    var where = 0;
81
                    $("#resultul li span.field").each(function() {
81
                    $("#resultul li span.field").each(function() {
82
                        if (where == 0 && $(this).text() == field) {
82
                        if ($(this).text() == field) {
83
                            where = this;
83
                            where = this;
84
                            return false; // break each()
84
                        }
85
                        }
85
                    });
86
                    });
86
87
Lines 102-115 function toggleField(pField) { Link Here
102
            } else {
103
            } else {
103
                // If we are a field
104
                // If we are a field
104
                var where = 0;
105
                var where = 0;
105
                // Find where to add the field
106
                // Find a greater field to add before
106
                $("#resultul li span.field").each(function() {
107
                $("#resultul li span.field").each(function() {
107
                    if (where == 0 && $(this).text() > field) {
108
                    if ($(this).text() > field) {
108
                        where = this;
109
                        where = this;
110
                        return false; // break each()
109
                    }
111
                    }
110
                });
112
                });
111
113
                if (where) {
112
                $(where).parent().before(clone);
114
                    $(where).parent().before(clone);
115
                } else {
116
                    // No greater field, add to the end
117
                    $("#resultul").append(clone);
118
                }
113
            }
119
            }
114
        }
120
        }
115
    } else {
121
    } else {
116
- 

Return to bug 10648