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

Поправил вызов asc_getEditorPermissionsCallback

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60727 954022d7-b5bf-4e40-9824-e11837661b57
parent 7e6e94fa
......@@ -701,28 +701,28 @@ asc_docs_api.prototype.sync_ChangeLastSelectedElement = function(type, obj)
{
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new CSelectedObject( type, oUnkTypeObj );
}
}
};
asc_docs_api.prototype.Init = function()
{
this.WordControl.Init();
}
asc_docs_api.prototype.asc_getEditorPermissions = function()
{
};
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.Presentation
"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.Presentation
};
sendCommand( this, this.asc_getEditorPermissionsCallback, rData );
var t = this;
sendCommand(this, function (response) {t.asc_getEditorPermissionsCallback(response);}, rData);
} else {
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
}
};
......@@ -734,9 +734,9 @@ asc_docs_api.prototype.asc_getLicense = function () {
sendCommand(this, function (response) {t._onGetLicense(response);}, rdata);
};
asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(incomeObject) {
if (null != incomeObject && "getsettings" == incomeObject["type"]) {
var oSettings = JSON.parse(incomeObject["data"]);
asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) {
if (null != response && "getsettings" == response["type"]) {
var oSettings = JSON.parse(response["data"]);
//Set up coauthoring and spellcheker service
window.g_cAscCoAuthoringUrl = oSettings['g_cAscCoAuthoringUrl'];
......
......@@ -862,30 +862,27 @@ asc_docs_api.prototype.Init = function()
{
this.WordControl.Init();
};
asc_docs_api.prototype.asc_getEditorPermissions = function()
{
if (undefined != window['qtDocBridge'])
{
asc_docs_api.prototype.asc_getEditorPermissions = function() {
if (undefined != window['qtDocBridge']) {
// set permissions
//var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
//editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
}
else
{
} 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
"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 );
var t = this;
sendCommand(this, function (response) {t.asc_getEditorPermissionsCallback(response);}, rData);
} else {
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
}
}
};
......@@ -906,9 +903,9 @@ asc_docs_api.prototype.asc_getLicense = function ()
}
};
asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(incomeObject) {
if (null != incomeObject && "getsettings" == incomeObject["type"]) {
var oSettings = JSON.parse(incomeObject["data"]);
asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) {
if (null != response && "getsettings" == response["type"]) {
var oSettings = JSON.parse(response["data"]);
//Set up coauthoring and spellcheker service
window.g_cAscCoAuthoringUrl = oSettings['g_cAscCoAuthoringUrl'];
......
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