Ticket #12959: select_filter_label.patch

File select_filter_label.patch, 1.2 KB (added by Chris Adams, 15 years ago)
  • django/contrib/admin/media/js/SelectFilter2.js

    diff --git a/django/contrib/admin/media/js/SelectFilter2.js b/django/contrib/admin/media/js/SelectFilter2.js
    index db946a6..0e51e13 100644
    a b var SelectFilter = {  
    3636        quickElement('h2', selector_available, interpolate(gettext('Available %s'), [field_name]));
    3737        var filter_p = quickElement('p', selector_available, '');
    3838        filter_p.className = 'selector-filter';
    39         quickElement('img', filter_p, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif');
     39
     40        var search_filter_label = quickElement('label', filter_p, '', 'for', field_id + "_input", 'style', 'width:16px;padding:2px');
     41
     42        var search_selector_img = quickElement('img', search_filter_label, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif');
     43        search_selector_img.alt = gettext("Filter");
     44
    4045        filter_p.appendChild(document.createTextNode(' '));
     46
    4147        var filter_input = quickElement('input', filter_p, '', 'type', 'text');
    4248        filter_input.id = field_id + '_input';
    4349        selector_available.appendChild(from_box);
Back to Top