Commit 5f62daaf authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

При открытии документа на viewer не показываем сообщение об устаревшей версии.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58469 954022d7-b5bf-4e40-9824-e11837661b57
parent da797a64
......@@ -807,10 +807,13 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var incomeObject = JSON.parse(msg);
switch( incomeObject["type"] ){
case "updateversion":
oThis.handlers.trigger("asc_onDocumentUpdateVersion", function () {
oThis.asc_setViewerMode(true);
if (oThis.asc_getViewerMode())
oThis._onOpenCommand(callback, incomeObject["data"]);
});
else
oThis.handlers.trigger("asc_onDocumentUpdateVersion", function () {
oThis.asc_setViewerMode(true);
oThis._onOpenCommand(callback, incomeObject["data"]);
});
break;
case "open":
oThis._onOpenCommand(callback, incomeObject["data"]);
......
......@@ -4912,10 +4912,13 @@ function sendCommand(editor, fCallback, rdata){
var incomeObject = JSON.parse(msg), rData;
switch(incomeObject["type"]){
case "updateversion":
editor.asc_fireCallback("asc_onDocumentUpdateVersion", function () {
editor.SetViewMode(true);
if (editor.isViewMode)
_onOpenCommand(fCallback, incomeObject);
});
else
editor.asc_fireCallback("asc_onDocumentUpdateVersion", function () {
editor.SetViewMode(true);
_onOpenCommand(fCallback, incomeObject);
});
break;
case "open":
_onOpenCommand(fCallback, incomeObject);
......
......@@ -7320,10 +7320,13 @@ function sendCommand(editor, fCallback, rdata){
var incomeObject = JSON.parse(msg), rData;
switch (incomeObject["type"]) {
case "updateversion":
editor.asc_fireCallback("asc_onDocumentUpdateVersion", function () {
editor.SetViewMode(true);
_onOpenCommand(fCallback, incomeObject);
});
if (editor.isViewMode)
_onOpenCommand(fCallback, incomeObject);
else
editor.asc_fireCallback("asc_onDocumentUpdateVersion", function () {
editor.SetViewMode(true);
_onOpenCommand(fCallback, incomeObject);
});
break;
case "open":
_onOpenCommand(fCallback, incomeObject);
......
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