Commit 894f1dbd 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@64519 954022d7-b5bf-4e40-9824-e11837661b57
parent 74d33160
......@@ -32,9 +32,7 @@
}
CDocsCoApi.prototype.init = function (user, docid, documentCallbackUrl, token, callback, editorType, documentFormatSave, isViewer) {
//раньше isRightURL был true в редакторе, false в doctrenderer
//теперь никогда не приходит url, поэтому надо использовать NATIVE_EDITOR_ENJINE
if (this._CoAuthoringApi && this._CoAuthoringApi.isRightURL() && !window["NATIVE_EDITOR_ENJINE"]) {
if (this._CoAuthoringApi && this._CoAuthoringApi.isRightURL()) {
var t = this;
this._CoAuthoringApi.onAuthParticipantsChanged = function (e, count) {t.callback_OnAuthParticipantsChanged(e, count);};
this._CoAuthoringApi.onParticipantsChanged = function (e, count) {t.callback_OnParticipantsChanged(e, count);};
......
......@@ -25,15 +25,13 @@ var g_nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="
var g_cCharDelimiter = String.fromCharCode(5);
function DocumentUrls(){
this.urls = null;
this.urlsReverse = null;
this.urls = {};
this.urlsReverse = {};
this.imageCount = 0;
}
DocumentUrls.prototype = {
mediaPrefix : 'media/',
init : function(urls){
this.urls = {};
this.urlsReverse = {};
this.addUrls(urls);
},
addUrls : function(urls){
......
......@@ -1527,8 +1527,11 @@ asc_docs_api.prototype._coAuthoringInit = function()
}
}
};
this.CoAuthoringApi.set_url(null);
//в обычном серверном режиме портим ссылку, потому что CoAuthoring теперь имеет встроенный адрес
//todo надо использовать проверку get_OfflineApp, но она инициализируется только после loadDocument
if(!(window["NATIVE_EDITOR_ENJINE"] || !documentId)){
this.CoAuthoringApi.set_url(null);
}
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', function(){},
c_oEditorId.Word, documentFormatSave, this.isViewMode);
......@@ -5869,8 +5872,11 @@ asc_docs_api.prototype.asyncFontsDocumentStartLoaded = function()
var _count = 0;
if (_loader_object !== undefined && _loader_object != null)
{
for (var i in _loader_object.ImageMap)
for (var i in _loader_object.ImageMap) {
var localUrl = _loader_object.ImageMap[i];
g_oDocumentUrls.addImageUrl(localUrl, documentUrl + 'media/' + localUrl);
++_count;
}
}
_progress.ImagesCount = _count;
......
......@@ -4383,8 +4383,10 @@ $(".colorWatch").mouseover(function(){
var isViewMode = "true" == getURLParameter("isViewMode");
editor.SetViewMode(isViewMode);
editor.asc_setDocInfo(c_DocInfo);
editor.asc_getEditorPermissions();
editor.LoadDocument();
editor.LoadDocument(c_DocInfo);
$(".mathList").click(function(event)
{
......
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