-
Notifications
You must be signed in to change notification settings - Fork 19
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
Modal does not close on confirm? #13
Comments
Currently, the plugin does not close the dialog when the confirmation button is pressed — this was by design, for what I felt was the more common case of these dialogs triggering full page refreshes as opposed to Ajax or front-end MVC updates (the idea being that leaving the dialog up while the new page loads prevents any other actions from being taken in the mean time if the response is not immediate). I will see about adding a configuration option for this behavior, probably something along the lines of |
Cheers, I can live with that. However it it was to close by default, the people using it to link to other pages would not have any downside either? |
The only downside to closing the dialog by default when the OK button is hit is that if the dialog is confirming (for example) deletion of a resource, or some other important action, and the server response takes more than a few tenths of a second to refresh the page in the user's browser, the user may mistakenly think that the action was carried out via Ajax, and navigate off the page before the response arrives. I recognize the value of having a |
Fixed with this in code on 49 line, before: After: |
I agree closing the modal when clicking confirm should become the deafult. (Nowadays most apps are SPA i.e. there's no full page reload after clicking confirm.) |
Hi,
I've downloaded confirm_with_reveal.js just now and implemented like this:
script src="/bundles/bmatznerfoundation/js/foundation/foundation.reveal.js"></script>
script src="/bundles/agrihealthahp/js/offlineHandler.js"></script> <-- thats mine
script src="/bundles/agrihealthahp/js/confirm_with_reveal.js"></script>
I catch the confirm event with:
jQuery('#' + model + '_edit .form_actions.delete').show().on('confirm.reveal', null, { name: model, rowId: rowId }, call.deleteRecord );
which works fine. However the modal does not close, I'm using
jQuery('.reveal-modal').hide();
jQuery('.reveal-modal-bg').hide();
to close it manually.
It is closing on Cancel.
Any idea why this would be happening?
The text was updated successfully, but these errors were encountered: