[SSE] Apply row/column size by pressing the Enter when size isn't changed.

This commit is contained in:
Julia Radzhabova 2016-08-30 17:03:00 +03:00
parent ff39cf93e7
commit af21b7eb50

View file

@ -104,7 +104,7 @@ define([
var $window = this.getChild(); var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.spnSize.on('entervalue', _.bind(this.onEnterValue, this)); this.spnSize.on('entervalue', _.bind(this.onPrimary, this));
this.spnSize.on('change', _.bind(this.onChange, this)); this.spnSize.on('change', _.bind(this.onChange, this));
this.spnSize.$el.find('input').focus(); this.spnSize.$el.find('input').focus();
}, },
@ -121,10 +121,6 @@ define([
this._handleInput(event.currentTarget.attributes['result'].value); this._handleInput(event.currentTarget.attributes['result'].value);
}, },
onEnterValue: function(event) {
this._handleInput('ok');
},
onChange: function () { onChange: function () {
var val = this.spnSize.getNumberValue(); var val = this.spnSize.getNumberValue();
val = val / this.step; val = (val | val) * this.step; val = val / this.step; val = (val | val) * this.step;
@ -135,6 +131,10 @@ define([
return this.spnSize.getNumberValue(); return this.spnSize.getNumberValue();
}, },
onPrimary: function() {
this._handleInput('ok');
},
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
okButtonText: 'Ok', okButtonText: 'Ok',
txtMinText: 'The minimum value for this field is {0}', txtMinText: 'The minimum value for this field is {0}',