Ticket #11941: patch.diff

File patch.diff, 1.1 KB (added by Germano Gabbianelli, 14 years ago)
  • django/contrib/admin/media/js/SelectFilter2.js

    diff -r b632913aebd1 django/contrib/admin/media/js/SelectFilter2.js
    a b  
    2626
    2727        // Remove <p class="info">, because it just gets in the way.
    2828        var ps = from_box.parentNode.getElementsByTagName('p');
     29        var removed_ps = [];
    2930        for (var i=0; i<ps.length; i++) {
    30             from_box.parentNode.removeChild(ps[i]);
     31            removed_ps.push(from_box.parentNode.removeChild(ps[i]));
    3132        }
    3233
    3334        // <div class="selector"> or <div class="selector stacked">
     
    8081        SelectBox.init(field_id + '_to');
    8182        // Move selected from_box options to to_box
    8283        SelectBox.move(field_id + '_from', field_id + '_to');
     84        // Reinsert all the previously removed paragraphs
     85        for (var i in removed_ps) {
     86            selector_div.parentNode.appendChild(removed_ps[i]);
     87        }
    8388    },
    8489    filter_key_up: function(event, field_id) {
    8590        from = document.getElementById(field_id + '_from');
Back to Top