[SSE] Fix context menu for slicer
This commit is contained in:
parent
95a6e48e16
commit
3584b6b7e4
|
@ -889,7 +889,7 @@ define([
|
||||||
handler : function(result, value) {
|
handler : function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_setGraphicObjectProps(value.imageProps);
|
me.api.asc_setGraphicObjectProps(value);
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('DocumentHolder', 'Apply slicer settings');
|
Common.component.Analytics.trackEvent('DocumentHolder', 'Apply slicer settings');
|
||||||
}
|
}
|
||||||
|
@ -1586,7 +1586,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
fillMenuProps: function(cellinfo, showMenu, event){
|
fillMenuProps: function(cellinfo, showMenu, event){
|
||||||
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly,
|
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, isslicermenu,
|
||||||
documentHolder = this.documentHolder,
|
documentHolder = this.documentHolder,
|
||||||
seltype = cellinfo.asc_getSelectionType(),
|
seltype = cellinfo.asc_getSelectionType(),
|
||||||
isCellLocked = cellinfo.asc_getLocked(),
|
isCellLocked = cellinfo.asc_getLocked(),
|
||||||
|
@ -1614,7 +1614,7 @@ define([
|
||||||
} else if (isimagemenu || isshapemenu || ischartmenu) {
|
} else if (isimagemenu || isshapemenu || ischartmenu) {
|
||||||
if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return;
|
if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return;
|
||||||
|
|
||||||
isimagemenu = isshapemenu = ischartmenu = false;
|
isimagemenu = isshapemenu = ischartmenu = isslicermenu = false;
|
||||||
documentHolder.mnuImgAdvanced.imageInfo = undefined;
|
documentHolder.mnuImgAdvanced.imageInfo = undefined;
|
||||||
|
|
||||||
var has_chartprops = false,
|
var has_chartprops = false,
|
||||||
|
@ -1638,9 +1638,11 @@ define([
|
||||||
documentHolder.mnuChartEdit.chartInfo = elValue;
|
documentHolder.mnuChartEdit.chartInfo = elValue;
|
||||||
ischartmenu = true;
|
ischartmenu = true;
|
||||||
has_chartprops = true;
|
has_chartprops = true;
|
||||||
|
} if ( elValue.asc_getSlicerProperties() ) {
|
||||||
|
documentHolder.mnuSlicerAdvanced.imageInfo = elValue;
|
||||||
|
isslicermenu = true;
|
||||||
} else {
|
} else {
|
||||||
documentHolder.mnuImgAdvanced.imageInfo = elValue;
|
documentHolder.mnuImgAdvanced.imageInfo = elValue;
|
||||||
documentHolder.mnuSlicerAdvanced.imageInfo = elValue;
|
|
||||||
isimagemenu = true;
|
isimagemenu = true;
|
||||||
}
|
}
|
||||||
if (this.permissions.isSignatureSupport)
|
if (this.permissions.isSignatureSupport)
|
||||||
|
@ -1669,7 +1671,7 @@ define([
|
||||||
if (documentHolder.mnuImgAdvanced.imageInfo)
|
if (documentHolder.mnuImgAdvanced.imageInfo)
|
||||||
documentHolder.menuImgOriginalSize.setDisabled(isObjLocked || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===null || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===undefined);
|
documentHolder.menuImgOriginalSize.setDisabled(isObjLocked || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===null || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===undefined);
|
||||||
|
|
||||||
documentHolder.mnuSlicerAdvanced.setVisible(documentHolder.mnuImgAdvanced.imageInfo &&documentHolder.mnuImgAdvanced.imageInfo.asc_getSlicerProperties());
|
documentHolder.mnuSlicerAdvanced.setVisible(isslicermenu);
|
||||||
documentHolder.mnuSlicerAdvanced.setDisabled(isObjLocked);
|
documentHolder.mnuSlicerAdvanced.setDisabled(isObjLocked);
|
||||||
|
|
||||||
var pluginGuid = (documentHolder.mnuImgAdvanced.imageInfo) ? documentHolder.mnuImgAdvanced.imageInfo.asc_getPluginGuid() : null;
|
var pluginGuid = (documentHolder.mnuImgAdvanced.imageInfo) ? documentHolder.mnuImgAdvanced.imageInfo.asc_getPluginGuid() : null;
|
||||||
|
@ -1678,7 +1680,7 @@ define([
|
||||||
documentHolder.menuImgReplace.menu.items[2].setVisible(this.permissions.canRequestInsertImage || this.permissions.fileChoiceUrl && this.permissions.fileChoiceUrl.indexOf("{documentType}")>-1);
|
documentHolder.menuImgReplace.menu.items[2].setVisible(this.permissions.canRequestInsertImage || this.permissions.fileChoiceUrl && this.permissions.fileChoiceUrl.indexOf("{documentType}")>-1);
|
||||||
documentHolder.menuImageArrange.setDisabled(isObjLocked);
|
documentHolder.menuImageArrange.setDisabled(isObjLocked);
|
||||||
|
|
||||||
documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined));
|
documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined) && !isslicermenu);
|
||||||
documentHolder.menuImgRotate.setDisabled(isObjLocked);
|
documentHolder.menuImgRotate.setDisabled(isObjLocked);
|
||||||
|
|
||||||
documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop());
|
documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop());
|
||||||
|
|
|
@ -1111,7 +1111,7 @@ define([
|
||||||
textCropFit: 'Fit',
|
textCropFit: 'Fit',
|
||||||
textListSettings: 'List Settings',
|
textListSettings: 'List Settings',
|
||||||
textFromStorage: 'From Storage',
|
textFromStorage: 'From Storage',
|
||||||
advancedSlicerText: 'Slicer Settings'
|
advancedSlicerText: 'Slicer Advanced Settings'
|
||||||
|
|
||||||
}, SSE.Views.DocumentHolder || {}));
|
}, SSE.Views.DocumentHolder || {}));
|
||||||
});
|
});
|
|
@ -421,7 +421,7 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
textTitle: 'Slicer Settings',
|
textTitle: 'Slicer - Advanced Settings',
|
||||||
textHeader: 'Header',
|
textHeader: 'Header',
|
||||||
strStyle: 'Style',
|
strStyle: 'Style',
|
||||||
strSize: 'Size',
|
strSize: 'Size',
|
||||||
|
|
Loading…
Reference in a new issue