[DE] Bug 19378
This commit is contained in:
parent
6489e7b2d3
commit
0bf55a17fd
|
@ -90,6 +90,32 @@
|
|||
</table>
|
||||
</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-wrap" class="settings-panel">
|
||||
<div class="inner-content padding-large">
|
||||
<label class="header padding-small"><%= scope.textWrap %></label>
|
||||
|
|
|
@ -64,6 +64,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
items: [
|
||||
{panelId: 'id-adv-image-width', panelCaption: this.textSize},
|
||||
{panelId: 'id-adv-shape-size', panelCaption: this.textSize},
|
||||
{panelId: 'id-adv-image-rotate', panelCaption: this.textRotation},
|
||||
{panelId: 'id-adv-image-wrap', panelCaption: this.textBtnWrap},
|
||||
{panelId: 'id-adv-image-position', panelCaption: this.textPosition},
|
||||
{panelId: 'id-adv-image-shape', panelCaption: this.textWeightArrows},
|
||||
|
@ -370,6 +371,27 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
this.cmbHeightPc.setValue(this._state.ShapeHeightPcFrom);
|
||||
this.cmbHeightPc.on('selected', _.bind(this.onCmbHeightPcSelect, 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
|
||||
});
|
||||
|
||||
// Wrapping
|
||||
|
||||
this.btnWrapInline = new Common.UI.Button({
|
||||
|
@ -1268,9 +1290,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
|
||||
this.btnOriginalSize.setVisible(!(shapeprops || chartprops));
|
||||
this.btnOriginalSize.setDisabled(props.get_ImageUrl()===null || props.get_ImageUrl()===undefined);
|
||||
this.btnsCategory[4].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Shapes
|
||||
this.btnsCategory[5].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Margins
|
||||
this.btnsCategory[2].setDisabled(props.get_FromGroup()); // Wrapping
|
||||
this.btnsCategory[5].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Shapes
|
||||
this.btnsCategory[6].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Margins
|
||||
this.btnsCategory[3].setDisabled(props.get_FromGroup()); // Wrapping
|
||||
this.btnsCategory[2].setVisible(!chartprops); // Rotation
|
||||
|
||||
if (shapeprops) {
|
||||
this._objectType = Asc.c_oAscTypeSelectElement.Shape;
|
||||
|
@ -1333,8 +1356,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true);
|
||||
}
|
||||
|
||||
this.btnsCategory[5].setDisabled(null === margins); // Margins
|
||||
this.btnsCategory[4].setDisabled(shapeprops.get_stroke().get_type() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows
|
||||
this.btnsCategory[6].setDisabled(null === margins); // Margins
|
||||
this.btnsCategory[5].setDisabled(shapeprops.get_stroke().get_type() == Asc.c_oAscStrokeType.STROKE_NONE); // Weights & Arrows
|
||||
|
||||
} else {
|
||||
value = props.asc_getLockAspect();
|
||||
|
@ -1355,6 +1378,13 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
this.spnHeight.setValue((value!==undefined) ? Common.Utils.Metric.fnRecalcFromMM(value).toFixed(2) : '', true);
|
||||
}
|
||||
|
||||
if (!chartprops) {
|
||||
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();
|
||||
this.inputAltTitle.setValue(value ? value : '');
|
||||
|
||||
|
@ -1397,6 +1427,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
}
|
||||
}
|
||||
|
||||
if (this._objectType != Asc.c_oAscTypeSelectElement.Chart) {
|
||||
properties.asc_putRot(this.spnAngle.getNumberValue() * 3.14159265358979 / 180);
|
||||
properties.asc_putFlipH(this.chFlipHor.getValue()=='checked');
|
||||
properties.asc_putFlipV(this.chFlipVert.getValue()=='checked');
|
||||
}
|
||||
|
||||
if (this.isAltTitleChanged)
|
||||
properties.asc_putTitle(this.inputAltTitle.getValue());
|
||||
|
||||
|
@ -1515,7 +1551,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
this.spnTop.setDisabled(disabledTB);
|
||||
this.spnBottom.setDisabled(disabledTB);
|
||||
|
||||
this.btnsCategory[3].setDisabled(btnId == Asc.c_oAscWrapStyle2.Inline);
|
||||
this.btnsCategory[4].setDisabled(btnId == Asc.c_oAscWrapStyle2.Inline);
|
||||
},
|
||||
|
||||
onHAlignSelect: function(combo, record){
|
||||
|
@ -2033,7 +2069,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
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.',
|
||||
textWeightArrows: 'Weights & Arrows'
|
||||
textWeightArrows: 'Weights & Arrows',
|
||||
textRotation: 'Rotation',
|
||||
textAngle: 'Angle',
|
||||
textFlipped: 'Flipped',
|
||||
textHorizontally: 'Horizontally',
|
||||
textVertically: 'Vertically'
|
||||
|
||||
}, DE.Views.ImageSettingsAdvanced || {}));
|
||||
});
|
|
@ -1300,6 +1300,11 @@
|
|||
"DE.Views.ImageSettingsAdvanced.textWrapThroughTooltip": "Through",
|
||||
"DE.Views.ImageSettingsAdvanced.textWrapTightTooltip": "Tight",
|
||||
"DE.Views.ImageSettingsAdvanced.textWrapTopbottomTooltip": "Top and bottom",
|
||||
"DE.Views.ImageSettingsAdvanced.textRotation": "Rotation",
|
||||
"DE.Views.ImageSettingsAdvanced.textAngle": "Angle",
|
||||
"DE.Views.ImageSettingsAdvanced.textFlipped": "Flipped",
|
||||
"DE.Views.ImageSettingsAdvanced.textHorizontally": "Horizontally",
|
||||
"DE.Views.ImageSettingsAdvanced.textVertically": "Vertically",
|
||||
"DE.Views.LeftMenu.tipAbout": "About",
|
||||
"DE.Views.LeftMenu.tipChat": "Chat",
|
||||
"DE.Views.LeftMenu.tipComments": "Comments",
|
||||
|
|
Loading…
Reference in a new issue