Fixed #975 -- JavaScript shortcut in raw_id_admin for ManyToManyFields no longer replaces existing values.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-12-09 03:00:57 +00:00
parent f6b90c8c2a
commit a8b3d67b7a
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ function showRelatedObjectLookupPopup(triggeringLink) {
function dismissRelatedLookupPopup(win, chosenId) { function dismissRelatedLookupPopup(win, chosenId) {
var elem = document.getElementById(win.name); var elem = document.getElementById(win.name);
if (elem.className.indexOf('vCommaSeparatedIntegerField') != -1 && elem.value) { if (elem.className.indexOf('vRawIdAdminField') != -1 && elem.value) {
elem.value += ',' + chosenId; elem.value += ',' + chosenId;
} else { } else {
document.getElementById(win.name).value = chosenId; document.getElementById(win.name).value = chosenId;