Ticket #5704: 5704-r16435.diff
File 5704-r16435.diff, 1.8 KB (added by , 13 years ago) |
---|
-
django/contrib/admin/media/js/admin/RelatedObjectLookups.js
74 74 var name = windowname_to_id(win.name); 75 75 var elem = document.getElementById(name); 76 76 if (elem) { 77 if (elem.nodeName == 'SELECT') { 77 var elemName = elem.nodeName.toUpperCase(); 78 if (elemName == 'SELECT') { 78 79 var o = new Option(newRepr, newId); 79 80 elem.options[elem.options.length] = o; 80 81 o.selected = true; 81 } else if (elem .nodeName == 'INPUT') {82 } else if (elemName == 'INPUT') { 82 83 if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { 83 84 elem.value += ',' + newId; 84 85 } else { -
django/contrib/admin/options.py
744 744 return HttpResponseRedirect(post_url_continue % pk_value) 745 745 746 746 if "_popup" in request.POST: 747 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 747 return HttpResponse( 748 '<!DOCTYPE html><html><head><title></title></head><body>' 749 '<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script></body></html>' % \ 748 750 # escape() calls force_unicode. 749 751 (escape(pk_value), escapejs(obj))) 750 752 elif "_addanother" in request.POST: