Fixed #4556 -- Admin showAddAnotherPopup JavaScript function can now handle URLs with GET attributes. Thanks for the patch, glin@seznam.cz

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-06-20 06:12:43 +00:00
parent bb5734ee30
commit 11a8084d4f
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ function dismissRelatedLookupPopup(win, chosenId) {
function showAddAnotherPopup(triggeringLink) {
var name = triggeringLink.id.replace(/^add_/, '');
name = name.replace(/\./g, '___');
var win = window.open(triggeringLink.href + '?_popup=1', name, 'height=500,width=800,resizable=yes,scrollbars=yes');
href = triggeringLink.href
if (href.indexOf('?') == -1)
href += '?_popup=1';
else
href += '&_popup=1';
var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
win.focus();
return false;
}