add api config

This commit is contained in:
Alexander.Trofimov 2016-05-13 11:37:54 +03:00
parent 1e0de8800f
commit e1612fbaf6
10 changed files with 31 additions and 10 deletions

View file

@ -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>

View file

@ -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);

View file

@ -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) {

View file

@ -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();

View file

@ -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/");

View file

@ -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);

View file

@ -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();

View file

@ -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);

View file

@ -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));

View file

@ -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));