Send data between external editors and general editor
This commit is contained in:
parent
189bca3111
commit
7090bd8ed6
|
@ -142,6 +142,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onCloseChartEditor', _.bind(this.onDiagrammEditingDisabled, this));
|
||||
this.api.asc_registerCallback('asc_sendFromGeneralToFrameEditor', _.bind(this.onSendFromGeneralToFrameEditor, this));
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -232,6 +233,9 @@ define([
|
|||
y = parseInt(this.diagramEditorView.$window.css('top')) + eventData.data.pagey + 34;
|
||||
this.diagramEditorView.binding.drag({pageX:x, pageY:y});
|
||||
}
|
||||
} else
|
||||
if (eventData.type == "frameToGeneralData") {
|
||||
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);
|
||||
} else
|
||||
this.diagramEditorView.fireEvent('internalmessage', this.diagramEditorView, eventData);
|
||||
}
|
||||
|
@ -243,6 +247,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onSendFromGeneralToFrameEditor: function(data) {
|
||||
externalEditor && externalEditor.serviceCommand('generalToFrameData', data);
|
||||
},
|
||||
|
||||
warningTitle: 'Warning',
|
||||
warningText: 'The object is disabled because of editing by another user.',
|
||||
textClose: 'Close',
|
||||
|
|
|
@ -134,6 +134,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onCloseMergeEditor', _.bind(this.onMergeEditingDisabled, this));
|
||||
this.api.asc_registerCallback('asc_sendFromGeneralToFrameEditor', _.bind(this.onSendFromGeneralToFrameEditor, this));
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -216,6 +217,9 @@ define([
|
|||
y = parseInt(this.mergeEditorView.$window.css('top')) + eventData.data.pagey + 34;
|
||||
this.mergeEditorView.binding.drag({pageX:x, pageY:y});
|
||||
}
|
||||
} else
|
||||
if (eventData.type == "frameToGeneralData") {
|
||||
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);
|
||||
} else
|
||||
this.mergeEditorView.fireEvent('internalmessage', this.mergeEditorView, eventData);
|
||||
}
|
||||
|
@ -227,6 +231,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onSendFromGeneralToFrameEditor: function(data) {
|
||||
externalEditor && externalEditor.serviceCommand('generalToFrameData', data);
|
||||
},
|
||||
|
||||
warningTitle: 'Warning',
|
||||
warningText: 'The object is disabled because of editing by another user.',
|
||||
textClose: 'Close',
|
||||
|
|
|
@ -142,6 +142,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onCloseOleEditor', _.bind(this.onOleEditingDisabled, this));
|
||||
this.api.asc_registerCallback('asc_sendFromGeneralToFrameEditor', _.bind(this.onSendFromGeneralToFrameEditor, this));
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -233,6 +234,9 @@ define([
|
|||
y = parseInt(this.oleEditorView.$window.css('top')) + eventData.data.pagey + 34;
|
||||
this.oleEditorView.binding.drag({pageX:x, pageY:y});
|
||||
}
|
||||
} else
|
||||
if (eventData.type == "frameToGeneralData") {
|
||||
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);
|
||||
} else
|
||||
this.oleEditorView.fireEvent('internalmessage', this.oleEditorView, eventData);
|
||||
}
|
||||
|
@ -244,6 +248,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onSendFromGeneralToFrameEditor: function(data) {
|
||||
externalEditor && externalEditor.serviceCommand('generalToFrameData', data);
|
||||
},
|
||||
|
||||
warningTitle: 'Warning',
|
||||
warningText: 'The object is disabled because of editing by another user.',
|
||||
textClose: 'Close',
|
||||
|
|
|
@ -1434,8 +1434,11 @@ define([
|
|||
|
||||
var printController = app.getController('Print');
|
||||
printController && this.api && printController.setApi(this.api).setMode(this.appOptions);
|
||||
} else if (this.appOptions.isEditOle)
|
||||
} else {
|
||||
this.api.asc_registerCallback('asc_sendFromFrameToGeneralEditor', _.bind(this.onSendFromFrameToGeneralEditor, this));
|
||||
if (this.appOptions.isEditOle)
|
||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||
}
|
||||
|
||||
var celleditorController = this.getApplication().getController('CellEditor');
|
||||
celleditorController && celleditorController.setApi(this.api).setMode(this.appOptions);
|
||||
|
@ -2598,6 +2601,9 @@ define([
|
|||
document.documentElement.className.replace(/theme-\w+\s?/, data.data);
|
||||
this.api.asc_setSkin(data.data == "theme-dark" ? 'flatDark' : "flat");
|
||||
break;
|
||||
case 'generalToFrameData':
|
||||
this.api.asc_getInformationBetweenFrameAndGeneralEditor(data.data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2678,6 +2684,12 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onSendFromFrameToGeneralEditor: function(data) {
|
||||
Common.Gateway.internalMessage('frameToGeneralData', {
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
unitsChanged: function(m) {
|
||||
var value = Common.localStorage.getItem("sse-settings-unit");
|
||||
value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric();
|
||||
|
|
Loading…
Reference in a new issue