Merge pull request #1658 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-03-28 17:33:05 +03:00 committed by GitHub
commit c4e2c87505
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 32 additions and 14 deletions

View file

@ -2767,9 +2767,11 @@ define([
menuImgReplace.menu.items[2].setVisible(me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1);
menuImgRotate.setVisible(!value.imgProps.isChart && (pluginGuid===null || pluginGuid===undefined));
if (menuImgRotate.isVisible())
if (menuImgRotate.isVisible()) {
menuImgRotate.setDisabled(islocked || value.imgProps.isSmartArt);
menuImgRotate.menu.items[3].setDisabled(value.imgProps.isSmartArtInternal);
menuImgRotate.menu.items[4].setDisabled(value.imgProps.isSmartArtInternal);
}
me.menuImgCrop.setVisible(me.api.asc_canEditCrop());
if (me.menuImgCrop.isVisible())
me.menuImgCrop.setDisabled(islocked);

View file

@ -1561,6 +1561,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}
if (props.get_FromSmartArtInternal()) {
this.chAutofit.setDisabled(true);
this.chFlipHor.setDisabled(true);
this.chFlipVert.setDisabled(true);
}
var stroke = props.get_stroke();

View file

@ -822,6 +822,8 @@ define([
this._originalProps = new Asc.asc_CImgProperty(props);
this._noApply = true;
this._state.isFromImage = !!shapeprops.get_FromImage();
this._state.isFromSmartArtInternal = !!shapeprops.get_FromSmartArtInternal();
this.disableControls(this._locked, !shapeprops.get_CanFill());
this.hideShapeOnlySettings(shapeprops.get_FromChart() || !!shapeprops.get_FromImage());
@ -832,10 +834,8 @@ define([
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|| shapetype=='straightConnector1';
this.hideChangeTypeSettings(hidechangetype || control_props);
this._state.isFromImage = !!shapeprops.get_FromImage();
this._state.isFromSmartArtInternal = !!shapeprops.get_FromSmartArtInternal();
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || shapeprops.get_FromSmartArtInternal());
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || this._state.isFromSmartArtInternal);
}
var value = props.get_WrappingStyle();
@ -1986,6 +1986,8 @@ define([
});
this.linkAdvanced.toggleClass('disabled', disable);
}
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
},
hideShapeOnlySettings: function(value) {

View file

@ -291,7 +291,6 @@ define([
dataHintOffset: '0, -16'
});
this.paragraphControls.push(this.btnHighlightColor);
this.textOnlyControls.push(this.btnHighlightColor);
this.btnFontColor = new Common.UI.ButtonColored({
id: 'id-toolbar-btn-fontcolor',

View file

@ -3579,8 +3579,11 @@ define([
mnuArrangeBackward.setDisabled(inSmartartInternal);
menuImgShapeRotate.setVisible(_.isUndefined(value.chartProps) && (pluginGuid===null || pluginGuid===undefined));
if (menuImgShapeRotate.isVisible())
if (menuImgShapeRotate.isVisible()) {
menuImgShapeRotate.setDisabled(disabled || (value.shapeProps && value.shapeProps.value.get_FromSmartArt()));
menuImgShapeRotate.menu.items[3].setDisabled(inSmartartInternal);
menuImgShapeRotate.menu.items[4].setDisabled(inSmartartInternal);
}
// image properties
menuImgOriginalSize.setVisible(isimage);

View file

@ -766,6 +766,8 @@ define([
{
this._originalProps = props;
this._noApply = true;
this._state.isFromImage = !!props.get_FromImage();
this._state.isFromSmartArtInternal = !!props.get_FromSmartArtInternal();
var shapetype = props.asc_getType();
@ -778,10 +780,8 @@ define([
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|| shapetype=='straightConnector1';
this.hideChangeTypeSettings(hidechangetype);
this._state.isFromImage = !!props.get_FromImage();
this._state.isFromSmartArtInternal = !!props.get_FromSmartArtInternal();
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
this.btnChangeShape.shapePicker.hideTextRect(props.get_FromImage() || props.get_FromSmartArtInternal());
this.btnChangeShape.shapePicker.hideTextRect(props.get_FromImage() || this._state.isFromSmartArtInternal);
}
// background colors
@ -1849,6 +1849,8 @@ define([
});
this.linkAdvanced.toggleClass('disabled', disable);
}
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
},
hideShapeOnlySettings: function(value) {

View file

@ -576,6 +576,8 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.radioNofit.setDisabled(true);
this.radioShrink.setDisabled(true);
this.radioFit.setDisabled(true);
this.chFlipHor.setDisabled(true);
this.chFlipVert.setDisabled(true);
}
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Width()).toFixed(2), true);

View file

@ -402,7 +402,7 @@ define([
enableToggle: true,
allowDepress: true,
split: true,
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock, _set.inSmartart, _set.inSmartartInternal],
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
menu: new Common.UI.Menu({
style: 'min-width: 100px;',
items: [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -1937,6 +1937,8 @@ define([
documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined) && !isslicermenu);
documentHolder.menuImgRotate.setDisabled(isObjLocked || isSmartArt);
documentHolder.menuImgRotate.menu.items[3].setDisabled(isSmartArtInternal);
documentHolder.menuImgRotate.menu.items[4].setDisabled(isSmartArtInternal);
documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop());
documentHolder.menuImgCrop.setDisabled(isObjLocked);

View file

@ -764,6 +764,8 @@ define([
this._originalProps = shapeprops;
this._noApply = true;
this._state.isFromImage = !!shapeprops.get_FromImage();
this._state.isFromSmartArtInternal = !!shapeprops.asc_getFromSmartArtInternal();
this.disableControls(this._locked, !shapeprops.asc_getCanFill());
this.hideShapeOnlySettings(shapeprops.asc_getFromChart() || !!shapeprops.asc_getFromImage());
@ -774,10 +776,8 @@ define([
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|| shapetype=='straightConnector1';
this.hideChangeTypeSettings(hidechangetype);
this._state.isFromImage = !!shapeprops.get_FromImage();
this._state.isFromSmartArtInternal = !!shapeprops.asc_getFromSmartArtInternal();
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || shapeprops.asc_getFromSmartArtInternal());
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || this._state.isFromSmartArtInternal);
}
// background colors
@ -1868,6 +1868,8 @@ define([
});
this.linkAdvanced.toggleClass('disabled', disable);
}
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
},
hideShapeOnlySettings: function(value) {

View file

@ -635,6 +635,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
if (shapeprops.asc_getFromSmartArtInternal()) {
this.chAutofit.setDisabled(true);
this.chOverflow.setDisabled(true);
this.chFlipHor.setDisabled(true);
this.chFlipVert.setDisabled(true);
}
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB