diff --git a/apps/spreadsheeteditor/main/app/view/SetValueDialog.js b/apps/spreadsheeteditor/main/app/view/SetValueDialog.js index bcf923ac5..5ecb9ba3d 100644 --- a/apps/spreadsheeteditor/main/app/view/SetValueDialog.js +++ b/apps/spreadsheeteditor/main/app/view/SetValueDialog.js @@ -104,7 +104,7 @@ define([ var $window = this.getChild(); $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.$el.find('input').focus(); }, @@ -121,10 +121,6 @@ define([ this._handleInput(event.currentTarget.attributes['result'].value); }, - onEnterValue: function(event) { - this._handleInput('ok'); - }, - onChange: function () { var val = this.spnSize.getNumberValue(); val = val / this.step; val = (val | val) * this.step; @@ -135,6 +131,10 @@ define([ return this.spnSize.getNumberValue(); }, + onPrimary: function() { + this._handleInput('ok'); + }, + cancelButtonText: 'Cancel', okButtonText: 'Ok', txtMinText: 'The minimum value for this field is {0}',