Ticket #7955: 7955.patch

File 7955.patch, 2.5 KB (added by mk, 7 years ago)
  • django/contrib/admin/media/js/admin/RelatedObjectLookups.js

    diff --git a/django/contrib/admin/media/js/admin/RelatedObjectLookups.js b/django/contrib/admin/media/js/admin/RelatedObjectLookups.js
    index ca578cc..5e2b4b5 100644
    a b function showRelatedObjectLookupPopup(triggeringLink) { 
    1717    name = name.replace(/\./g, '___');
    1818    var href;
    1919    if (triggeringLink.href.search(/\?/) >= 0) {
    20         href = triggeringLink.href + '&pop=1';
     20        href = triggeringLink.href + '&_popup=1';
    2121    } else {
    22         href = triggeringLink.href + '?pop=1';
     22        href = triggeringLink.href + '?_popup=1';
    2323    }
    2424    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
    2525    win.focus();
  • django/contrib/admin/templates/admin/search_form.html

    diff --git a/django/contrib/admin/templates/admin/search_form.html b/django/contrib/admin/templates/admin/search_form.html
    index b232aa9..26dc381 100644
    a b  
    77<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query|escape }}" id="searchbar" />
    88<input type="submit" value="{% trans 'Go' %}" />
    99{% if show_result_count %}
    10     <span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
     10    <span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
    1111{% endif %}
    1212{% for pair in cl.params.items %}
    1313    {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0|escape }}" value="{{ pair.1|escape }}"/>{% endifnotequal %}
  • django/contrib/admin/views/main.py

    diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
    index 116d9d4..3b3bdd4 100644
    a b ORDER_VAR = 'o' 
    2424ORDER_TYPE_VAR = 'ot'
    2525PAGE_VAR = 'p'
    2626SEARCH_VAR = 'q'
    27 IS_POPUP_VAR = 'pop'
     27IS_POPUP_VAR = '_popup'
    2828ERROR_FLAG = 'e'
    2929
    3030# Text to display within change-list table cells if the value is blank.
Back to Top