Close the dialog box when the user presses the escape (ESC) key.

This commit is contained in:
Christophe Laffont
2014-06-11 12:30:51 +02:00
parent d2dfbbf4b2
commit c02d6e2115
2 changed files with 12 additions and 2 deletions

View File

@@ -101,7 +101,10 @@
bootbox.hideAll();
// Show dialog
bootbox.dialog({
message : $("#product",data)
message : $("#product",data),
onEscape: function() {
bootbox.hideAll();
}
});
}
);
@@ -126,7 +129,9 @@
// Show dialog
bootbox.dialog({
message : data,
buttons : {}
onEscape: function() {
bootbox.hideAll();
}
});
}
});