Commit 32a9e99d authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

При ViewerMode не отрисовываем lock-и

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51349 954022d7-b5bf-4e40-9824-e11837661b57
parent cddc668b
......@@ -653,6 +653,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_setViewerMode: function (isViewerMode) {
if (this.controller.setViewerMode) {
this.controller.setViewerMode(isViewerMode);
if (this.collaborativeEditing)
this.collaborativeEditing.setViewerMode(isViewerMode);
if (false === isViewerMode) {
// Загружаем не обрезанные шрифты для полной версии (при редактировании)
if (this.FontLoader.embedded_cut_manager.bIsCutFontsUse) {
......@@ -1351,7 +1353,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"unlockComments": function () {t._onUnlockComments.apply(t);},
"tryUnlockComment": function () {t._onTryUnlockComment.apply(t, arguments);},
"cleanSelection": function () {t._onCleanSelection.apply(t, arguments);}
});
}, this.asc_getViewerMode());
if (!this.CoAuthoringApi) {
this.asyncServerIdEndLoaded ();
......
......@@ -24,12 +24,13 @@
* @constructor
* @memberOf Asc
*/
function CCollaborativeEditing (handlers) {
function CCollaborativeEditing (handlers, isViewerMode) {
if ( !(this instanceof CCollaborativeEditing) ) {
return new CCollaborativeEditing ();
}
this.handlers = new asc.asc_CHandlersList(handlers);
this.m_bIsViewerMode = !!isViewerMode; // Режим Viewer-а
this.m_bIsCollaborative = false; // Совместное ли редактирование
this.m_bGlobalLock = false; // Глобальный lock
this.m_bGlobalLockEditCell = false; // Глобальный lock (для редактирования ячейки) - отключаем смену select-а, но разрешаем сразу вводить
......@@ -77,8 +78,13 @@
this.m_bIsCollaborative = true;
},
// Выставление режима view
setViewerMode: function (isViewerMode) {
this.m_bIsViewerMode = isViewerMode;
},
getCollaborativeEditing: function () {
if (true !== this.isCoAuthoringExcellEnable())
if (true !== this.isCoAuthoringExcellEnable() || this.m_bIsViewerMode)
return false;
return this.m_bIsCollaborative;
},
......
......@@ -3084,7 +3084,6 @@
_drawCollaborativeElements: function (bIsDrawObjects) {
if (this.collaborativeEditing.getCollaborativeEditing()) {
//this.overlayCtx.ctx.globalAlpha = 1;
this._drawCollaborativeElementsMeOther (c_oAscLockTypes.kLockTypeMine, bIsDrawObjects);
this._drawCollaborativeElementsMeOther (c_oAscLockTypes.kLockTypeOther, bIsDrawObjects);
this._drawCollaborativeElementsAllLock ();
......
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