Commit bd950d03 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Передаю isViewMode на сервер

Поменял хранение serverHost, serverPort, serverPath на объект server

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56368 954022d7-b5bf-4e40-9824-e11837661b57
parent e0fd0919
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
}; };
CDocsCoApi.prototype.init = function (user, docid, token, serverHost, serverPort, serverPath, callback, CDocsCoApi.prototype.init = function (user, docid, token, serverHost, serverPort, serverPath, callback,
editorType, documentFormatSave) { editorType, documentFormatSave, isViewer) {
if (this._CoAuthoringApi && this._CoAuthoringApi.isRightURL()) { if (this._CoAuthoringApi && this._CoAuthoringApi.isRightURL()) {
var t = this; var t = this;
this._CoAuthoringApi.onAuthParticipantsChanged = function (e, count) {t.callback_OnAuthParticipantsChanged(e, count);}; this._CoAuthoringApi.onAuthParticipantsChanged = function (e, count) {t.callback_OnAuthParticipantsChanged(e, count);};
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
this._CoAuthoringApi.onStartCoAuthoring = function (e) {t.callback_OnStartCoAuthoring(e);}; this._CoAuthoringApi.onStartCoAuthoring = function (e) {t.callback_OnStartCoAuthoring(e);};
this._CoAuthoringApi.init(user, docid, token, serverHost, serverPort, serverPath, callback, this._CoAuthoringApi.init(user, docid, token, serverHost, serverPort, serverPath, callback,
editorType, documentFormatSave); editorType, documentFormatSave, isViewer);
this._onlineWork = true; this._onlineWork = true;
} }
else { else {
...@@ -739,10 +739,13 @@ ...@@ -739,10 +739,13 @@
}, },
"locks":docsCoApi.ownedLockBlocks, "locks":docsCoApi.ownedLockBlocks,
"sessionId":docsCoApi._id, "sessionId":docsCoApi._id,
"serverHost": docsCoApi._serverHost, "server": {
"serverPort": docsCoApi._serverPort, "host": docsCoApi._serverHost,
"serverPath": docsCoApi._serverPath, "port": docsCoApi._serverPort,
"documentFormatSave": docsCoApi._documentFormatSave "path":docsCoApi._serverPath
},
"documentFormatSave": docsCoApi._documentFormatSave,
"isViewer": docsCoApi._isViewer
}); });
}; };
...@@ -789,7 +792,7 @@ ...@@ -789,7 +792,7 @@
DocsCoApi.prototype.init = function (user, docid, token, serverHost, serverPort, serverPath, callback, DocsCoApi.prototype.init = function (user, docid, token, serverHost, serverPort, serverPath, callback,
editorType, documentFormatSave) { editorType, documentFormatSave, isViewer) {
this._user = user; this._user = user;
this._docid = docid; this._docid = docid;
this._token = token; this._token = token;
...@@ -807,6 +810,7 @@ ...@@ -807,6 +810,7 @@
this._isPresentation = c_oEditorId.Presentation === editorType; this._isPresentation = c_oEditorId.Presentation === editorType;
this._isAuth = false; this._isAuth = false;
this._documentFormatSave = documentFormatSave; this._documentFormatSave = documentFormatSave;
this._isViewer = isViewer;
this.dataHandler = this.dataHandler =
{ {
......
...@@ -1655,7 +1655,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1655,7 +1655,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.CoAuthoringApi.init(t.User, t.documentId, 'fghhfgsjdgfjs', window.location.hostname, this.CoAuthoringApi.init(t.User, t.documentId, 'fghhfgsjdgfjs', window.location.hostname,
window.location.port, g_sMainServiceLocalUrl, function(){ window.location.port, g_sMainServiceLocalUrl, function(){
}, c_oEditorId.Speadsheet, t.documentFormatSave); }, c_oEditorId.Speadsheet, t.documentFormatSave, t.asc_getViewerMode());
}, },
// Set CoAuthoring server url // Set CoAuthoring server url
......
...@@ -518,9 +518,9 @@ asc_docs_api.prototype._coAuthoringInit = function () { ...@@ -518,9 +518,9 @@ asc_docs_api.prototype._coAuthoringInit = function () {
} }
}; };
this.CoAuthoringApi.init (editor.User, documentId, 'fghhfgsjdgfjs', window.location.hostname, this.CoAuthoringApi.init (this.User, documentId, 'fghhfgsjdgfjs', window.location.hostname,
window.location.port, g_sMainServiceLocalUrl, function(){ window.location.port, g_sMainServiceLocalUrl, function(){
}, c_oEditorId.Presentation, documentFormatSave); }, c_oEditorId.Presentation, documentFormatSave, this.isViewMode);
// ToDo init other callbacks // ToDo init other callbacks
}; };
......
...@@ -1603,9 +1603,9 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1603,9 +1603,9 @@ asc_docs_api.prototype._coAuthoringInit = function()
} }
}; };
this.CoAuthoringApi.init (editor.User, documentId, 'fghhfgsjdgfjs', window.location.hostname, this.CoAuthoringApi.init(this.User, documentId, 'fghhfgsjdgfjs', window.location.hostname,
window.location.port, g_sMainServiceLocalUrl, function(){ window.location.port, g_sMainServiceLocalUrl, function(){
}, c_oEditorId.Word, documentFormatSave); }, c_oEditorId.Word, documentFormatSave, this.isViewMode);
// ToDo init other callbacks // ToDo init other callbacks
} }
......
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