Fix chart adding to document and presentaion editors

This commit is contained in:
Julia Radzhabova 2018-07-20 15:07:14 +03:00
parent f12c6f5c48
commit 68f097c5b2
2 changed files with 18 additions and 13 deletions

View file

@ -1691,7 +1691,7 @@ define([
onApiSheetChanged: function() { onApiSheetChanged: function() {
if (!this.toolbar.mode || !this.toolbar.mode.isEdit) return; if (!this.toolbar.mode || !this.toolbar.mode.isEdit || this.toolbar.mode.isEditDiagram || this.toolbar.mode.isEditMailMerge) return;
var currentSheet = this.api.asc_getActiveWorksheetIndex(), var currentSheet = this.api.asc_getActiveWorksheetIndex(),
props = this.api.asc_getPageOptions(currentSheet), props = this.api.asc_getPageOptions(currentSheet),

View file

@ -1538,6 +1538,7 @@ define([
}); });
if ( mode.isEdit ) { if ( mode.isEdit ) {
if (!mode.isEditDiagram && !mode.isEditMailMerge) {
var top = Common.localStorage.getItem("sse-pgmargins-top"), var top = Common.localStorage.getItem("sse-pgmargins-top"),
left = Common.localStorage.getItem("sse-pgmargins-left"), left = Common.localStorage.getItem("sse-pgmargins-left"),
bottom = Common.localStorage.getItem("sse-pgmargins-bottom"), bottom = Common.localStorage.getItem("sse-pgmargins-bottom"),
@ -1549,6 +1550,7 @@ define([
$(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options})); $(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options}));
} else } else
this.btnPageMargins.menu.items[0].setVisible(false); this.btnPageMargins.menu.items[0].setVisible(false);
}
me.setTab('home'); me.setTab('home');
} }
@ -1911,6 +1913,7 @@ define([
}); });
} }
if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram)
this.updateMetricUnit(); this.updateMetricUnit();
}, },
@ -2131,6 +2134,8 @@ define([
}, },
onAppReady: function (config) { onAppReady: function (config) {
if (!this.mode.isEdit || this.mode.isEditMailMerge || this.mode.isEditDiagram) return;
var me = this; var me = this;
var _holder_view = SSE.getController('DocumentHolder').getView('DocumentHolder'); var _holder_view = SSE.getController('DocumentHolder').getView('DocumentHolder');
me.btnImgForward.updateHint(me.tipSendForward); me.btnImgForward.updateHint(me.tipSendForward);