Bug with closing password window using Enter.
This commit is contained in:
parent
66f4cc1086
commit
d0216389f5
|
@ -104,15 +104,21 @@ define([
|
||||||
this.$window.find('.tool').hide();
|
this.$window.find('.tool').hide();
|
||||||
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
var me = this;
|
this.inputPwd = new Common.UI.InputField({
|
||||||
me.inputPwd = new Common.UI.InputField({
|
|
||||||
el: $('#id-password-txt'),
|
el: $('#id-password-txt'),
|
||||||
type: 'password',
|
type: 'password',
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
validateOnBlur: false
|
validateOnBlur: false
|
||||||
});
|
});
|
||||||
} else
|
this.$window.find('input').on('keypress', _.bind(this.onKeyPress, this));
|
||||||
|
} else {
|
||||||
|
var me = this;
|
||||||
this.initCodePages();
|
this.initCodePages();
|
||||||
|
this.onPrimary = function() {
|
||||||
|
me.onBtnClick();
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -138,9 +144,9 @@ define([
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrimary: function() {
|
onKeyPress: function(event) {
|
||||||
this.onBtnClick();
|
if (event.keyCode == Common.UI.Keys.RETURN)
|
||||||
return false;
|
this.onBtnClick();
|
||||||
},
|
},
|
||||||
|
|
||||||
initCodePages: function () {
|
initCodePages: function () {
|
||||||
|
|
Loading…
Reference in a new issue