Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 11a8084d4f77842b476de3687319ca243663d7df 1 parent bb5734e
@adrianholovaty adrianholovaty authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
View
7 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.