-
Notifications
You must be signed in to change notification settings - Fork 118
fix section sort #2735
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 section sort #2735
Conversation
briri
left a comment
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.
looks good @nicolasfranck. Just make that one small change and we will be good 👍
| method: 'post', | ||
| data: { sort_order: sectionIds }, | ||
| type: 'post', | ||
| $.param({ 'phase[sort_order]': sectionIds }), |
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 think you're missing data: here. I receive a JS error with the above
|
Fixed. Btw, how did you manage to merge in your development branch into my branch? See 11d9592 |
|
sorry about that! GitHub has a 'Update branch' button that shows up when the branch being PRed isn't up to date. Its a bit dangerous I guess since it updates a repo I am not a member of! |
|
I'm additionally updating this branch, see #2741 (comment) for an explanation |
briri
left a comment
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.
looks good. thanks
|
Assuming that this is about dragging template sections around, that is working for me. |
fix section sort
What it tries to fix: if you, in the org-admin, try to move the section headers, you'll get a javascript in the console.
Fix:
$.rails.ajaxshould use optiontype, notmethodOrgAdmin::PhasesController#sortexpectsphase[sort_order], not justsort_order