[SSE] Debug adding alternative text for tables.

This commit is contained in:
Julia Radzhabova 2017-02-07 11:36:15 +03:00
parent 7d7f797bf7
commit 423c39d110
2 changed files with 10 additions and 11 deletions

View file

@ -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);

View file

@ -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',