Commit e1612fba authored by Alexander.Trofimov's avatar Alexander.Trofimov

add api config

parent 1e0de880
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
<div id="editor_sdk"> <div id="editor_sdk">
<script type="text/javascript"> <script type="text/javascript">
window['AscNotLoadAllScript'] = true; window['AscNotLoadAllScript'] = true;
var editor = new Asc.asc_docs_api("editor_sdk"); var editor = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
editor.LoadFontsFromServer(); editor.LoadFontsFromServer();
</script> </script>
</body> </body>
......
...@@ -704,7 +704,9 @@ var ApplicationController = new(function(){ ...@@ -704,7 +704,9 @@ var ApplicationController = new(function(){
}); });
window["flat_desine"] = true; window["flat_desine"] = true;
api = new Asc.asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (api){ if (api){
api.asc_registerCallback('asc_onError', onError); api.asc_registerCallback('asc_onError', onError);
......
...@@ -112,7 +112,9 @@ define([ ...@@ -112,7 +112,9 @@ define([
// Initialize api // Initialize api
window["flat_desine"] = true; window["flat_desine"] = true;
this.api = new Asc.asc_docs_api("editor_sdk"); this.api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (this.api){ if (this.api){
switch (value) { switch (value) {
......
...@@ -58,7 +58,9 @@ Ext.define('DE.controller.Main', { ...@@ -58,7 +58,9 @@ Ext.define('DE.controller.Main', {
var api = this.api, var api = this.api,
app = this.getApplication(); app = this.getApplication();
api = new Asc.asc_docs_api("id-sdkeditor"); api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
api.SetMobileVersion(true); api.SetMobileVersion(true);
api.initEvents2MobileAdvances(); api.initEvents2MobileAdvances();
......
...@@ -712,7 +712,9 @@ var ApplicationController = new(function(){ ...@@ -712,7 +712,9 @@ var ApplicationController = new(function(){
}, 2000); }, 2000);
}); });
api = new Asc.asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (api){ if (api){
api.SetThemesPath("../../../../sdkjs/slide/themes/"); api.SetThemesPath("../../../../sdkjs/slide/themes/");
......
...@@ -106,7 +106,9 @@ define([ ...@@ -106,7 +106,9 @@ define([
// Initialize api // Initialize api
window["flat_desine"] = true; window["flat_desine"] = true;
this.api = new Asc.asc_docs_api("editor_sdk"); this.api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (this.api){ if (this.api){
this.api.SetDrawingFreeze(true); this.api.SetDrawingFreeze(true);
......
...@@ -60,7 +60,9 @@ Ext.define('PE.controller.Main', { ...@@ -60,7 +60,9 @@ Ext.define('PE.controller.Main', {
app = this.getApplication(), app = this.getApplication(),
profile = app.getCurrentProfile(); profile = app.getCurrentProfile();
api = new Asc.asc_docs_api("id-sdkeditor"); api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
api.SetMobileVersion(true); api.SetMobileVersion(true);
api.SetThemesPath("../../../../sdkjs/slide/themes/"); api.SetThemesPath("../../../../sdkjs/slide/themes/");
api.initEvents2MobileAdvances(); api.initEvents2MobileAdvances();
......
...@@ -688,7 +688,9 @@ var ApplicationController = new(function(){ ...@@ -688,7 +688,9 @@ var ApplicationController = new(function(){
}, 2000); }, 2000);
}); });
api = new Asc.spreadsheet_api("editor_sdk"); api = new Asc.spreadsheet_api({
'id-view': 'editor_sdk'
});
if (api){ if (api){
api.asc_registerCallback('asc_onStartAction', onLongActionBegin); api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
......
...@@ -107,7 +107,10 @@ define([ ...@@ -107,7 +107,10 @@ define([
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3'; if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
// Initialize api // Initialize api
this.api = new Asc.spreadsheet_api("editor_sdk", "ce-cell-content"); this.api = new Asc.spreadsheet_api({
'id-view' : 'editor_sdk',
'id-input' : 'ce-cell-content'
});
this.api.asc_setFontRenderingMode(parseInt(value)); this.api.asc_setFontRenderingMode(parseInt(value));
this.api.asc_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this)); this.api.asc_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this));
......
...@@ -64,7 +64,9 @@ Ext.define('SSE.controller.Main', { ...@@ -64,7 +64,9 @@ Ext.define('SSE.controller.Main', {
var app = this.getApplication(); var app = this.getApplication();
// Initialize api // Initialize api
this.api = new Asc.spreadsheet_api("id-sdkeditor", "", SSE.controller.ApiEvents, {}, {}); this.api = new Asc.spreadsheet_api({
'id-view' : 'id-sdkeditor'
});
this.api.asc_setMobileVersion(true); this.api.asc_setMobileVersion(true);
this.api.asc_registerCallback('asc_onAdvancedOptions', Ext.bind(this.onAdvancedOptions, this)); this.api.asc_registerCallback('asc_onAdvancedOptions', Ext.bind(this.onAdvancedOptions, this));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment