Ticket #2022: patch.diff
File patch.diff, 1.7 KB (added by , 18 years ago) |
---|
-
django/contrib/admin/media/js/admin/RelatedObjectLookups.js
32 32 return false; 33 33 } 34 34 35 function showChangePopup(id, url) 36 { 37 select = document.getElementById(id) 38 value = select.options[select.selectedIndex].value; 39 if (value) 40 { 41 var win = window.open(url+value + '?_popup=1', id, 'height=500,width=800,resizable=yes,scrollbars=yes'); 42 win.focus(); 43 } 44 return false; 45 } 46 35 47 function dismissAddAnotherPopup(win, newId, newRepr) { 36 48 var name = win.name.replace(/___/g, '.'); 37 49 var elem = document.getElementById(name); -
django/contrib/admin/templates/widget/foreign.html
9 9 {% else %} 10 10 {% if bound_field.needs_add_label %} 11 11 <a href="{{ bound_field.related_url }}add/" class="add-another" id="add_{{ bound_field.element_id }}" onclick="return showAddAnotherPopup(this);"> <img src="{% admin_media_prefix %}img/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a> 12 <a href="{{ bound_field.related_url }}" class="changelink" id="change_{{ bound_field.element_id }}" onclick="return showChangePopup('{{ bound_field.element_id }}', '{{ bound_field.related_url }}');"></a> 12 13 {% endif %}{% endif %} 13 14 {% if change %} 14 15 {% if bound_field.field.primary_key %}