#36757: Add CSS class to ignore change event in list view
-------------------------------------+-------------------------------------
     Reporter:  Jacob Rief           |                    Owner:  Ahmed
                                     |  Asar
         Type:  New feature          |                   Status:  closed
    Component:  contrib.admin        |                  Version:  dev
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  list-view, change-   |             Triage Stage:
  event                              |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Rief):

 Hi Jacob,
 that's not the way how django-admin-sortable2 works. There in the list
 view, the sorting order is saved immediatly after you drop an item. This
 can't be implemented otherwise because the list view doesn't have any
 "Save" button.
 So what we currently end with, is a resorted list which confuses Django's
 JS code, because it assumes that changes have been made to editable
 fields. But these changes have already been saved to the database.
 I wouldn't even consider this a workaround for django-admin-sortable2 but
 for any 3rd party library wanting to change any value.
 My current solution is to monkey [patch
 django/contrib/admin/static/admin/js/actions.js](https://github.com/jrief
 /django-admin-sortable2/blob/master/patches/actions-django-5.2.patch)
 which is error prone and hard to maintain.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36757#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ae34036ef-b79c5d5b-4444-408e-b647-21349f444d6c-000000%40eu-central-1.amazonses.com.

Reply via email to