Commit 668d34c7 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил состояние запроса на права доступа

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63198 954022d7-b5bf-4e40-9824-e11837661b57
parent c71db6ea
...@@ -60,7 +60,8 @@ var c_oAscAsyncAction = { ...@@ -60,7 +60,8 @@ var c_oAscAsyncAction = {
var c_oAscAdvancedOptionsAction = { var c_oAscAdvancedOptionsAction = {
None: 0, None: 0,
Open: 1, Open: 1,
Save: 2 Save: 2,
Perm: 3
}; };
// Режимы отрисовки // Режимы отрисовки
......
...@@ -602,7 +602,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -602,7 +602,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"vkey" : this.DocInfo["VKey"], "vkey" : this.DocInfo["VKey"],
"editorid" : c_oEditorId.Spreadsheet "editorid" : c_oEditorId.Spreadsheet
}; };
sendCommand2(function (response) {t._onGetEditorPermissions(response);}, this.fCallbackSendCommand, rdata); this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Perm;
sendCommand2(function (response) {
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
t._onGetEditorPermissions(response);
}, this.fCallbackSendCommand, rdata);
} else { } else {
this.handlers.trigger("asc_onGetEditorPermissions", new asc_CAscEditorPermissions()); this.handlers.trigger("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
// Фиктивно инициализируем // Фиктивно инициализируем
...@@ -995,7 +999,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -995,7 +999,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var nErrorLevel = c_oAscError.Level.NoCritical; var nErrorLevel = c_oAscError.Level.NoCritical;
var errorId = result["data"] >> 0; var errorId = result["data"] >> 0;
//todo передалеть работу с callback //todo передалеть работу с callback
if (c_oAscAdvancedOptionsAction.Open === this.advancedOptionsAction) if (c_oAscAdvancedOptionsAction.Perm === editor.advancedOptionsAction ||
c_oAscAdvancedOptionsAction.Open === editor.advancedOptionsAction)
nErrorLevel = c_oAscError.Level.Critical; nErrorLevel = c_oAscError.Level.Critical;
this.handlers.trigger("asc_onError", g_fMapAscServerErrorToAscError(errorId), nErrorLevel); this.handlers.trigger("asc_onError", g_fMapAscServerErrorToAscError(errorId), nErrorLevel);
if (fCallback) fCallback({returnCode: nErrorLevel, val:errorId}); if (fCallback) fCallback({returnCode: nErrorLevel, val:errorId});
......
...@@ -739,7 +739,11 @@ asc_docs_api.prototype.asc_getEditorPermissions = function() { ...@@ -739,7 +739,11 @@ asc_docs_api.prototype.asc_getEditorPermissions = function() {
}; };
var t = this; var t = this;
sendCommand2(function (response) {t.asc_getEditorPermissionsCallback(response);}, _sendCommandCallback, rData); this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Perm;
sendCommand2(function (response) {
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
t.asc_getEditorPermissionsCallback(response);
}, _sendCommandCallback, rData);
} else { } else {
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions; var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
this.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions()); this.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
...@@ -5161,7 +5165,8 @@ function _sendCommandCallback (fCallback, error, result) { ...@@ -5161,7 +5165,8 @@ function _sendCommandCallback (fCallback, error, result) {
case "err": case "err":
var nErrorLevel = c_oAscError.Level.NoCritical; var nErrorLevel = c_oAscError.Level.NoCritical;
//todo передалеть работу с callback //todo передалеть работу с callback
if (c_oAscAdvancedOptionsAction.Open === editor.advancedOptionsAction) if (c_oAscAdvancedOptionsAction.Perm === editor.advancedOptionsAction ||
c_oAscAdvancedOptionsAction.Open === editor.advancedOptionsAction)
nErrorLevel = c_oAscError.Level.Critical; nErrorLevel = c_oAscError.Level.Critical;
editor.asc_fireCallback("asc_onError", g_fMapAscServerErrorToAscError(result["data"] >> 0), nErrorLevel); editor.asc_fireCallback("asc_onError", g_fMapAscServerErrorToAscError(result["data"] >> 0), nErrorLevel);
if (fCallback) fCallback(result); if (fCallback) fCallback(result);
......
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