1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Fixed #1063 -- Fixed admin JS bug in which many-to-many selections were lost after using 'Add another'

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-04-23 23:09:27 +00:00
parent 2d5d40a7f1
commit 9b8332f7df

View File

@ -39,7 +39,7 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
if (elem.nodeName == 'SELECT') {
var o = new Option(newRepr, newId);
elem.options[elem.options.length] = o;
elem.selectedIndex = elem.length - 1;
o.selected = true;
} else if (elem.nodeName == 'INPUT') {
elem.value = newId;
}