Ticket #10327: 10327-r9845.diff

File 10327-r9845.diff, 2.8 KB (added by Joost Cassee, 16 years ago)
  • django/contrib/admin/media/js/admin/RelatedObjectLookups.js

     
    3232    name = id_to_windowname(name);
    3333    var href;
    3434    if (triggeringLink.href.search(/\?/) >= 0) {
    35         href = triggeringLink.href + '&pop=1';
     35        href = triggeringLink.href + '&pop=1&jsdom=' + document.domain;
    3636    } else {
    37         href = triggeringLink.href + '?pop=1';
     37        href = triggeringLink.href + '?pop=1&jsdom=' + document.domain;
    3838    }
    3939    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
    4040    win.focus();
  • django/contrib/admin/views/main.py

     
    2727TO_FIELD_VAR = 't'
    2828IS_POPUP_VAR = 'pop'
    2929ERROR_FLAG = 'e'
     30JS_DOMAIN_VAR = 'jsdom'
    3031
    3132# Text to display within change-list table cells if the value is blank.
    3233EMPTY_CHANGELIST_VALUE = '(None)'
     
    5354            self.page_num = 0
    5455        self.show_all = ALL_VAR in request.GET
    5556        self.is_popup = IS_POPUP_VAR in request.GET
     57        self.js_domain = request.GET.get(JS_DOMAIN_VAR)
    5658        self.to_field = request.GET.get(TO_FIELD_VAR)
    5759        self.params = dict(request.GET.items())
    5860        if PAGE_VAR in self.params:
     
    170172    def get_query_set(self):
    171173        qs = self.root_query_set
    172174        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):
    174176            if i in lookup_params:
    175177                del lookup_params[i]
    176178        for key, value in lookup_params.items():
  • django/contrib/admin/templates/admin/base.html

     
    88<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
    99{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
    1010<![endif]>
     11<script type="text/javascript">document.domain = "{{ cl.js_domain }}"</script>
    1112{% block extrahead %}{% endblock %}
    1213{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
    1314</head>
Back to Top