Commit 1f15d442 authored by Tim Graham's avatar Tim Graham
Browse files

[1.9.x] Fixed #26387 -- Restored the functionality of the admin's raw_id_fields in list_editable.

Backport of acfaec3d from master
parent 9d0c8d3d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -176,6 +176,14 @@
            }
        });
        $('.related-widget-wrapper select').trigger('change');
        $('.related-lookup').click(function(e) {
            e.preventDefault();
            var event = $.Event('django:lookup-related');
            $(this).trigger(event);
            if (!event.isDefaultPrevented()) {
                showRelatedObjectLookupPopup(this);
            }
        });
    });

})(django.jQuery);
+0 −8
Original line number Diff line number Diff line
@@ -79,14 +79,6 @@
                        showAddAnotherPopup(this);
                    }
                });
                $('.related-lookup').click(function(e) {
                    e.preventDefault();
                    var event = $.Event('django:lookup-related');
                    $(this).trigger(event);
                    if (!event.isDefaultPrevented()) {
                        showRelatedObjectLookupPopup(this);
                    }
                });

            {% if adminform and add %}
                $('form#{{ opts.model_name }}_form :input:visible:enabled:first').focus()
+3 −0
Original line number Diff line number Diff line
@@ -15,3 +15,6 @@ Bugfixes

* Fixed data loss on SQLite where ``DurationField`` values with fractional
  seconds could be saved as ``None`` (:ticket:`26324`).

* Restored the functionality of the admin's ``raw_id_fields`` in
  ``list_editable`` (:ticket:`26387`).
+3 −0
Original line number Diff line number Diff line
@@ -37,3 +37,6 @@ Bugfixes

* Fixed a regression in ``CommonMiddleware`` that caused spurious warnings in
  logs on requests missing a trailing slash (:ticket:`26293`).

* Restored the functionality of the admin's ``raw_id_fields`` in
  ``list_editable`` (:ticket:`26387`).
+8 −0
Original line number Diff line number Diff line
@@ -1008,5 +1008,13 @@ site.register(Group, GroupAdmin)
site2 = admin.AdminSite(name="namespaced_admin")
site2.register(User, UserAdmin)
site2.register(Group, GroupAdmin)
site2.register(ParentWithUUIDPK)
site2.register(
    RelatedWithUUIDPKModel,
    list_display=['pk', 'parent'],
    list_editable=['parent'],
    raw_id_fields=['parent'],
)

site7 = admin.AdminSite(name="admin7")
site7.register(Article, ArticleAdmin2)
Loading