-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] Fixed re-ordering templates on device add page #434 #829
Conversation
59ab2ad
to
cd31571
Compare
cd31571
to
e4806e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a corner case to handle: if adding device returns a validation error the bug shows up again.
If save is successful the chosen order doesn't seem to be retained, is that because of the bug being fixed in #830? Please double check. It was indeed caused by that issue, please rebase on the latest master.
df756ce
to
36edf95
Compare
$(document).on('click', 'a.inline-deletelink', function () { | ||
destroyHiddenSortableWidget($); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that the previous solution was not working when the config form was removed and then added back using the "add row" button.
This solution is also not ideal because it is listening for all .inline-deletelink
elements. I had to choose this because inline.js in Django has event.preventDefault
present in the click handler.
Closes #434