diff --git a/apps/documenteditor/main/app/template/ShapeSettings.template b/apps/documenteditor/main/app/template/ShapeSettings.template
index e0346dc1e..4a4ff30d1 100644
--- a/apps/documenteditor/main/app/template/ShapeSettings.template
+++ b/apps/documenteditor/main/app/template/ShapeSettings.template
@@ -134,18 +134,18 @@
|
-
+
|
-
+
|
-
+
|
diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js
index c0705edff..21209e718 100644
--- a/apps/documenteditor/main/app/view/DocumentHolder.js
+++ b/apps/documenteditor/main/app/view/DocumentHolder.js
@@ -137,6 +137,8 @@ define([
if (shapeprops) {
if (shapeprops.get_FromChart())
menu_props.imgProps.isChart = true;
+ else if (shapeprops.get_FromImage())
+ menu_props.imgProps.isOnlyImg = true;
else
menu_props.imgProps.isShape = true;
} else if ( chartprops )
@@ -2266,8 +2268,7 @@ define([
menuChartEdit.setVisible(!_.isNull(value.imgProps.value.get_ChartProperties()) && !onlyCommonProps);
- me.menuOriginalSize.setVisible(_.isNull(value.imgProps.value.get_ChartProperties()) && _.isNull(value.imgProps.value.get_ShapeProperties()) &&
- !onlyCommonProps);
+ me.menuOriginalSize.setVisible(value.imgProps.isOnlyImg);
me.pictureMenu.items[10].setVisible(menuChartEdit.isVisible() || me.menuOriginalSize.isVisible());
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js
index 7828424e5..03dc30873 100644
--- a/apps/documenteditor/main/app/view/ShapeSettings.js
+++ b/apps/documenteditor/main/app/view/ShapeSettings.js
@@ -755,11 +755,17 @@ define([
this._noApply = true;
this.disableControls(this._locked, !shapeprops.get_CanFill());
- this.hideShapeOnlySettings(shapeprops.get_FromChart());
- this.hideChangeTypeSettings(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
- || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
- || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
- || shapetype=='straightConnector1');
+ this.hideShapeOnlySettings(shapeprops.get_FromChart() || shapeprops.get_FromImage());
+
+ var hidechangetype = shapeprops.get_FromChart() || shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
+ || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
+ || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
+ || shapetype=='straightConnector1';
+ this.hideChangeTypeSettings(hidechangetype);
+ if (!hidechangetype) {
+ this.btnChangeShape.menu.items[0].setVisible(shapeprops.get_FromImage());
+ this.btnChangeShape.menu.items[1].setVisible(!shapeprops.get_FromImage());
+ }
var value = props.get_WrappingStyle();
if (this._state.WrappingStyle!==value) {
@@ -1522,22 +1528,27 @@ define([
shapesStore = this.application.getCollection('ShapeGroups');
var count = shapesStore.length;
- for (var i=0; i0; i++) {
+ var shapeGroup = shapesStore.at(i>-1 ? i : i+1);
var menuItem = new Common.UI.MenuItem({
caption: shapeGroup.get('groupName'),
menu: new Common.UI.Menu({
menuAlign: 'tr-tl',
items: [
- { template: _.template('') }
+ { template: _.template('') }
]
})
});
me.btnChangeShape.menu.addItem(menuItem);
+ var store = shapeGroup.get('groupStore');
+ if (i<0) {
+ store = store.clone();
+ store.shift();
+ }
var shapePicker = new Common.UI.DataView({
- el: $('#id-shape-menu-shapegroup' + i),
- store: shapeGroup.get('groupStore'),
+ el: $('#id-shape-menu-shapegroup' + (i+1)),
+ store: store,
parentMenu: menuItem.menu,
showLast: false,
itemTemplate: _.template('')
diff --git a/apps/presentationeditor/main/app/template/ShapeSettings.template b/apps/presentationeditor/main/app/template/ShapeSettings.template
index 13fc671a5..f86e7770a 100644
--- a/apps/presentationeditor/main/app/template/ShapeSettings.template
+++ b/apps/presentationeditor/main/app/template/ShapeSettings.template
@@ -97,7 +97,7 @@
-
+ |
@@ -116,21 +116,18 @@
|
-
- |
-
-
+
|
-
+
|
-
+
|
diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js
index 8ce3c5fda..5e866fe82 100644
--- a/apps/presentationeditor/main/app/view/DocumentHolder.js
+++ b/apps/presentationeditor/main/app/view/DocumentHolder.js
@@ -3101,12 +3101,12 @@ define([
disabled = imgdisabled || shapedisabled || chartdisabled || (value.slideProps!==undefined && value.slideProps.locked);
// image properties
- menuImgOriginalSize.setVisible(_.isUndefined(value.shapeProps) && _.isUndefined(value.chartProps));
+ menuImgOriginalSize.setVisible((_.isUndefined(value.shapeProps) || value.shapeProps.value.get_FromImage()) && _.isUndefined(value.chartProps));
if (menuImgOriginalSize.isVisible())
menuImgOriginalSize.setDisabled(disabled || _.isNull(value.imgProps.value.get_ImageUrl()) || _.isUndefined(value.imgProps.value.get_ImageUrl()));
- menuImageAdvanced.setVisible(_.isUndefined(value.shapeProps) && _.isUndefined(value.chartProps));
+ menuImageAdvanced.setVisible((_.isUndefined(value.shapeProps) || value.shapeProps.value.get_FromImage()) && _.isUndefined(value.chartProps));
menuShapeAdvanced.setVisible(_.isUndefined(value.imgProps) && _.isUndefined(value.chartProps));
menuChartEdit.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart));
menuImgShapeSeparator.setVisible(menuImageAdvanced.isVisible() || menuShapeAdvanced.isVisible() || menuChartEdit.isVisible());
diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js
index 3d96ff791..3a20fbd5f 100644
--- a/apps/presentationeditor/main/app/view/ShapeSettings.js
+++ b/apps/presentationeditor/main/app/view/ShapeSettings.js
@@ -687,11 +687,17 @@ define([
var shapetype = props.asc_getType();
this.disableControls(this._locked==true, props.get_CanFill() !== true);
- this.hideShapeOnlySettings(props.get_FromChart());
- this.hideChangeTypeSettings(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
- || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
- || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
- || shapetype=='straightConnector1');
+ this.hideShapeOnlySettings(props.get_FromChart() || props.get_FromImage());
+
+ var hidechangetype = props.get_FromChart() || shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
+ || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
+ || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
+ || shapetype=='straightConnector1';
+ this.hideChangeTypeSettings(hidechangetype);
+ if (!hidechangetype) {
+ this.btnChangeShape.menu.items[0].setVisible(props.get_FromImage());
+ this.btnChangeShape.menu.items[1].setVisible(!props.get_FromImage());
+ }
// background colors
var rec = null;
@@ -1395,22 +1401,27 @@ define([
shapesStore = this.application.getCollection('ShapeGroups');
var count = shapesStore.length;
- for (var i=0; i0; i++) {
+ var shapeGroup = shapesStore.at(i>-1 ? i : i+1);
var menuItem = new Common.UI.MenuItem({
caption: shapeGroup.get('groupName'),
menu: new Common.UI.Menu({
menuAlign: 'tr-tl',
items: [
- { template: _.template('') }
+ { template: _.template('') }
]
})
});
me.btnChangeShape.menu.addItem(menuItem);
+ var store = shapeGroup.get('groupStore');
+ if (i<0) {
+ store = store.clone();
+ store.shift();
+ }
var shapePicker = new Common.UI.DataView({
- el: $('#id-shape-menu-shapegroup' + i),
- store: shapeGroup.get('groupStore'),
+ el: $('#id-shape-menu-shapegroup' + (i+1)),
+ store: store,
parentMenu: menuItem.menu,
showLast: false,
itemTemplate: _.template('')
diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
index c7d2fed2f..807cd029b 100644
--- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
@@ -1249,7 +1249,7 @@ define([
},
fillMenuProps: function(cellinfo, showMenu, event){
- var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu,
+ var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly,
documentHolder = this.documentHolder,
seltype = cellinfo.asc_getFlags().asc_getSelectionType(),
isCellLocked = cellinfo.asc_getLocked(),
@@ -1285,6 +1285,8 @@ define([
if (shapeprops) {
if (shapeprops.asc_getFromChart())
ischartmenu = true;
+ else if (shapeprops.asc_getFromImage())
+ isimageonly = true;
else {
documentHolder.mnuShapeAdvanced.shapeInfo = elValue;
isshapemenu = true;
@@ -1310,7 +1312,7 @@ define([
documentHolder.mnuChartEdit.setDisabled(isObjLocked);
documentHolder.pmiImgCut.setDisabled(isObjLocked);
documentHolder.pmiImgPaste.setDisabled(isObjLocked);
- documentHolder.mnuImgAdvanced.setVisible(isimagemenu && !isshapemenu && !ischartmenu);
+ documentHolder.mnuImgAdvanced.setVisible(isimagemenu && (!isshapemenu || isimageonly) && !ischartmenu);
documentHolder.mnuImgAdvanced.setDisabled(isObjLocked);
var isInSign = !!signGuid;
diff --git a/apps/spreadsheeteditor/main/app/template/ShapeSettings.template b/apps/spreadsheeteditor/main/app/template/ShapeSettings.template
index 13fc671a5..f86e7770a 100644
--- a/apps/spreadsheeteditor/main/app/template/ShapeSettings.template
+++ b/apps/spreadsheeteditor/main/app/template/ShapeSettings.template
@@ -97,7 +97,7 @@
-
+ |
@@ -116,21 +116,18 @@
|
-
- |
-
-
+
|
-
+
|
-
+
|
diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js
index ed33ce59f..996ae431a 100644
--- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js
+++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js
@@ -711,11 +711,17 @@ define([
this._noApply = true;
this.disableControls(this._locked, !shapeprops.asc_getCanFill());
- this.hideShapeOnlySettings(shapeprops.asc_getFromChart());
- this.hideChangeTypeSettings(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
- || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
- || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
- || shapetype=='straightConnector1');
+ this.hideShapeOnlySettings(shapeprops.asc_getFromChart() || shapeprops.asc_getFromImage());
+
+ var hidechangetype = shapeprops.get_FromChart() || shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
+ || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
+ || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
+ || shapetype=='straightConnector1';
+ this.hideChangeTypeSettings(hidechangetype);
+ if (!hidechangetype) {
+ this.btnChangeShape.menu.items[0].setVisible(shapeprops.get_FromImage());
+ this.btnChangeShape.menu.items[1].setVisible(!shapeprops.get_FromImage());
+ }
// background colors
var rec = null;
@@ -1420,22 +1426,27 @@ define([
shapesStore = this.application.getCollection('ShapeGroups');
var count = shapesStore.length;
- for (var i=0; i0; i++) {
+ var shapeGroup = shapesStore.at(i>-1 ? i : i+1);
var menuItem = new Common.UI.MenuItem({
caption: shapeGroup.get('groupName'),
menu: new Common.UI.Menu({
menuAlign: 'tr-tl',
items: [
- { template: _.template('') }
+ { template: _.template('') }
]
})
});
me.btnChangeShape.menu.addItem(menuItem);
+ var store = shapeGroup.get('groupStore');
+ if (i<0) {
+ store = store.clone();
+ store.shift();
+ }
var shapePicker = new Common.UI.DataView({
- el: $('#id-shape-menu-shapegroup' + i),
- store: shapeGroup.get('groupStore'),
+ el: $('#id-shape-menu-shapegroup' + (i+1)),
+ store: store,
parentMenu: menuItem.menu,
showLast: false,
itemTemplate: _.template('')