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

Don't refresh page on resource suspend/resume #21

Open
mthuurne opened this issue Jul 4, 2019 · 0 comments
Open

Don't refresh page on resource suspend/resume #21

mthuurne opened this issue Jul 4, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@mthuurne
Copy link
Member

mthuurne commented Jul 4, 2019

On the ResourceIndex page, if a Suspend or Resume button is clicked, this leads to a form POST and the page is refreshed to show the new state. This is fine on factories with few resources, but if the number of resources becomes large, the refresh resets the scroll position, which can be annoying if the user wants to suspend/resume several resources of the same type that are not in the first screen of the page.

We could have a JavaScript handler that submits the form and does an XMLHttpRequest to refresh the table row instead of the entire page. Keep the normal form submission around for APE and as a fallback in case JavaScript is disabled or not working, but suppress the browser from refreshing the page in the JavaScript handler.

@mthuurne mthuurne added the enhancement New feature or request label Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant