From 423c39d110e0cb43aeea6968c63ae0d4ade17853 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Feb 2017 11:36:15 +0300 Subject: [PATCH] [SSE] Debug adding alternative text for tables. --- .../spreadsheeteditor/main/app/view/TableSettings.js | 9 ++------- .../main/app/view/TableSettingsAdvanced.js | 12 ++++++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 8bfa6b075..cec45f2c9 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -302,13 +302,8 @@ define([ tableProps: me._originalProps, api: me.api, handler: function(result, value) { - if (result == 'ok') { - if (me.api) { - if (value.tableProps.altTitle) - me.api.asc_changeFormatTableInfo(me._state.TableName, Asc.c_oAscChangeTableStyleInfo.title, value.tableProps.altTitle); - if (value.tableProps.altDescription) - me.api.asc_changeFormatTableInfo(me._state.TableName, Asc.c_oAscChangeTableStyleInfo.description , value.tableProps.altDescription); - } + if (result == 'ok' && me.api && value) { + me.api.asc_changeFormatTableInfo(me._state.TableName, Asc.c_oAscChangeTableStyleInfo.advancedSettings, value); } Common.NotificationCenter.trigger('edit:complete', me); diff --git a/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js index 1a7f58346..28c2918f5 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js @@ -115,10 +115,14 @@ define([ 'text!spreadsheeteditor/main/app/template/TableSettingsAdvanced.temp }, getSettings: function() { - return { tableProps: { - altTitle: (this.isAltTitleChanged) ? this.inputAltTitle.getValue() : undefined, - altDescription: (this.isAltDescChanged) ? this.textareaAltDescription.val(): undefined - }} ; + if (this.isAltTitleChanged || this.isAltDescChanged) { + var info = new Asc.AdvancedTableInfoSettings(); + if (this.isAltTitleChanged) + info.asc_setTitle(this.inputAltTitle.getValue()); + if (this.isAltDescChanged) + info.asc_setDescription(this.textareaAltDescription.val()); + return info; + } }, textTitle: 'Table - Advanced Settings',