Django

Code

Changeset 783

Show
Ignore:
Timestamp:
10/05/05 19:06:47 (3 years ago)
Author:
rjwittams
Message:

small change to undo javascript testing modification

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/templatetags/admin_modify.py

    r780 r783  
    181181        add_values = ' + " " + '.join(['document.getElementById("id_%s").value' % g for g in field.prepopulate_from]) 
    182182        for f in field.prepopulate_from: 
    183             t.append('document.getElementById("id_%s").onkeyup = function() { var e = document.getElementById("id_%s"); if(e._changed) { e.value = URLify(%s, %s);} } ' % (f, field.name, add_values, field.maxlength) ) 
     183            t.append('document.getElementById("id_%s").onkeyup = function() { var e = document.getElementById("id_%s"); if(!e._changed) { e.value = URLify(%s, %s);} } ' % (f, field.name, add_values, field.maxlength) ) 
    184184 
    185185    return ''.join(t) 
  • django/branches/new-admin/django/views/admin/main.py

    r748 r783  
    989989                t.append('document.getElementById("id_%s").onchange = function() { this._changed = true; };' % field.name) 
    990990            for f in field.prepopulate_from: 
    991                 t.append('document.getElementById("id_%s").onkeyup = function() { var e = document.getElementById("id_%s"); if (e._changed) { e.value = URLify(%s, %s);}};' % \ 
     991                t.append('document.getElementById("id_%s").onkeyup = function() { var e = document.getElementById("id_%s"); if (!e._changed) { e.value = URLify(%s, %s);}};' % \ 
    992992                    (f, field.name, ' + " " + '.join(['document.getElementById("id_%s").value' % g for g in field.prepopulate_from]), field.maxlength)) 
    993993        t.append('</script>\n')