[PE] Edit ole objects
This commit is contained in:
parent
fab188cb23
commit
7a282063ef
|
@ -161,6 +161,7 @@ require([
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
,'Common.Controllers.Plugins'
|
,'Common.Controllers.Plugins'
|
||||||
,'Common.Controllers.ExternalDiagramEditor'
|
,'Common.Controllers.ExternalDiagramEditor'
|
||||||
|
,'Common.Controllers.ExternalOleEditor'
|
||||||
,'Common.Controllers.ReviewChanges'
|
,'Common.Controllers.ReviewChanges'
|
||||||
,'Common.Controllers.Protection'
|
,'Common.Controllers.Protection'
|
||||||
,'Transitions'
|
,'Transitions'
|
||||||
|
@ -197,6 +198,7 @@ require([
|
||||||
'common/main/lib/controller/Plugins',
|
'common/main/lib/controller/Plugins',
|
||||||
'presentationeditor/main/app/view/ChartSettings',
|
'presentationeditor/main/app/view/ChartSettings',
|
||||||
'common/main/lib/controller/ExternalDiagramEditor'
|
'common/main/lib/controller/ExternalDiagramEditor'
|
||||||
|
,'common/main/lib/controller/ExternalOleEditor'
|
||||||
,'common/main/lib/controller/ReviewChanges'
|
,'common/main/lib/controller/ReviewChanges'
|
||||||
,'common/main/lib/controller/Protection'
|
,'common/main/lib/controller/Protection'
|
||||||
,'common/main/lib/controller/Themes'
|
,'common/main/lib/controller/Themes'
|
||||||
|
|
|
@ -126,6 +126,27 @@ define([
|
||||||
}, 10);
|
}, 10);
|
||||||
}, this));
|
}, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var oleEditor = this.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor');
|
||||||
|
if (oleEditor) {
|
||||||
|
oleEditor.on('internalmessage', _.bind(function(cmp, message) {
|
||||||
|
var command = message.data.command;
|
||||||
|
var data = message.data.data;
|
||||||
|
if (this.api) {
|
||||||
|
if (oleEditor.isEditMode())
|
||||||
|
this.api.asc_editTableOleObject(data);
|
||||||
|
}
|
||||||
|
}, this));
|
||||||
|
oleEditor.on('hide', _.bind(function(cmp, message) {
|
||||||
|
if (this.api) {
|
||||||
|
this.api.asc_enableKeyEvents(true);
|
||||||
|
}
|
||||||
|
var me = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
me.documentHolder.fireEvent('editcomplete', me.documentHolder);
|
||||||
|
}, 10);
|
||||||
|
}, this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -851,6 +851,7 @@ define([
|
||||||
|
|
||||||
chatController.setApi(this.api).setMode(this.appOptions);
|
chatController.setApi(this.api).setMode(this.appOptions);
|
||||||
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
||||||
|
application.getController('Common.Controllers.ExternalOleEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
||||||
|
|
||||||
pluginsController.setApi(me.api);
|
pluginsController.setApi(me.api);
|
||||||
|
|
||||||
|
|
|
@ -1622,6 +1622,7 @@ define([
|
||||||
if (me.mode.isEdit===true) {
|
if (me.mode.isEdit===true) {
|
||||||
me.api.asc_registerCallback('asc_onDialogAddHyperlink', _.bind(onDialogAddHyperlink, me));
|
me.api.asc_registerCallback('asc_onDialogAddHyperlink', _.bind(onDialogAddHyperlink, me));
|
||||||
me.api.asc_registerCallback('asc_doubleClickOnChart', _.bind(me.editChartClick, me));
|
me.api.asc_registerCallback('asc_doubleClickOnChart', _.bind(me.editChartClick, me));
|
||||||
|
me.api.asc_registerCallback('asc_doubleClickOnTableOleObject', _.bind(me.onDoubleClickOnTableOleObject, me));
|
||||||
me.api.asc_registerCallback('asc_onSpellCheckVariantsFound', _.bind(onSpellCheckVariantsFound, me));
|
me.api.asc_registerCallback('asc_onSpellCheckVariantsFound', _.bind(onSpellCheckVariantsFound, me));
|
||||||
me.api.asc_registerCallback('asc_onShowSpecialPasteOptions', _.bind(onShowSpecialPasteOptions, me));
|
me.api.asc_registerCallback('asc_onShowSpecialPasteOptions', _.bind(onShowSpecialPasteOptions, me));
|
||||||
me.api.asc_registerCallback('asc_onHideSpecialPasteOptions', _.bind(onHideSpecialPasteOptions, me));
|
me.api.asc_registerCallback('asc_onHideSpecialPasteOptions', _.bind(onHideSpecialPasteOptions, me));
|
||||||
|
@ -1762,6 +1763,17 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDoubleClickOnTableOleObject: function(chart) {
|
||||||
|
if (this.mode.isEdit && !this._isDisabled) {
|
||||||
|
var oleEditor = PE.getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor');
|
||||||
|
if (oleEditor && chart) {
|
||||||
|
oleEditor.setEditMode(true);
|
||||||
|
oleEditor.show();
|
||||||
|
oleEditor.setOleData(Asc.asc_putBinaryDataToFrameFromTableOleObject(chart));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onCutCopyPaste: function(item, e) {
|
onCutCopyPaste: function(item, e) {
|
||||||
var me = this;
|
var me = this;
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
|
|
|
@ -152,6 +152,7 @@ require([
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
,'Common.Controllers.Plugins'
|
,'Common.Controllers.Plugins'
|
||||||
,'Common.Controllers.ExternalDiagramEditor'
|
,'Common.Controllers.ExternalDiagramEditor'
|
||||||
|
,'Common.Controllers.ExternalOleEditor'
|
||||||
,'Common.Controllers.ReviewChanges'
|
,'Common.Controllers.ReviewChanges'
|
||||||
,'Common.Controllers.Protection'
|
,'Common.Controllers.Protection'
|
||||||
,'Transitions'
|
,'Transitions'
|
||||||
|
@ -188,6 +189,7 @@ require([
|
||||||
'common/main/lib/controller/Plugins',
|
'common/main/lib/controller/Plugins',
|
||||||
'presentationeditor/main/app/view/ChartSettings',
|
'presentationeditor/main/app/view/ChartSettings',
|
||||||
'common/main/lib/controller/ExternalDiagramEditor'
|
'common/main/lib/controller/ExternalDiagramEditor'
|
||||||
|
,'common/main/lib/controller/ExternalOleEditor'
|
||||||
,'common/main/lib/controller/ReviewChanges'
|
,'common/main/lib/controller/ReviewChanges'
|
||||||
,'common/main/lib/controller/Protection'
|
,'common/main/lib/controller/Protection'
|
||||||
,'common/main/lib/controller/Themes'
|
,'common/main/lib/controller/Themes'
|
||||||
|
|
Loading…
Reference in a new issue