Commit ec9c8c77 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

для offline работы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64522 954022d7-b5bf-4e40-9824-e11837661b57
parent d9cdcefc
......@@ -930,7 +930,11 @@ function DrawingObjects() {
for(i = 0; i < aImagesSync.length; ++i)
{
aImagesSync[i] = getFullImageSrc2(aImagesSync[i]);
var localUrl = aImagesSync[i];
if(api.DocInfo["OfflineApp"]) {
g_oDocumentUrls.addImageUrl(localUrl, api.FontLoader.fontFilesPath + "../Excel/document/media/" + localUrl);
}
aImagesSync[i] = getFullImageSrc2(localUrl);
}
// Загружаем все картинки листа
......
......@@ -1029,6 +1029,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// Назначим id-сами, если он не пришел (для открытия тестового документа)
if (!this.documentId)
this.documentId = '9876543210';
this.DocInfo["OfflineApp"] = true;
this._OfflineAppDocumentStartLoad(fCallback);
} else {
var v = {
......@@ -1733,7 +1734,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
};
this._coAuthoringSetServerUrl(null);
//в обычном серверном режиме портим ссылку, потому что CoAuthoring теперь имеет встроенный адрес
//todo надо использовать проверку get_OfflineApp
if(!(window["NATIVE_EDITOR_ENJINE"] || !this.documentId || !this.documentUrl)){
this._coAuthoringSetServerUrl(null);
}
this.CoAuthoringApi.init(t.User, t.documentId, t.documentCallbackUrl, 'fghhfgsjdgfjs',
function(){}, c_oEditorId.Spreadsheet, t.documentFormatSave, t.asc_getViewerMode());
};
......
......@@ -546,9 +546,9 @@
var sUserNameAndId = "user_" + Math.floor ((Math.random() * 100) + 1);
var offLineApp = 0; // 1; // NOTE: ONLY FOR TEST DESKTOP APPLICATION
var c_DocInfo;
if (!offLineApp) {
api.asc_LoadDocument({
c_DocInfo = {
"Id" : getURLParameter("key") ? decodeURIComponent(getURLParameter("key")) : "9876543210",
"Url" : getURLParameter("url") ? decodeURIComponent(getURLParameter("url")) : undefined,
"Title" : getURLParameter("title") ? decodeURIComponent(getURLParameter("title")).replace(new RegExp("\\+",'g')," ") : undefined,
......@@ -558,9 +558,9 @@
"UserId" : sUserNameAndId,
"UserName" : sUserNameAndId,
"ChartEditor" : bChartEditor
});
};
} else {
api.asc_LoadDocument({
c_DocInfo = {
"Id" : getURLParameter("key") ? decodeURIComponent(getURLParameter("key")) : "9876543210",
"Url" : decodeURIComponent("file:///X:/AVS/Sources/TeamlabOffice/trunk/OfficeWeb/OfflineDocuments/Excel/test-native/"),
"Title" : getURLParameter("title") ? decodeURIComponent(getURLParameter("title")).replace(new RegExp("\\+",'g')," ") : undefined,
......@@ -571,8 +571,11 @@
"UserName" : sUserNameAndId,
"ChartEditor" : bChartEditor,
"OfflineApp" : true
});
};
}
api.asc_setDocInfo(c_DocInfo);
api.asc_getEditorPermissions();
api.asc_LoadDocument();
$("#enableKE").data("state", true).click(function(){
var $this = $(this), s = $this.data("state");
......
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