Teach dialogues about Escape to cancel, Enter to Save/OK, and F1 for help. Fixes #1535

This commit is contained in:
Surinder Kumar
2017-06-12 16:43:29 +01:00
committed by Dave Page
parent ec5bc23dfd
commit af43ccfc07
11 changed files with 118 additions and 78 deletions

View File

@@ -354,7 +354,7 @@ define([
setup: function() {
return {
buttons:[{
text: '', key: 27,
text: '', key: 112,
className: 'btn btn-default pull-left fa fa-lg fa-question',
attrs:{
name:'dialog_help', type:'button',
@@ -366,7 +366,7 @@ define([
},{
text: gettext('OK'), key: 13, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button"
},{
text: gettext('Cancel'), className: "btn btn-danger fa fa-lg fa-times pg-alertify-button"
text: gettext('Cancel'), key: 27, className: "btn btn-danger fa fa-lg fa-times pg-alertify-button"
}],
focus: { element: 0 },
options: {