diff --git a/apps/documenteditor/main/app/view/NoteSettingsDialog.js b/apps/documenteditor/main/app/view/NoteSettingsDialog.js index 9a3f841b4..e5571e63e 100644 --- a/apps/documenteditor/main/app/view/NoteSettingsDialog.js +++ b/apps/documenteditor/main/app/view/NoteSettingsDialog.js @@ -123,7 +123,7 @@ define([ '', '
' ].join('') @@ -271,17 +271,17 @@ define([ }, onDlgBtnClick: function(event) { - var me = this; - var state = (typeof(event) == 'object') ? event.currentTarget.attributes['result'].value : event; - if (state == 'insert' || state == 'apply') { - this.handler && this.handler.call(this, state, (state == 'insert' || state == 'apply') ? this.getSettings() : undefined); - } - - this.close(); + this._handleInput((typeof(event) == 'object') ? event.currentTarget.attributes['result'].value : event); }, onPrimary: function() { - return true; + this._handleInput('insert'); + return false; + }, + + _handleInput: function(state) { + this.handler && this.handler.call(this, state, (state == 'insert' || state == 'apply') ? this.getSettings() : undefined); + this.close(); }, onFormatSelect: function(combo, record) { diff --git a/apps/presentationeditor/main/app/view/HeaderFooterDialog.js b/apps/presentationeditor/main/app/view/HeaderFooterDialog.js index 5995651dd..bb8575a7a 100644 --- a/apps/presentationeditor/main/app/view/HeaderFooterDialog.js +++ b/apps/presentationeditor/main/app/view/HeaderFooterDialog.js @@ -74,8 +74,8 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template', '', '', ' ' ].join('')