From 40bccd072eedcdcb2bf0ce65bab69ee75b9e1a73 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" <Alexander.Trofimov@OnlyOffice.com> Date: Fri, 23 Aug 2013 08:03:41 +0000 Subject: [PATCH] add update presentation locks git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49068 954022d7-b5bf-4e40-9824-e11837661b57 --- Common/docscoapi.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Common/docscoapi.js b/Common/docscoapi.js index 42fe43a81..3497700a3 100644 --- a/Common/docscoapi.js +++ b/Common/docscoapi.js @@ -295,7 +295,7 @@ var isLock = false; var idLockInArray = null; for (; i < lengthArray; ++i) { - idLockInArray = (this._isExcel) ? arrayBlockId[i].guid : arrayBlockId[i]; + idLockInArray = (this._isExcel) ? arrayBlockId[i].guid : (this._isPresentation) ? arrayBlockId[i]["guid"] : arrayBlockId[i]; if (this._locks[idLockInArray] && 0 !== this._locks[idLockInArray].state) { isLock = true; break; @@ -304,7 +304,7 @@ if (0 === lengthArray) isLock = true; - idLockInArray = (this._isExcel) ? arrayBlockId[0].guid : arrayBlockId[0]; + idLockInArray = (this._isExcel) ? arrayBlockId[0].guid : (this._isPresentation) ? arrayBlockId[i]["guid"] : arrayBlockId[0]; if (!isLock) { //Ask @@ -458,7 +458,9 @@ if (data["locks"]) { for (var key in data["locks"]) { if (data["locks"].hasOwnProperty(key)) { - var lock = data["locks"][key], blockTmp = (this._isExcel) ? lock["block"]["guid"] : key, blockValue = (this._isExcel) ? lock["block"] : key; + var lock = data["locks"][key], + blockTmp = (this._isExcel) ? lock["block"]["guid"] : (this._isPresentation) ? lock["block"]["guid"] : key, + blockValue = (this._isExcel) ? lock["block"] : (this._isPresentation) ? lock["block"] : key; if (lock !== null) { var changed = true; if (this._locks[blockTmp] && 1 !== this._locks[blockTmp].state /*asked for it*/) { -- 2.30.9