Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored June 20, 2007
7  django/contrib/admin/media/js/admin/RelatedObjectLookups.js
@@ -30,7 +30,12 @@ function dismissRelatedLookupPopup(win, chosenId) {
30 30
 function showAddAnotherPopup(triggeringLink) {
31 31
     var name = triggeringLink.id.replace(/^add_/, '');
32 32
     name = name.replace(/\./g, '___');
33  
-    var win = window.open(triggeringLink.href + '?_popup=1', name, 'height=500,width=800,resizable=yes,scrollbars=yes');
  33
+    href = triggeringLink.href
  34
+    if (href.indexOf('?') == -1)
  35
+	href += '?_popup=1';
  36
+    else
  37
+	href += '&_popup=1';
  38
+    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
34 39
     win.focus();
35 40
     return false;
36 41
 }

0 notes on commit 11a8084

Please sign in to comment.
Something went wrong with that request. Please try again.