-
- Downloads
[IMP] web: dialog triggers custom callback on close
Added an option in the Dialog class to give it a function to run when it's closed by other ways than by its buttons. Its default value is the "cancel" callback if given, or none. Before this commit, there was no way to add any callback to run when the modal wasn't closed by a button. Now, when exiting the modal by other means (e.g.: "Escape" key), it will run a given callback.
Showing
- addons/web/static/src/js/core/dialog.js 14 additions, 0 deletionsaddons/web/static/src/js/core/dialog.js
- addons/web/static/tests/core/dialog_tests.js 129 additions, 0 deletionsaddons/web/static/tests/core/dialog_tests.js
- addons/web/views/webclient_templates.xml 1 addition, 0 deletionsaddons/web/views/webclient_templates.xml
Loading
Please register or sign in to comment