[PE][SSE] Set columns for text in shape.

This commit is contained in:
Julia Radzhabova 2017-05-26 12:49:33 +03:00
parent 9a4ed35907
commit d3a7cc6c44
6 changed files with 134 additions and 3 deletions

View file

@ -94,6 +94,24 @@
</table>
</div>
</div>
<div id="id-adv-shape-columns" class="settings-panel">
<div class="inner-content">
<table cols="1" style="width: 100%;">
<tr>
<td class="padding-small">
<label class="input-label"><%= scope.textColNumber %></label>
<div id="shape-columns-number"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<label class="input-label"><%= scope.textSpacing %></label>
<div id="shape-columns-spacing"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-shape-alttext" class="settings-panel">
<div class="inner-content">
<table cols="1" width="100%">

View file

@ -63,6 +63,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
{panelId: 'id-adv-shape-width', panelCaption: this.textSize},
{panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows},
{panelId: 'id-adv-shape-margins', panelCaption: this.strMargins},
{panelId: 'id-adv-shape-columns', panelCaption: this.strColumns},
{panelId: 'id-adv-shape-alttext', panelCaption: this.textAlt}
],
contentTemplate: _.template(contentTemplate)({
@ -411,6 +412,37 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.mnuEndSizePicker.on('item:click', _.bind(this.onSelectEndSize, this));
this._selectStyleItem(this.btnEndSize, null);
// Columns
this.spnColumns = new Common.UI.MetricSpinner({
el: $('#shape-columns-number'),
step: 1,
width: 100,
defaultUnit : "",
value: '1',
maxValue: 16,
minValue: 1
});
this.spnColumns.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps)
this._changedProps.asc_putColumnNumber(field.getNumberValue());
}, this));
this.spnSpacing = new Common.UI.MetricSpinner({
el: $('#shape-columns-spacing'),
step: .1,
width: 100,
defaultUnit : "cm",
value: '0 cm',
maxValue: 40.64,
minValue: 0
});
this.spnSpacing.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps)
this._changedProps.asc_putColumnSpace(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}, this));
this.spinners.push(this.spnSpacing);
// Alt Text
this.inputAltTitle = new Common.UI.InputField({
@ -468,6 +500,12 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}
this.btnsCategory[2].setDisabled(null === margins); // Margins
value = props.asc_getColumnNumber();
this.spnColumns.setValue((null !== value && undefined !== value) ? value : '', true);
value = props.asc_getColumnSpace();
this.spnSpacing.setValue((null !== value && undefined !== value) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
value = props.asc_getTitle();
this.inputAltTitle.setValue(value ? value : '');
@ -681,7 +719,10 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
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.'
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.',
strColumns: 'Columns',
textSpacing: 'Spacing between columns',
textColNumber: 'Number of columns'
}, PE.Views.ShapeSettingsAdvanced || {}));
});

View file

@ -1016,6 +1016,9 @@
"PE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows",
"PE.Views.ShapeSettingsAdvanced.textWidth": "Width",
"PE.Views.ShapeSettingsAdvanced.txtNone": "None",
"PE.Views.ShapeSettingsAdvanced.strColumns": "Columns",
"PE.Views.ShapeSettingsAdvanced.textSpacing": "Spacing between columns",
"PE.Views.ShapeSettingsAdvanced.textColNumber": "Number of columns",
"PE.Views.SlideSettings.strBackground": "Background color",
"PE.Views.SlideSettings.strColor": "Color",
"PE.Views.SlideSettings.strDelay": "Delay",

View file

@ -94,6 +94,24 @@
</table>
</div>
</div>
<div id="id-adv-shape-columns" class="settings-panel">
<div class="inner-content">
<table cols="1" style="width: 100%;">
<tr>
<td class="padding-small">
<label class="input-label"><%= scope.textColNumber %></label>
<div id="shape-columns-number"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<label class="input-label"><%= scope.textSpacing %></label>
<div id="shape-columns-spacing"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-shape-alttext" class="settings-panel">
<div class="inner-content">
<table cols="1" width="100%">

View file

@ -63,6 +63,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
{panelId: 'id-adv-shape-width', panelCaption: this.textSize},
{panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows},
{panelId: 'id-adv-shape-margins', panelCaption: this.strMargins},
{panelId: 'id-adv-shape-columns', panelCaption: this.strColumns},
{panelId: 'id-adv-shape-alttext', panelCaption: this.textAlt}
],
contentTemplate: _.template(contentTemplate)({
@ -435,6 +436,45 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
obj.getChild('.footer .primary').focus();
});
// Columns
this.spnColumns = new Common.UI.MetricSpinner({
el: $('#shape-columns-number'),
step: 1,
width: 100,
defaultUnit : "",
value: '1',
maxValue: 16,
minValue: 1
});
this.spnColumns.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
this._changedProps.asc_putShapeProperties(new Asc.asc_CShapeProperty());
this._changedProps.asc_getShapeProperties().asc_putColumnNumber(field.getNumberValue());
}
}, this));
this.spnSpacing = new Common.UI.MetricSpinner({
el: $('#shape-columns-spacing'),
step: .1,
width: 100,
defaultUnit : "cm",
value: '0 cm',
maxValue: 40.64,
minValue: 0
});
this.spnSpacing.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
this._changedProps.asc_putShapeProperties(new Asc.asc_CShapeProperty());
this._changedProps.asc_getShapeProperties().asc_putColumnSpace(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
this.spinners.push(this.spnSpacing);
// Alt Text
this.inputAltTitle = new Common.UI.InputField({
@ -494,6 +534,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
}
this.btnsCategory[2].setDisabled(null === margins); // Margins
value = shapeprops.asc_getColumnNumber();
this.spnColumns.setValue((null !== value && undefined !== value) ? value : '', true);
value = shapeprops.asc_getColumnSpace();
this.spnSpacing.setValue((null !== value && undefined !== value) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
value = props.asc_getTitle();
this.inputAltTitle.setValue(value ? value : '');
@ -717,8 +763,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
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.'
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.',
strColumns: 'Columns',
textSpacing: 'Spacing between columns',
textColNumber: 'Number of columns'
}, SSE.Views.ShapeSettingsAdvanced || {}));
});

View file

@ -1420,6 +1420,9 @@
"SSE.Views.ShapeSettingsAdvanced.textTop": "Top",
"SSE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows",
"SSE.Views.ShapeSettingsAdvanced.textWidth": "Width",
"SSE.Views.ShapeSettingsAdvanced.strColumns": "Columns",
"SSE.Views.ShapeSettingsAdvanced.textSpacing": "Spacing between columns",
"SSE.Views.ShapeSettingsAdvanced.textColNumber": "Number of columns",
"SSE.Views.Statusbar.CopyDialog.itemCopyToEnd": "(Copy to end)",
"SSE.Views.Statusbar.CopyDialog.itemMoveToEnd": "(Move to end)",
"SSE.Views.Statusbar.CopyDialog.textCopyBefore": "Copy before sheet",