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

add api config

parent 1e0de880
......@@ -18,7 +18,9 @@
<div id="editor_sdk">
<script type="text/javascript">
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();
</script>
</body>
......
......@@ -704,7 +704,9 @@ var ApplicationController = new(function(){
});
window["flat_desine"] = true;
api = new Asc.asc_docs_api("editor_sdk");
api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (api){
api.asc_registerCallback('asc_onError', onError);
......
......@@ -112,7 +112,9 @@ define([
// Initialize api
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){
switch (value) {
......
......@@ -58,7 +58,9 @@ Ext.define('DE.controller.Main', {
var api = this.api,
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.initEvents2MobileAdvances();
......
......@@ -712,7 +712,9 @@ var ApplicationController = new(function(){
}, 2000);
});
api = new Asc.asc_docs_api("editor_sdk");
api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk'
});
if (api){
api.SetThemesPath("../../../../sdkjs/slide/themes/");
......
......@@ -106,7 +106,9 @@ define([
// Initialize api
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){
this.api.SetDrawingFreeze(true);
......
......@@ -60,7 +60,9 @@ Ext.define('PE.controller.Main', {
app = this.getApplication(),
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.SetThemesPath("../../../../sdkjs/slide/themes/");
api.initEvents2MobileAdvances();
......
......@@ -688,7 +688,9 @@ var ApplicationController = new(function(){
}, 2000);
});
api = new Asc.spreadsheet_api("editor_sdk");
api = new Asc.spreadsheet_api({
'id-view': 'editor_sdk'
});
if (api){
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
......
......@@ -107,7 +107,10 @@ define([
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
// 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_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this));
......
......@@ -64,7 +64,9 @@ Ext.define('SSE.controller.Main', {
var app = this.getApplication();
// 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_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