Fix chart adding to document and presentaion editors
This commit is contained in:
parent
f12c6f5c48
commit
68f097c5b2
|
@ -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),
|
||||||
|
|
|
@ -1538,17 +1538,19 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( mode.isEdit ) {
|
if ( mode.isEdit ) {
|
||||||
var top = Common.localStorage.getItem("sse-pgmargins-top"),
|
if (!mode.isEditDiagram && !mode.isEditMailMerge) {
|
||||||
left = Common.localStorage.getItem("sse-pgmargins-left"),
|
var top = Common.localStorage.getItem("sse-pgmargins-top"),
|
||||||
bottom = Common.localStorage.getItem("sse-pgmargins-bottom"),
|
left = Common.localStorage.getItem("sse-pgmargins-left"),
|
||||||
right = Common.localStorage.getItem("sse-pgmargins-right");
|
bottom = Common.localStorage.getItem("sse-pgmargins-bottom"),
|
||||||
if ( top!==null && left!==null && bottom!==null && right!==null ) {
|
right = Common.localStorage.getItem("sse-pgmargins-right");
|
||||||
var mnu = this.btnPageMargins.menu.items[0];
|
if ( top!==null && left!==null && bottom!==null && right!==null ) {
|
||||||
mnu.options.value = mnu.value = [parseFloat(top), parseFloat(left), parseFloat(bottom), parseFloat(right)];
|
var mnu = this.btnPageMargins.menu.items[0];
|
||||||
mnu.setVisible(true);
|
mnu.options.value = mnu.value = [parseFloat(top), parseFloat(left), parseFloat(bottom), parseFloat(right)];
|
||||||
$(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options}));
|
mnu.setVisible(true);
|
||||||
} else
|
$(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options}));
|
||||||
this.btnPageMargins.menu.items[0].setVisible(false);
|
} else
|
||||||
|
this.btnPageMargins.menu.items[0].setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
me.setTab('home');
|
me.setTab('home');
|
||||||
}
|
}
|
||||||
|
@ -1911,7 +1913,8 @@ define([
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateMetricUnit();
|
if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram)
|
||||||
|
this.updateMetricUnit();
|
||||||
},
|
},
|
||||||
|
|
||||||
onToolbarAfterRender: function(toolbar) {
|
onToolbarAfterRender: function(toolbar) {
|
||||||
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue