Index: django/contrib/admin/media/js/SelectFilter2.js =================================================================== --- django/contrib/admin/media/js/SelectFilter2.js (revision 9220) +++ django/contrib/admin/media/js/SelectFilter2.js (working copy) @@ -71,6 +71,8 @@ addEvent(filter_input, 'keydown', function(e) { SelectFilter.filter_key_down(e, field_id); }); addEvent(from_box, 'dblclick', function() { SelectBox.move(field_id + '_from', field_id + '_to'); }); addEvent(to_box, 'dblclick', function() { SelectBox.move(field_id + '_to', field_id + '_from'); }); + addEvent(from_box, 'keypress', function(e) { SelectBox.edit(e, field_id + '_from'); }); + addEvent(to_box, 'keypress', function(e) { SelectBox.edit(e, field_id + '_to'); }); addEvent(findForm(from_box), 'submit', function() { SelectBox.select_all(field_id + '_to'); }); SelectBox.init(field_id + '_from'); SelectBox.init(field_id + '_to'); Index: django/contrib/admin/media/js/SelectBox.js =================================================================== --- django/contrib/admin/media/js/SelectBox.js (revision 9220) +++ django/contrib/admin/media/js/SelectBox.js (working copy) @@ -107,5 +107,16 @@ for (var i = 0; i < box.options.length; i++) { box.options[i].selected = 'selected'; } + }, + edit: function(event, id) { + // 45 = Insert + if ((event.which && event.which == 45) || (event.keyCode && event.keyCode == 45)) { + var selected_id = document.getElementById(id).value; + // Thanks trovster from #jquery@freenode! + var link = $('#'+id).parents().find('a.add-another:first').attr('href')+'../'+selected_id + var win = window.open(link + '?_popup=1', link, 'height=600,width=1000,resizable=yes,scrollbars=yes'); + win.focus(); + return false; + } } }