[PE][SSE] Bug 19378

This commit is contained in:
Julia Radzhabova 2018-08-30 18:41:09 +03:00
parent 3455b57289
commit f60d5fafe9
10 changed files with 287 additions and 14 deletions

View file

@ -45,6 +45,32 @@
</table> </table>
</div> </div>
</div> </div>
<div id="id-adv-image-rotate" class="settings-panel active">
<div class="inner-content padding-large">
<div style="width: 100%;">
<label class="input-label"><%= scope.textAngle %></label>
<div id="image-advanced-spin-angle" style="display: inline-block; margin-left: 5px;"></div>
</div>
</div>
<div class="separator horizontal padding-large"></div>
<div class="inner-content padding-large">
<table cols="2">
<tr>
<td rowspan="2" class="padding-small" style="vertical-align: top;">
<label class="input-label" style="margin-right: 15px;vertical-align: top;"><%= scope.textFlipped %></label>
</td>
<td class="padding-small">
<div id="image-advanced-checkbox-hor"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="image-advanced-checkbox-vert"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-image-alttext" class="settings-panel"> <div id="id-adv-image-alttext" class="settings-panel">
<div class="inner-content"> <div class="inner-content">
<table cols="1" width="100%"> <table cols="1" width="100%">

View file

@ -17,6 +17,32 @@
</table> </table>
</div> </div>
</div> </div>
<div id="id-adv-shape-rotate" class="settings-panel active">
<div class="inner-content padding-large">
<div style="width: 100%;">
<label class="input-label"><%= scope.textAngle %></label>
<div id="shape-advanced-spin-angle" style="display: inline-block; margin-left: 5px;"></div>
</div>
</div>
<div class="separator horizontal padding-large"></div>
<div class="inner-content padding-large">
<table cols="2">
<tr>
<td rowspan="2" class="padding-small" style="vertical-align: top;">
<label class="input-label" style="margin-right: 15px;vertical-align: top;"><%= scope.textFlipped %></label>
</td>
<td class="padding-small">
<div id="shape-advanced-checkbox-hor"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="shape-advanced-checkbox-vert"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-shape-shape" class="settings-panel"> <div id="id-adv-shape-shape" class="settings-panel">
<div class="inner-content"> <div class="inner-content">
<table cols="2" style="width: 100%;"> <table cols="2" style="width: 100%;">

View file

@ -40,7 +40,8 @@
define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.template', define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.template',
'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/view/AdvancedSettingsWindow',
'common/main/lib/component/MetricSpinner' 'common/main/lib/component/MetricSpinner',
'common/main/lib/component/CheckBox'
], function (contentTemplate) { ], function (contentTemplate) {
'use strict'; 'use strict';
@ -59,6 +60,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
title: this.textTitle, title: this.textTitle,
items: [ items: [
{panelId: 'id-adv-image-size', panelCaption: this.textPlacement}, {panelId: 'id-adv-image-size', panelCaption: this.textPlacement},
{panelId: 'id-adv-image-rotate', panelCaption: this.textRotation},
{panelId: 'id-adv-image-alttext', panelCaption: this.textAlt} {panelId: 'id-adv-image-alttext', panelCaption: this.textAlt}
], ],
contentTemplate: _.template(contentTemplate)({ contentTemplate: _.template(contentTemplate)({
@ -171,6 +173,27 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
}); });
this.spinners.push(this.spnY); this.spinners.push(this.spnY);
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#image-advanced-spin-angle'),
step: 1,
width: 80,
defaultUnit : "°",
value: '0 °',
maxValue: 3600,
minValue: -3600
});
this.chFlipHor = new Common.UI.CheckBox({
el: $('#image-advanced-checkbox-hor'),
labelText: this.textHorizontally
});
this.chFlipVert = new Common.UI.CheckBox({
el: $('#image-advanced-checkbox-vert'),
labelText: this.textVertically
});
// Alt Text // Alt Text
this.inputAltTitle = new Common.UI.InputField({ this.inputAltTitle = new Common.UI.InputField({
@ -225,6 +248,11 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
this.spnY.setValue('', true); this.spnY.setValue('', true);
} }
value = props.asc_getRot();
this.spnAngle.setValue((value==undefined || value===null) ? '' : Math.floor(value*180/3.14159265358979+0.5), true);
this.chFlipHor.setValue(props.asc_getFlipH());
this.chFlipVert.setValue(props.asc_getFlipV());
value = props.asc_getTitle(); value = props.asc_getTitle();
this.inputAltTitle.setValue(value ? value : ''); this.inputAltTitle.setValue(value ? value : '');
@ -254,6 +282,10 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
if (this.isAltDescChanged) if (this.isAltDescChanged)
properties.asc_putDescription(this.textareaAltDescription.val()); properties.asc_putDescription(this.textareaAltDescription.val());
properties.asc_putRot(this.spnAngle.getNumberValue() * 3.14159265358979 / 180);
properties.asc_putFlipH(this.chFlipHor.getValue()=='checked');
properties.asc_putFlipV(this.chFlipVert.getValue()=='checked');
return { imageProps: properties }; return { imageProps: properties };
}, },
@ -289,7 +321,12 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
textAlt: 'Alternative Text', textAlt: 'Alternative Text',
textAltTitle: 'Title', textAltTitle: 'Title',
textAltDescription: 'Description', 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.',
textRotation: 'Rotation',
textAngle: 'Angle',
textFlipped: 'Flipped',
textHorizontally: 'Horizontally',
textVertically: 'Vertically'
}, PE.Views.ImageSettingsAdvanced || {})); }, PE.Views.ImageSettingsAdvanced || {}));
}); });

View file

@ -41,7 +41,8 @@
define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.template', define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.template',
'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/view/AdvancedSettingsWindow',
'common/main/lib/component/ComboBox', 'common/main/lib/component/ComboBox',
'common/main/lib/component/MetricSpinner' 'common/main/lib/component/MetricSpinner',
'common/main/lib/component/CheckBox'
], function (contentTemplate) { ], function (contentTemplate) {
'use strict'; 'use strict';
@ -61,6 +62,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
title: this.textTitle, title: this.textTitle,
items: [ items: [
{panelId: 'id-adv-shape-width', panelCaption: this.textSize}, {panelId: 'id-adv-shape-width', panelCaption: this.textSize},
{panelId: 'id-adv-shape-rotate', panelCaption: this.textRotation},
{panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows}, {panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows},
{panelId: 'id-adv-shape-margins', panelCaption: this.strMargins}, {panelId: 'id-adv-shape-margins', panelCaption: this.strMargins},
{panelId: 'id-adv-shape-columns', panelCaption: this.strColumns}, {panelId: 'id-adv-shape-columns', panelCaption: this.strColumns},
@ -230,6 +232,27 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}, this)); }, this));
this.spinners.push(this.spnMarginRight); this.spinners.push(this.spnMarginRight);
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-angle'),
step: 1,
width: 80,
defaultUnit : "°",
value: '0 °',
maxValue: 3600,
minValue: -3600
});
this.chFlipHor = new Common.UI.CheckBox({
el: $('#shape-advanced-checkbox-hor'),
labelText: this.textHorizontally
});
this.chFlipVert = new Common.UI.CheckBox({
el: $('#shape-advanced-checkbox-vert'),
labelText: this.textVertically
});
// Shape // Shape
this._arrCapType = [ this._arrCapType = [
{displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat}, {displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
@ -499,10 +522,10 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
val = margins.get_Bottom(); val = margins.get_Bottom();
this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true); this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true);
} }
this.btnsCategory[2].setDisabled(null === margins); // Margins this.btnsCategory[3].setDisabled(null === margins); // Margins
var shapetype = props.asc_getType(); var shapetype = props.asc_getType();
this.btnsCategory[3].setDisabled(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3' this.btnsCategory[4].setDisabled(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
|| shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2' || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5' || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|| shapetype=='straightConnector1'); || shapetype=='straightConnector1');
@ -519,6 +542,11 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
value = props.asc_getDescription(); value = props.asc_getDescription();
this.textareaAltDescription.val(value ? value : ''); this.textareaAltDescription.val(value ? value : '');
value = props.asc_getRot();
this.spnAngle.setValue((value==undefined || value===null) ? '' : Math.floor(value*180/3.14159265358979+0.5), true);
this.chFlipHor.setValue(props.asc_getFlipH());
this.chFlipVert.setValue(props.asc_getFlipV());
this._changedProps = new Asc.asc_CShapeProperty(); this._changedProps = new Asc.asc_CShapeProperty();
} }
}, },
@ -530,6 +558,10 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
if (this.isAltDescChanged) if (this.isAltDescChanged)
this._changedProps.asc_putDescription(this.textareaAltDescription.val()); this._changedProps.asc_putDescription(this.textareaAltDescription.val());
this._changedProps.asc_putRot(this.spnAngle.getNumberValue() * 3.14159265358979 / 180);
this._changedProps.asc_putFlipH(this.chFlipHor.getValue()=='checked');
this._changedProps.asc_putFlipV(this.chFlipVert.getValue()=='checked');
Common.localStorage.setItem("pe-settings-shaperatio", (this.btnRatio.pressed) ? 1 : 0); Common.localStorage.setItem("pe-settings-shaperatio", (this.btnRatio.pressed) ? 1 : 0);
return { shapeProps: this._changedProps} ; return { shapeProps: this._changedProps} ;
}, },
@ -538,7 +570,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
if (props ){ if (props ){
var stroke = props.get_stroke(); var stroke = props.get_stroke();
if (stroke) { if (stroke) {
this.btnsCategory[1].setDisabled(stroke.get_type() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows this.btnsCategory[2].setDisabled(stroke.get_type() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows
var value = stroke.get_linejoin(); var value = stroke.get_linejoin();
for (var i=0; i<this._arrJoinType.length; i++) { for (var i=0; i<this._arrJoinType.length; i++) {
@ -731,7 +763,12 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
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', strColumns: 'Columns',
textSpacing: 'Spacing between columns', textSpacing: 'Spacing between columns',
textColNumber: 'Number of columns' textColNumber: 'Number of columns',
textRotation: 'Rotation',
textAngle: 'Angle',
textFlipped: 'Flipped',
textHorizontally: 'Horizontally',
textVertically: 'Vertically'
}, PE.Views.ShapeSettingsAdvanced || {})); }, PE.Views.ShapeSettingsAdvanced || {}));
}); });

View file

@ -1058,6 +1058,11 @@
"PE.Views.ImageSettingsAdvanced.textSize": "Size", "PE.Views.ImageSettingsAdvanced.textSize": "Size",
"PE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced Settings", "PE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced Settings",
"PE.Views.ImageSettingsAdvanced.textWidth": "Width", "PE.Views.ImageSettingsAdvanced.textWidth": "Width",
"PE.Views.ImageSettingsAdvanced.textRotation": "Rotation",
"PE.Views.ImageSettingsAdvanced.textAngle": "Angle",
"PE.Views.ImageSettingsAdvanced.textFlipped": "Flipped",
"PE.Views.ImageSettingsAdvanced.textHorizontally": "Horizontally",
"PE.Views.ImageSettingsAdvanced.textVertically": "Vertically",
"PE.Views.LeftMenu.tipAbout": "About", "PE.Views.LeftMenu.tipAbout": "About",
"PE.Views.LeftMenu.tipChat": "Chat", "PE.Views.LeftMenu.tipChat": "Chat",
"PE.Views.LeftMenu.tipComments": "Comments", "PE.Views.LeftMenu.tipComments": "Comments",
@ -1196,6 +1201,11 @@
"PE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows", "PE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows",
"PE.Views.ShapeSettingsAdvanced.textWidth": "Width", "PE.Views.ShapeSettingsAdvanced.textWidth": "Width",
"PE.Views.ShapeSettingsAdvanced.txtNone": "None", "PE.Views.ShapeSettingsAdvanced.txtNone": "None",
"PE.Views.ShapeSettingsAdvanced.textRotation": "Rotation",
"PE.Views.ShapeSettingsAdvanced.textAngle": "Angle",
"PE.Views.ShapeSettingsAdvanced.textFlipped": "Flipped",
"PE.Views.ShapeSettingsAdvanced.textHorizontally": "Horizontally",
"PE.Views.ShapeSettingsAdvanced.textVertically": "Vertically",
"PE.Views.SignatureSettings.notcriticalErrorTitle": "Warning", "PE.Views.SignatureSettings.notcriticalErrorTitle": "Warning",
"PE.Views.SignatureSettings.strDelete": "Remove Signature", "PE.Views.SignatureSettings.strDelete": "Remove Signature",
"PE.Views.SignatureSettings.strDetails": "Signature Details", "PE.Views.SignatureSettings.strDetails": "Signature Details",

View file

@ -1,3 +1,29 @@
<div id="id-adv-image-rotate" class="settings-panel active">
<div class="inner-content padding-large">
<div style="width: 100%;">
<label class="input-label"><%= scope.textAngle %></label>
<div id="image-advanced-spin-angle" style="display: inline-block; margin-left: 5px;"></div>
</div>
</div>
<div class="separator horizontal padding-large"></div>
<div class="inner-content padding-large">
<table cols="2">
<tr>
<td rowspan="2" class="padding-small" style="vertical-align: top;">
<label class="input-label" style="margin-right: 15px;vertical-align: top;"><%= scope.textFlipped %></label>
</td>
<td class="padding-small">
<div id="image-advanced-checkbox-hor"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="image-advanced-checkbox-vert"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-image-alttext" class="settings-panel active"> <div id="id-adv-image-alttext" class="settings-panel active">
<div class="inner-content"> <div class="inner-content">
<table cols="1" width="100%"> <table cols="1" width="100%">

View file

@ -17,6 +17,32 @@
</table> </table>
</div> </div>
</div> </div>
<div id="id-adv-shape-rotate" class="settings-panel active">
<div class="inner-content padding-large">
<div style="width: 100%;">
<label class="input-label"><%= scope.textAngle %></label>
<div id="shape-advanced-spin-angle" style="display: inline-block; margin-left: 5px;"></div>
</div>
</div>
<div class="separator horizontal padding-large"></div>
<div class="inner-content padding-large">
<table cols="2">
<tr>
<td rowspan="2" class="padding-small" style="vertical-align: top;">
<label class="input-label" style="margin-right: 15px;vertical-align: top;"><%= scope.textFlipped %></label>
</td>
<td class="padding-small">
<div id="shape-advanced-checkbox-hor"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="shape-advanced-checkbox-vert"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="id-adv-shape-shape" class="settings-panel"> <div id="id-adv-shape-shape" class="settings-panel">
<div class="inner-content"> <div class="inner-content">
<table cols="2" style="width: 100%;"> <table cols="2" style="width: 100%;">

View file

@ -40,7 +40,9 @@
define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.template', define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.template',
'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/view/AdvancedSettingsWindow',
'common/main/lib/component/InputField' 'common/main/lib/component/InputField',
'common/main/lib/component/MetricSpinner',
'common/main/lib/component/CheckBox'
], function (contentTemplate) { ], function (contentTemplate) {
'use strict'; 'use strict';
@ -57,6 +59,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
_.extend(this.options, { _.extend(this.options, {
title: this.textTitle, title: this.textTitle,
items: [ items: [
{panelId: 'id-adv-image-rotate', panelCaption: this.textRotation},
{panelId: 'id-adv-image-alttext', panelCaption: this.textAlt} {panelId: 'id-adv-image-alttext', panelCaption: this.textAlt}
], ],
contentTemplate: _.template(contentTemplate)({ contentTemplate: _.template(contentTemplate)({
@ -74,6 +77,27 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
var me = this; var me = this;
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#image-advanced-spin-angle'),
step: 1,
width: 80,
defaultUnit : "°",
value: '0 °',
maxValue: 3600,
minValue: -3600
});
this.chFlipHor = new Common.UI.CheckBox({
el: $('#image-advanced-checkbox-hor'),
labelText: this.textHorizontally
});
this.chFlipVert = new Common.UI.CheckBox({
el: $('#image-advanced-checkbox-vert'),
labelText: this.textVertically
});
// Alt Text // Alt Text
this.inputAltTitle = new Common.UI.InputField({ this.inputAltTitle = new Common.UI.InputField({
@ -112,6 +136,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
value = props.asc_getDescription(); value = props.asc_getDescription();
this.textareaAltDescription.val(value ? value : ''); this.textareaAltDescription.val(value ? value : '');
value = props.asc_getRot();
this.spnAngle.setValue((value==undefined || value===null) ? '' : Math.floor(value*180/3.14159265358979+0.5), true);
this.chFlipHor.setValue(props.asc_getFlipH());
this.chFlipVert.setValue(props.asc_getFlipV());
this._changedProps = new Asc.asc_CImgProperty(); this._changedProps = new Asc.asc_CImgProperty();
} }
}, },
@ -123,6 +152,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
if (this.isAltDescChanged) if (this.isAltDescChanged)
this._changedProps.asc_putDescription(this.textareaAltDescription.val()); this._changedProps.asc_putDescription(this.textareaAltDescription.val());
this._changedProps.asc_putRot(this.spnAngle.getNumberValue() * 3.14159265358979 / 180);
this._changedProps.asc_putFlipH(this.chFlipHor.getValue()=='checked');
this._changedProps.asc_putFlipV(this.chFlipVert.getValue()=='checked');
return { imageProps: this._changedProps} ; return { imageProps: this._changedProps} ;
}, },
@ -132,7 +165,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
textAlt: 'Alternative Text', textAlt: 'Alternative Text',
textAltTitle: 'Title', textAltTitle: 'Title',
textAltDescription: 'Description', 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.',
textRotation: 'Rotation',
textAngle: 'Angle',
textFlipped: 'Flipped',
textHorizontally: 'Horizontally',
textVertically: 'Vertically'
}, SSE.Views.ImageSettingsAdvanced || {})); }, SSE.Views.ImageSettingsAdvanced || {}));
}); });

View file

@ -41,7 +41,8 @@
define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.template', define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.template',
'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/view/AdvancedSettingsWindow',
'common/main/lib/component/ComboBox', 'common/main/lib/component/ComboBox',
'common/main/lib/component/MetricSpinner' 'common/main/lib/component/MetricSpinner',
'common/main/lib/component/CheckBox'
], function (contentTemplate) { ], function (contentTemplate) {
'use strict'; 'use strict';
@ -61,6 +62,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
title: this.textTitle, title: this.textTitle,
items: [ items: [
{panelId: 'id-adv-shape-width', panelCaption: this.textSize}, {panelId: 'id-adv-shape-width', panelCaption: this.textSize},
{panelId: 'id-adv-shape-rotate', panelCaption: this.textRotation},
{panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows}, {panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows},
{panelId: 'id-adv-shape-margins', panelCaption: this.strMargins}, {panelId: 'id-adv-shape-margins', panelCaption: this.strMargins},
{panelId: 'id-adv-shape-columns', panelCaption: this.strColumns}, {panelId: 'id-adv-shape-columns', panelCaption: this.strColumns},
@ -246,6 +248,27 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
}, this)); }, this));
this.spinners.push(this.spnMarginRight); this.spinners.push(this.spnMarginRight);
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-angle'),
step: 1,
width: 80,
defaultUnit : "°",
value: '0 °',
maxValue: 3600,
minValue: -3600
});
this.chFlipHor = new Common.UI.CheckBox({
el: $('#shape-advanced-checkbox-hor'),
labelText: this.textHorizontally
});
this.chFlipVert = new Common.UI.CheckBox({
el: $('#shape-advanced-checkbox-vert'),
labelText: this.textVertically
});
// Shape // Shape
this._arrCapType = [ this._arrCapType = [
{displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat}, {displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
@ -533,10 +556,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
val = margins.asc_getBottom(); val = margins.asc_getBottom();
this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true); this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true);
} }
this.btnsCategory[2].setDisabled(null === margins); // Margins this.btnsCategory[3].setDisabled(null === margins); // Margins
var shapetype = shapeprops.asc_getType(); var shapetype = shapeprops.asc_getType();
this.btnsCategory[3].setDisabled(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3' this.btnsCategory[4].setDisabled(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
|| shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2' || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5' || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|| shapetype=='straightConnector1'); || shapetype=='straightConnector1');
@ -553,6 +576,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
value = props.asc_getDescription(); value = props.asc_getDescription();
this.textareaAltDescription.val(value ? value : ''); this.textareaAltDescription.val(value ? value : '');
value = props.asc_getRot();
this.spnAngle.setValue((value==undefined || value===null) ? '' : Math.floor(value*180/3.14159265358979+0.5), true);
this.chFlipHor.setValue(props.asc_getFlipH());
this.chFlipVert.setValue(props.asc_getFlipV());
this._changedProps = new Asc.asc_CImgProperty(); this._changedProps = new Asc.asc_CImgProperty();
} }
}, },
@ -564,6 +592,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
if (this.isAltDescChanged) if (this.isAltDescChanged)
this._changedProps.asc_putDescription(this.textareaAltDescription.val()); this._changedProps.asc_putDescription(this.textareaAltDescription.val());
this._changedProps.asc_putRot(this.spnAngle.getNumberValue() * 3.14159265358979 / 180);
this._changedProps.asc_putFlipH(this.chFlipHor.getValue()=='checked');
this._changedProps.asc_putFlipV(this.chFlipVert.getValue()=='checked');
return { shapeProps: this._changedProps} ; return { shapeProps: this._changedProps} ;
}, },
@ -571,7 +603,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
if (props ){ if (props ){
var stroke = props.asc_getStroke(); var stroke = props.asc_getStroke();
if (stroke) { if (stroke) {
this.btnsCategory[1].setDisabled(stroke.asc_getType() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows this.btnsCategory[2].setDisabled(stroke.asc_getType() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows
var value = stroke.asc_getLinejoin(); var value = stroke.asc_getLinejoin();
for (var i=0; i<this._arrJoinType.length; i++) { for (var i=0; i<this._arrJoinType.length; i++) {
@ -775,7 +807,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
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', strColumns: 'Columns',
textSpacing: 'Spacing between columns', textSpacing: 'Spacing between columns',
textColNumber: 'Number of columns' textColNumber: 'Number of columns',
textRotation: 'Rotation',
textAngle: 'Angle',
textFlipped: 'Flipped',
textHorizontally: 'Horizontally',
textVertically: 'Vertically'
}, SSE.Views.ShapeSettingsAdvanced || {})); }, SSE.Views.ShapeSettingsAdvanced || {}));
}); });

View file

@ -1402,6 +1402,11 @@
"SSE.Views.ImageSettingsAdvanced.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.", "SSE.Views.ImageSettingsAdvanced.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.",
"SSE.Views.ImageSettingsAdvanced.textAltTitle": "Title", "SSE.Views.ImageSettingsAdvanced.textAltTitle": "Title",
"SSE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced Settings", "SSE.Views.ImageSettingsAdvanced.textTitle": "Image - Advanced Settings",
"SSE.Views.ImageSettingsAdvanced.textRotation": "Rotation",
"SSE.Views.ImageSettingsAdvanced.textAngle": "Angle",
"SSE.Views.ImageSettingsAdvanced.textFlipped": "Flipped",
"SSE.Views.ImageSettingsAdvanced.textHorizontally": "Horizontally",
"SSE.Views.ImageSettingsAdvanced.textVertically": "Vertically",
"SSE.Views.LeftMenu.tipAbout": "About", "SSE.Views.LeftMenu.tipAbout": "About",
"SSE.Views.LeftMenu.tipChat": "Chat", "SSE.Views.LeftMenu.tipChat": "Chat",
"SSE.Views.LeftMenu.tipComments": "Comments", "SSE.Views.LeftMenu.tipComments": "Comments",
@ -1694,6 +1699,11 @@
"SSE.Views.ShapeSettingsAdvanced.textTop": "Top", "SSE.Views.ShapeSettingsAdvanced.textTop": "Top",
"SSE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows", "SSE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows",
"SSE.Views.ShapeSettingsAdvanced.textWidth": "Width", "SSE.Views.ShapeSettingsAdvanced.textWidth": "Width",
"SSE.Views.ShapeSettingsAdvanced.textRotation": "Rotation",
"SSE.Views.ShapeSettingsAdvanced.textAngle": "Angle",
"SSE.Views.ShapeSettingsAdvanced.textFlipped": "Flipped",
"SSE.Views.ShapeSettingsAdvanced.textHorizontally": "Horizontally",
"SSE.Views.ShapeSettingsAdvanced.textVertically": "Vertically",
"SSE.Views.SignatureSettings.notcriticalErrorTitle": "Warning", "SSE.Views.SignatureSettings.notcriticalErrorTitle": "Warning",
"SSE.Views.SignatureSettings.strDelete": "Remove Signature", "SSE.Views.SignatureSettings.strDelete": "Remove Signature",
"SSE.Views.SignatureSettings.strDetails": "Signature Details", "SSE.Views.SignatureSettings.strDetails": "Signature Details",