Don't close plugin dialog when ESC is pressed.

Fix Bug 32983.
This commit is contained in:
Julia Radzhabova 2016-08-23 17:27:32 +03:00
parent 3342f6e62e
commit a3e36a3d3c
2 changed files with 5 additions and 3 deletions

View file

@ -154,7 +154,8 @@ define([
maxwidth: undefined, maxwidth: undefined,
maxheight: undefined, maxheight: undefined,
minwidth: 0, minwidth: 0,
minheight: 0 minheight: 0,
enableKeyEvents: true
}; };
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' + var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
@ -182,7 +183,7 @@ define([
} }
function _keydown(event) { function _keydown(event) {
if (!this.isLocked() && this.isVisible()) { if (!this.isLocked() && this.isVisible() && this.initConfig.enableKeyEvents) {
switch (event.keyCode) { switch (event.keyCode) {
case Common.UI.Keys.ESC: case Common.UI.Keys.ESC:
if ( $('.asc-loadmask').length<1 ) { if ( $('.asc-loadmask').length<1 ) {

View file

@ -198,7 +198,8 @@ define([
var _options = {}; var _options = {};
_.extend(_options, { _.extend(_options, {
cls: 'advanced-settings-dlg', cls: 'advanced-settings-dlg',
header: true header: true,
enableKeyEvents: false
}, options); }, options);
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34; var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;