diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 47e8418a74..c7dda5e2e1 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -362,6 +362,8 @@ define([ this.api.asc_registerCallback('asc_onVerticalTextAlign', _.bind(this.onApiVerticalTextAlign, this)); this.api.asc_registerCallback('asc_onTextColor', _.bind(this.onApiTextColor, this)); this.api.asc_registerCallback('asc_onTextHighLight', _.bind(this.onApiTextHighlightColor, this)); + // this.api.asc_registerCallback('asc_onCanGroup', _.bind(this.onApiCanGroup, this)); + // this.api.asc_registerCallback('asc_onCanUnGroup', _.bind(this.onApiCanUnGroup, this)); }, setApi: function(api) { @@ -1535,6 +1537,20 @@ define([ } }, + onApiCanGroup: function(value) { + if (this._state.can_group!==value) { + this.toolbar.mnuGroupShapes.setDisabled(!value); + if (this._state.activated) this._state.can_group = value; + } + }, + + onApiCanUnGroup: function(value) { + if (this._state.can_ungroup!==value) { + this.toolbar.mnuUnGroupShapes.setDisabled(!value); + if (this._state.activated) this._state.can_ungroup = value; + } + }, + onIncrease: function(e) { if (this.api) this.api.FontSizeIn(); diff --git a/apps/pdfeditor/main/app/view/DocumentHolder.js b/apps/pdfeditor/main/app/view/DocumentHolder.js index fcda231c10..8bccefd3b4 100644 --- a/apps/pdfeditor/main/app/view/DocumentHolder.js +++ b/apps/pdfeditor/main/app/view/DocumentHolder.js @@ -574,9 +574,9 @@ define([ me.mnuArrangeBack, me.mnuArrangeForward, me.mnuArrangeBackward, - {caption: '--'}, - me.mnuGroupImg, - me.mnuUnGroupImg + // {caption: '--'}, + // me.mnuGroupImg, + // me.mnuUnGroupImg ] }) }); diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 92659a3a86..f6952de866 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -707,17 +707,17 @@ define([ iconCls: 'menu__icon btn-arrange-backward', value: 4 }), - {caption: '--'}, - this.mnuGroupShapes = new Common.UI.MenuItem({ - caption: this.txtGroup, - iconCls: 'menu__icon btn-shape-group', - value: 5 - }), - this.mnuUnGroupShapes = new Common.UI.MenuItem({ - caption: this.txtUngroup, - iconCls: 'menu__icon btn-shape-ungroup', - value: 6 - }) + // {caption: '--'}, + // this.mnuGroupShapes = new Common.UI.MenuItem({ + // caption: this.txtGroup, + // iconCls: 'menu__icon btn-shape-group', + // value: 5 + // }), + // this.mnuUnGroupShapes = new Common.UI.MenuItem({ + // caption: this.txtUngroup, + // iconCls: 'menu__icon btn-shape-ungroup', + // value: 6 + // }) ] }), dataHint: '1',