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