Closed JamesNK closed 11 years ago
use jQuery's preventDefault to cancel an event
'buttons': [
'Cancel',
{
caption: "Add",
callback: function (e) {
// if don't want to close the dialog box
// notice the "e" argument to the function
e.preventDefault();
}
}
]
As far as I can tell right now a dialog always closes when a button is clicked. I'd like a way to control whether it should close or not in the button callback.
e.g.
I made this change to zebra_dialog.js:
You might want to modify if so that callbacks that don't return any value still close for backwards compatibility.