diff --git a/django/contrib/admin/static/admin/js/SelectFilter2.js b/django/contrib/admin/static/admin/js/SelectFilter2.js
index 6c8a4b4..5313c3c 100644
a
|
b
|
window.SelectFilter = {
|
58 | 58 | filter_input.id = field_id + '_input'; |
59 | 59 | |
60 | 60 | selector_available.appendChild(from_box); |
61 | | var choose_all = quickElement('a', selector_available, gettext('Choose all'), 'title', interpolate(gettext('Click to choose all %s at once.'), [field_name]), 'href', 'javascript: (function(){ SelectBox.move_all("' + field_id + '_from", "' + field_id + '_to"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_add_all_link'); |
| 61 | var choose_all = quickElement('a', selector_available, gettext('Choose all'), 'title', interpolate(gettext('Click to choose all %s at once.'), [field_name]), 'href', 'javascript:void(0);', 'id', field_id + '_add_all_link'); |
| 62 | choose_all.addEventListener("click", function() { |
| 63 | SelectBox.move_all(field_id + "_from", field_id + "_to"); |
| 64 | SelectFilter.refresh_icons(field_id); |
| 65 | }); |
62 | 66 | choose_all.className = 'selector-chooseall'; |
63 | 67 | |
64 | 68 | // <ul class="selector-chooser"> |
65 | 69 | var selector_chooser = quickElement('ul', selector_div); |
66 | 70 | selector_chooser.className = 'selector-chooser'; |
67 | | var add_link = quickElement('a', quickElement('li', selector_chooser), gettext('Choose'), 'title', gettext('Choose'), 'href', 'javascript: (function(){ SelectBox.move("' + field_id + '_from","' + field_id + '_to"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_add_link'); |
| 71 | var add_link = quickElement('a', quickElement('li', selector_chooser), gettext('Choose'), 'title', gettext('Choose'), 'href', 'javascript:void(0);', 'id', field_id + '_add_link'); |
| 72 | add_link.addEventListener("click", function() { |
| 73 | SelectBox.move(field_id + "_from", field_id + "_to"); |
| 74 | SelectFilter.refresh_icons(field_id); |
| 75 | }); |
68 | 76 | add_link.className = 'selector-add'; |
69 | | var remove_link = quickElement('a', quickElement('li', selector_chooser), gettext('Remove'), 'title', gettext('Remove'), 'href', 'javascript: (function(){ SelectBox.move("' + field_id + '_to","' + field_id + '_from"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_remove_link'); |
| 77 | var remove_link = quickElement('a', quickElement('li', selector_chooser), gettext('Remove'), 'title', gettext('Remove'), 'href', 'javascript:void(0);', 'id', field_id + '_remove_link'); |
| 78 | remove_link.addEventListener("click", function() { |
| 79 | SelectBox.move(field_id + "_to", field_id + "_from"); |
| 80 | SelectFilter.refresh_icons(field_id); |
| 81 | }); |
70 | 82 | remove_link.className = 'selector-remove'; |
71 | 83 | |
72 | 84 | // <div class="selector-chosen"> |
… |
… |
window.SelectFilter = {
|
77 | 89 | |
78 | 90 | var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name')); |
79 | 91 | to_box.className = 'filtered'; |
80 | | var clear_all = quickElement('a', selector_chosen, gettext('Remove all'), 'title', interpolate(gettext('Click to remove all chosen %s at once.'), [field_name]), 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_remove_all_link'); |
| 92 | var clear_all = quickElement('a', selector_chosen, gettext('Remove all'), 'title', interpolate(gettext('Click to remove all chosen %s at once.'), [field_name]), 'href', 'javascript:void(0);', 'id', field_id + '_remove_all_link'); |
| 93 | clear_all.addEventListener("click", function() { |
| 94 | SelectBox.move_all(field_id + "_to", field_id + "_from"); |
| 95 | SelectFilter.refresh_icons(field_id); |
| 96 | }); |
81 | 97 | clear_all.className = 'selector-clearall'; |
82 | 98 | |
83 | 99 | from_box.setAttribute('name', from_box.getAttribute('name') + '_old'); |