Ticket #5704: 5704nfa.diff
File 5704nfa.diff, 1.8 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/options.py
381 381 post_url_continue += "?_popup=1" 382 382 return HttpResponseRedirect(post_url_continue % pk_value) 383 383 if request.POST.has_key("_popup"): 384 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 384 return HttpResponse('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' 385 '<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body>' 386 '<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script></body></html>' % \ 385 387 # escape() calls force_unicode. 386 388 (escape(pk_value), escape(new_object))) 387 389 elif request.POST.has_key("_addanother"):