diff --git a/apps/documenteditor/main/app/view/BookmarksDialog.js b/apps/documenteditor/main/app/view/BookmarksDialog.js index 45b0db979..552ba194b 100644 --- a/apps/documenteditor/main/app/view/BookmarksDialog.js +++ b/apps/documenteditor/main/app/view/BookmarksDialog.js @@ -327,6 +327,8 @@ define([ }, onSelectBookmark: function(listView, itemView, record) { + if (!record) return; + var value = record.get('value'); this.txtName.setValue(value); this.btnAdd.setDisabled(false); diff --git a/apps/documenteditor/main/app/view/NoteSettingsDialog.js b/apps/documenteditor/main/app/view/NoteSettingsDialog.js index 95ab45313..72c78ec91 100644 --- a/apps/documenteditor/main/app/view/NoteSettingsDialog.js +++ b/apps/documenteditor/main/app/view/NoteSettingsDialog.js @@ -191,11 +191,11 @@ define([ menuStyle: 'min-width: 150px;', editable: false, data: [ - { displayValue: this.textSectEnd, value: Asc.c_oAscFootnotePos.SectEnd }, - { displayValue: this.textPageBottom, value: Asc.c_oAscFootnotePos.PageBottom } + { displayValue: this.textSectEnd, value: Asc.c_oAscEndnotePos.SectEnd }, + { displayValue: this.textDocEnd, value: Asc.c_oAscEndnotePos.DocEnd } ] }); - this.cmbEndnote.setValue(Asc.c_oAscFootnotePos.PageBottom); + this.cmbEndnote.setValue(Asc.c_oAscEndnotePos.DocEnd); this.cmbFormat = new Common.UI.ComboBox({ el: $('#note-settings-combo-format'), @@ -503,6 +503,7 @@ define([ textInsert: 'Insert', textCustom: 'Custom Mark', textSectEnd: 'End of section', + textDocEnd: 'End of document', textEndnote: 'Endnote' }, DE.Views.NoteSettingsDialog || {})) diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 51fc7ca6f..2a7322436 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1926,6 +1926,7 @@ "DE.Views.NoteSettingsDialog.textNumFormat": "Number Format", "DE.Views.NoteSettingsDialog.textPageBottom": "Bottom of page", "DE.Views.NoteSettingsDialog.textSectEnd": "End of section", + "DE.Views.NoteSettingsDialog.textDocEnd": "End of document", "DE.Views.NoteSettingsDialog.textSection": "Current section", "DE.Views.NoteSettingsDialog.textStart": "Start at", "DE.Views.NoteSettingsDialog.textTextBottom": "Below text", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index a38345c21..469501354 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1930,6 +1930,7 @@ "DE.Views.NoteSettingsDialog.textStart": "Начать с", "DE.Views.NoteSettingsDialog.textTextBottom": "Под текстом", "DE.Views.NoteSettingsDialog.textTitle": "Параметры сносок", + "DE.Views.NoteSettingsDialog.textDocEnd": "В конце документа", "DE.Views.NotesRemoveDialog.textEnd": "Удалить все концевые сноски", "DE.Views.NotesRemoveDialog.textFoot": "Удалить все обычные сноски", "DE.Views.NotesRemoveDialog.textTitle": "Удалить сноски", diff --git a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js index 9ac77fb32..2b6ec5cc2 100644 --- a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js @@ -367,6 +367,8 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', }, onSelectRangeItem: function(lisvView, itemView, record) { + if (!record) return; + this.userTipHide(); var rawData = {}, isViewSelect = _.isFunction(record.toJSON); diff --git a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js index a6647b8ec..7984ee0c2 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js @@ -150,6 +150,11 @@ define([ }); this.btnDelete.on('click', _.bind(this.onDelete, this)); + this.btnOk = new Common.UI.Button({ + el: this.$window.find('.primary'), + disabled: true + }); + this.afterRender(); }, @@ -188,6 +193,7 @@ define([ this.btnRename.setDisabled(!val); this.btnDuplicate.setDisabled(!val); this.btnDelete.setDisabled(!val); + this.btnOk.setDisabled(!val); if (val>0) { if (selectedItem===undefined || selectedItem===null) selectedItem = 0; if (_.isNumber(selectedItem)) { @@ -298,6 +304,8 @@ define([ }, onSelectItem: function(lisvView, itemView, record) { + if (!record) return; + this.userTipHide(); var rawData = {}, isViewSelect = _.isFunction(record.toJSON); @@ -330,6 +338,16 @@ define([ this.onPrimary(); }, + onPrimary: function() { + if (this.btnOk.isDisabled()) return false; + + if ( this.handler && this.handler.call(this, 'ok', this.getSettings()) ) + return; + + this.close(); + return false; + }, + txtTitle: 'Sheet View Manager', textViews: 'Sheet views', closeButtonText : 'Close',