diff --git a/apps/spreadsheeteditor/main/app/view/ScaleDialog.js b/apps/spreadsheeteditor/main/app/view/ScaleDialog.js index c4c2186f5..68aec9826 100644 --- a/apps/spreadsheeteditor/main/app/view/ScaleDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ScaleDialog.js @@ -146,14 +146,22 @@ define([ this._setDefaults(); }, - onBtnClick: function(event) { - var state = event.currentTarget.attributes['result'].value; + _handleInput: function(state) { if (this.options.handler) { this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined); } this.close(); }, + onBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + onPrimary: function() { + this._handleInput('ok'); + return false; + }, + setDisabledScale: function() { if (this._state.height !== 'Auto' || this._state.width !== 'Auto') { this.spnScale.setValue('100 %');