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 75d339f811
commit 3db2df3253
2 changed files with 12 additions and 2 deletions

5
.gitignore vendored
View File

@@ -42,3 +42,8 @@ templates/*
!templates/email/
!templates/frontOffice/
!templates/pdf/
#Ignore CodeKit
codekit-config.json
config.codekit
.codekit-cache

View File

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