Ticket #5704: 5704trunk.diff
File 5704trunk.diff, 1.9 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/media/js/admin/RelatedObjectLookups.js
59 59 var name = win.name.replace(/___/g, '.'); 60 60 var elem = document.getElementById(name); 61 61 if (elem) { 62 if (elem.nodeName == 'SELECT') { 62 var elemName = elem.nodeName.toUpperCase(); 63 if (elemName == 'SELECT') { 63 64 var o = new Option(newRepr, newId); 64 65 elem.options[elem.options.length] = o; 65 66 o.selected = true; 66 } else if (elem .nodeName == 'INPUT') {67 } else if (elemName == 'INPUT') { 67 68 elem.value = newId; 68 69 } 69 70 } else { -
django/contrib/admin/views/main.py
273 273 post_url_continue += "?_popup=1" 274 274 return HttpResponseRedirect(post_url_continue % pk_value) 275 275 if "_popup" in request.POST: 276 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 276 return HttpResponse('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' 277 '<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body>' 278 '<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script></body></html>' % \ 277 279 # escape() calls force_unicode. 278 280 (escape(pk_value), escape(new_object))) 279 281 elif "_addanother" in request.POST: