Commit cf964989 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander.Trofimov

eliminating server calls for offline editor

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55381 954022d7-b5bf-4e40-9824-e11837661b57
parent a29a473a
......@@ -851,30 +851,47 @@ asc_docs_api.prototype.Init = function()
this.WordControl.Init();
}
asc_docs_api.prototype.asc_getEditorPermissions = function()
{
if (this.DocInfo && this.DocInfo.get_Id()) {
var rData = {
"c" : "getsettings",
"id" : this.DocInfo.get_Id(),
"userid" : this.DocInfo.get_UserId(),
"format" : this.DocInfo.get_Format(),
"vkey" : this.DocInfo.get_VKey(),
"editorid" : c_oEditorId.Word
};
sendCommand( this, this.asc_getEditorPermissionsCallback, rData );
} else {
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
{
if (undefined != window['qtDocBridge'])
{
// set permissions
//var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
//editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
}
else
{
if (this.DocInfo && this.DocInfo.get_Id()) {
var rData = {
"c" : "getsettings",
"id" : this.DocInfo.get_Id(),
"userid" : this.DocInfo.get_UserId(),
"format" : this.DocInfo.get_Format(),
"vkey" : this.DocInfo.get_VKey(),
"editorid" : c_oEditorId.Word
};
sendCommand( this, this.asc_getEditorPermissionsCallback, rData );
} else {
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
}
}
};
asc_docs_api.prototype.asc_getLicense = function () {
var t = this;
var rdata = {
"c" : "getlicense"
};
sendCommand(this, function (response) {t._onGetLicense(response);}, rdata);
asc_docs_api.prototype.asc_getLicense = function ()
{
if (undefined != window['qtDocBridge'])
{
editor._onGetLicense(null);
}
else
{
var t = this;
var rdata = {
"c" : "getlicense"
};
sendCommand(this, function (response) {t._onGetLicense(response);}, rdata);
}
};
asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(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