[fix] Fixed re-ordering templates on device add page #434#829
Merged
Conversation
pandafy
force-pushed
the
issues/434-reorder-templates-device-add
branch
from
February 6, 2024 14:19
59ab2ad to
cd31571
Compare
pandafy
force-pushed
the
issues/434-reorder-templates-device-add
branch
from
February 7, 2024 12:19
cd31571 to
e4806e8
Compare
nemesifier
requested changes
Feb 10, 2024
Member
There was a problem hiding this comment.
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.
pandafy
force-pushed
the
issues/434-reorder-templates-device-add
branch
from
February 13, 2024 11:11
df756ce to
36edf95
Compare
pandafy
commented
Feb 13, 2024
Comment on lines
+7
to
+9
| $(document).on('click', 'a.inline-deletelink', function () { | ||
| destroyHiddenSortableWidget($); | ||
| }); |
Member
Author
There was a problem hiding this comment.
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.
nemesifier
approved these changes
Feb 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #434