mirror of
https://github.com/django/django.git
synced 2025-07-20 01:29:11 +00:00
[1.0.X] Fixed #9341: add another on ManyToManyField
s with raw_id_admins
now works correctly. Backport of r10452 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e013c78ef8
commit
3891c137d4
@ -79,8 +79,12 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
|
|||||||
elem.options[elem.options.length] = o;
|
elem.options[elem.options.length] = o;
|
||||||
o.selected = true;
|
o.selected = true;
|
||||||
} else if (elem.nodeName == 'INPUT') {
|
} else if (elem.nodeName == 'INPUT') {
|
||||||
|
if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
|
||||||
|
elem.value += ',' + newId;
|
||||||
|
} else {
|
||||||
elem.value = newId;
|
elem.value = newId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
var toId = name + "_to";
|
var toId = name + "_to";
|
||||||
elem = document.getElementById(toId);
|
elem = document.getElementById(toId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user