Commit ec44f1ec authored by Julia Radzhabova's avatar Julia Radzhabova

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

parent 84f895ce
......@@ -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%">
......
......@@ -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 || {}));
});
\ No newline at end of file
......@@ -1005,6 +1005,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",
......
......@@ -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%">
......
......@@ -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 || {}));
});
\ No newline at end of file
......@@ -1411,6 +1411,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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment