[SSE] Scale Dialog (closing window when click enter)

This commit is contained in:
Julia Svinareva 2019-08-28 14:05:31 +03:00
parent 28d8ad8df7
commit 8c7938565a

View file

@ -146,14 +146,22 @@ define([
this._setDefaults(); this._setDefaults();
}, },
onBtnClick: function(event) { _handleInput: function(state) {
var state = event.currentTarget.attributes['result'].value;
if (this.options.handler) { if (this.options.handler) {
this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined); this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined);
} }
this.close(); this.close();
}, },
onBtnClick: function(event) {
this._handleInput(event.currentTarget.attributes['result'].value);
},
onPrimary: function() {
this._handleInput('ok');
return false;
},
setDisabledScale: function() { setDisabledScale: function() {
if (this._state.height !== 'Auto' || this._state.width !== 'Auto') { if (this._state.height !== 'Auto' || this._state.width !== 'Auto') {
this.spnScale.setValue('100 %'); this.spnScale.setValue('100 %');