Ticket #10327: 10327-r9845.diff
File 10327-r9845.diff, 2.8 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/media/js/admin/RelatedObjectLookups.js
32 32 name = id_to_windowname(name); 33 33 var href; 34 34 if (triggeringLink.href.search(/\?/) >= 0) { 35 href = triggeringLink.href + '&pop=1 ';35 href = triggeringLink.href + '&pop=1&jsdom=' + document.domain; 36 36 } else { 37 href = triggeringLink.href + '?pop=1 ';37 href = triggeringLink.href + '?pop=1&jsdom=' + document.domain; 38 38 } 39 39 var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 40 40 win.focus(); -
django/contrib/admin/views/main.py
27 27 TO_FIELD_VAR = 't' 28 28 IS_POPUP_VAR = 'pop' 29 29 ERROR_FLAG = 'e' 30 JS_DOMAIN_VAR = 'jsdom' 30 31 31 32 # Text to display within change-list table cells if the value is blank. 32 33 EMPTY_CHANGELIST_VALUE = '(None)' … … 53 54 self.page_num = 0 54 55 self.show_all = ALL_VAR in request.GET 55 56 self.is_popup = IS_POPUP_VAR in request.GET 57 self.js_domain = request.GET.get(JS_DOMAIN_VAR) 56 58 self.to_field = request.GET.get(TO_FIELD_VAR) 57 59 self.params = dict(request.GET.items()) 58 60 if PAGE_VAR in self.params: … … 170 172 def get_query_set(self): 171 173 qs = self.root_query_set 172 174 lookup_params = self.params.copy() # a dictionary of the query string 173 for i in (ALL_VAR, ORDER_VAR, ORDER_TYPE_VAR, SEARCH_VAR, IS_POPUP_VAR ):175 for i in (ALL_VAR, ORDER_VAR, ORDER_TYPE_VAR, SEARCH_VAR, IS_POPUP_VAR, JS_DOMAIN_VAR): 174 176 if i in lookup_params: 175 177 del lookup_params[i] 176 178 for key, value in lookup_params.items(): -
django/contrib/admin/templates/admin/base.html
8 8 <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]--> 9 9 {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %} 10 10 <![endif]> 11 <script type="text/javascript">document.domain = "{{ cl.js_domain }}"</script> 11 12 {% block extrahead %}{% endblock %} 12 13 {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %} 13 14 </head>