Ticket #1888: django_filter_interface.diff

File django_filter_interface.diff, 1.2 KB (added by Ryan Kanno, 17 years ago)

more DRY as suggested by SmileyChris

  • django/contrib/admin/media/js/SelectFilter2.js

     
    5858        quickElement('h2', selector_chosen, interpolate(gettext('Chosen %s'), [field_name]));
    5959        var selector_filter = quickElement('p', selector_chosen, gettext('Select your choice(s) and click '));
    6060        selector_filter.className = 'selector-filter';
    61         quickElement('img', selector_filter, '', 'src', admin_media_prefix + 'img/admin/selector-add.gif', 'alt', 'Add');
     61        quickElement('img', selector_filter, '', 'src', admin_media_prefix + (is_stacked ? 'img/admin/selector_stacked-add.gif':'img/admin/selector-add.gif'), 'alt', 'Add');
    6262        var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name'));
    6363        to_box.className = 'filtered';
    6464        var clear_all = quickElement('a', selector_chosen, gettext('Clear all'), 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from");})()');
Back to Top