[DE] Added alternative text for tables (for future use).
This commit is contained in:
parent
fd7468f43f
commit
6e83ac8ca8
|
@ -327,4 +327,27 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="id-adv-table-alttext" class="settings-panel">
|
||||
<div class="inner-content">
|
||||
<table cols="1" width="100%">
|
||||
<tr>
|
||||
<td class="padding-large">
|
||||
<label class="header"><%= scope.textAltTitle %></label>
|
||||
<div id="table-advanced-alt-title"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="header"><%= scope.textAltDescription %></label>
|
||||
<textarea id="table-advanced-alt-description" class="form-control" style="width: 100%; height: 120px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><%= scope.textAltTip %></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
|
@ -67,7 +67,8 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
{panelId: 'id-adv-table-cell-props', panelCaption: this.textCellProps},
|
||||
{panelId: 'id-adv-table-borders', panelCaption: this.textBordersBackgroung},
|
||||
{panelId: 'id-adv-table-position', panelCaption: this.textTablePosition},
|
||||
{panelId: 'id-adv-table-wrap', panelCaption: this.textWrap}
|
||||
{panelId: 'id-adv-table-wrap', panelCaption: this.textWrap},
|
||||
{panelId: 'id-adv-table-alttext', panelCaption: this.textAlt}
|
||||
],
|
||||
contentTemplate: _.template(contentTemplate)({
|
||||
scope: this
|
||||
|
@ -1003,7 +1004,25 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
this._btnsTableBorderPosition.push( _btn );
|
||||
}, this);
|
||||
|
||||
// Alt Text
|
||||
|
||||
this.inputAltTitle = new Common.UI.InputField({
|
||||
el : $('#table-advanced-alt-title'),
|
||||
allowBlank : true,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100%;'
|
||||
}).on('changed:after', function() {
|
||||
me.isAltTitleChanged = true;
|
||||
});
|
||||
|
||||
this.textareaAltDescription = this.$window.find('textarea');
|
||||
this.textareaAltDescription.keydown(function (event) {
|
||||
if (event.keyCode == Common.UI.Keys.RETURN) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
me.isAltDescChanged = true;
|
||||
});
|
||||
this.btnsCategory[5].setVisible(false);
|
||||
|
||||
this.AlignContainer = $('#tableadv-panel-align');
|
||||
this.DistanceContainer = $('#tableadv-panel-distance');
|
||||
|
@ -1119,6 +1138,12 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
this._changedProps.put_CellBorders(this.ChangedCellBorders);
|
||||
}
|
||||
|
||||
if (this.isAltTitleChanged)
|
||||
this._changedProps.asc_putTitle(this.inputAltTitle.getValue());
|
||||
|
||||
if (this.isAltDescChanged)
|
||||
this._changedProps.asc_putDescription(this.textareaAltDescription.val());
|
||||
|
||||
return { tableProps: this._changedProps, borderProps: {borderSize: this.BorderSize, borderColor: this.btnBorderColor.color} };
|
||||
},
|
||||
|
||||
|
@ -1384,6 +1409,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
|
||||
this.ShowHideSpacing(this.chAllowSpacing.getValue()==='checked');
|
||||
|
||||
// value = props.asc_getTitle();
|
||||
// this.inputAltTitle.setValue(value ? value : '');
|
||||
//
|
||||
// value = props.asc_getDescription();
|
||||
// this.textareaAltDescription.val(value ? value : '');
|
||||
}
|
||||
this._changedProps = new Asc.CTableProp();
|
||||
this._changedProps.put_CellSelect(!this._allTable);
|
||||
|
@ -2140,7 +2170,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
textTable: 'Table',
|
||||
textTableSize: 'Table Size',
|
||||
textTablePosition: 'Table Position',
|
||||
textWrappingStyle: 'Wrapping Style'
|
||||
textWrappingStyle: 'Wrapping Style',
|
||||
textAlt: 'Alternative Text',
|
||||
textAltTitle: 'Title',
|
||||
textAltDescription: 'Description',
|
||||
textAltTip: 'The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.'
|
||||
|
||||
}, DE.Views.TableSettingsAdvanced || {}));
|
||||
});
|
||||
|
|
|
@ -1425,6 +1425,10 @@
|
|||
"DE.Views.TableSettingsAdvanced.txtNoBorders": "No borders",
|
||||
"DE.Views.TableSettingsAdvanced.txtPercent": "Percent",
|
||||
"DE.Views.TableSettingsAdvanced.txtPt": "Point",
|
||||
"DE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
|
||||
"DE.Views.TableSettingsAdvanced.textAltTitle": "Title",
|
||||
"DE.Views.TableSettingsAdvanced.textAltDescription": "Description",
|
||||
"DE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",
|
||||
"DE.Views.TextArtSettings.strColor": "Color",
|
||||
"DE.Views.TextArtSettings.strFill": "Fill",
|
||||
"DE.Views.TextArtSettings.strSize": "Size",
|
||||
|
|
Loading…
Reference in a new issue