Ticket #10327: 10327-r9969.diff
File 10327-r9969.diff, 3.1 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/media/js/admin/RelatedObjectLookups.js
36 36 } else { 37 37 href = triggeringLink.href + '?pop=1'; 38 38 } 39 if (window.location.host != document.domain) { 40 href += '&jsdom=' + document.domain 41 } 39 42 var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 40 43 win.focus(); 41 44 return false; -
django/contrib/admin/options.py
678 678 context = { 679 679 'title': cl.title, 680 680 'is_popup': cl.is_popup, 681 'js_domain': cl.js_domain, 681 682 'cl': cl, 682 683 'has_add_permission': self.has_add_permission(request), 683 684 'root_path': self.admin_site.root_path, -
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 {% if js_domain %}<script type="text/javascript">document.domain = "{{ js_domain }}"</script>{% endif %} 11 12 {% block extrahead %}{% endblock %} 12 13 {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %} 13 14 </head>