Ticket #1635: django_1635.diff

File django_1635.diff, 1.1 KB (added by Christopher Lenz <cmlenz@…>, 19 years ago)

Patch that fixes the issue by replacing every period with a triple underscore

  • django/contrib/admin/media/js/admin/RelatedObjectLookups.js

     
    22// and Add Another links.
    33
    44function showRelatedObjectLookupPopup(triggeringLink) {
    5     var name = triggeringLink.id.replace(/^lookup_/, '');
     5    var name = triggeringLink.id.replace(/^lookup_/, '');
     6    name = name.replace(/\./g, '___');
    67    var href;
    78    if (triggeringLink.href.search(/\?/) >= 0) {
    89        href = triggeringLink.href + '&pop=1';
     
    1516}
    1617
    1718function dismissRelatedLookupPopup(win, chosenId) {
    18     var elem = document.getElementById(win.name);
     19    var name = win.name.replace(/___/g, '.');
     20    var elem = document.getElementById(name);
    1921    if (elem.className.indexOf('vRawIdAdminField') != -1 && elem.value) {
    2022        elem.value += ',' + chosenId;
    2123    } else {
    22         document.getElementById(win.name).value = chosenId;
     24        document.getElementById(name).value = chosenId;
    2325    }
    2426    win.close();
    2527}
Back to Top