Skip to content
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

replace last jquery with plain browser api #2222

Merged
merged 10 commits into from
Jun 17, 2024

Conversation

Kakadus
Copy link
Collaborator

@Kakadus Kakadus commented Jun 10, 2024

close #2217

@Kakadus Kakadus requested a review from richardebeling June 10, 2024 20:09
@Kakadus Kakadus force-pushed the fix-csrf-jquery-sortablejs branch from 1a17ae3 to f75423c Compare June 10, 2024 20:15
@niklasmohrin
Copy link
Member

niklasmohrin commented Jun 10, 2024

Huh? Wouldn't the real fix be to replace the $.post call (in QuestionnaireGrid) with a fetch? Or does this occur in more places? As far as I can tell, sortablejs does not use jquery itself and it should be all our doing

@Kakadus Kakadus changed the title readd X-CSRFToken header to jquery requests replace last jquery with plain browser api Jun 17, 2024
Comment on lines -344 to +346
if (event.oldIndex && event.newIndex) {
if (event.oldIndex !== undefined && event.newIndex !== undefined) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since migration to typescript: if indices were 0, this did not work

@Kakadus Kakadus requested a review from richardebeling June 17, 2024 17:48
Copy link
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ UI works

Thanks for fixing the bug with ordering the first item as well 🎆

@janno42 janno42 merged commit 6b30430 into e-valuation:main Jun 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Questionnaire reordering fails
4 participants