[DE] Fix comments and review changes in version history mode (clear comments and rev.changes when loading revisions, disable toolbar)
This commit is contained in:
parent
9d177228df
commit
b8fc92092a
|
@ -1484,6 +1484,11 @@ define([
|
||||||
this.updateComments(true);
|
this.updateComments(true);
|
||||||
if (this.getPopover())
|
if (this.getPopover())
|
||||||
this.getPopover().update(true);
|
this.getPopover().update(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
clearCollections: function() {
|
||||||
|
this.collection.reset();
|
||||||
|
this.groupCollection = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
}, Common.Controllers.Comments || {}));
|
}, Common.Controllers.Comments || {}));
|
||||||
|
|
|
@ -152,7 +152,13 @@ define([
|
||||||
this.api.asc_showRevision(hist);
|
this.api.asc_showRevision(hist);
|
||||||
|
|
||||||
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
||||||
if (commentsController) commentsController.onApiHideComment();
|
if (commentsController) {
|
||||||
|
commentsController.onApiHideComment();
|
||||||
|
commentsController.clearCollections();
|
||||||
|
}
|
||||||
|
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
|
||||||
|
if (reviewController)
|
||||||
|
reviewController.onApiShowChange();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -202,7 +208,13 @@ define([
|
||||||
this.api.asc_showRevision(hist);
|
this.api.asc_showRevision(hist);
|
||||||
|
|
||||||
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
||||||
if (commentsController) commentsController.onApiHideComment();
|
if (commentsController) {
|
||||||
|
commentsController.onApiHideComment();
|
||||||
|
commentsController.clearCollections();
|
||||||
|
}
|
||||||
|
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
|
||||||
|
if (reviewController)
|
||||||
|
reviewController.onApiShowChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -589,6 +589,9 @@ define([
|
||||||
|
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
this.leftMenu.btnComments.setDisabled(disable);
|
this.leftMenu.btnComments.setDisabled(disable);
|
||||||
|
var comments = this.getApplication().getController('Common.Controllers.Comments');
|
||||||
|
if (comments)
|
||||||
|
comments.setPreviewMode(disable);
|
||||||
this.leftMenu.btnChat.setDisabled(disable);
|
this.leftMenu.btnChat.setDisabled(disable);
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
this.leftMenu.btnPlugins.setDisabled(disable);
|
this.leftMenu.btnPlugins.setDisabled(disable);
|
||||||
|
|
|
@ -588,12 +588,12 @@ define([
|
||||||
var app = this.getApplication();
|
var app = this.getApplication();
|
||||||
if (this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
|
if (this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
|
||||||
app.getController('RightMenu').getView('RightMenu').clearSelection();
|
app.getController('RightMenu').getView('RightMenu').clearSelection();
|
||||||
app.getController('Toolbar').DisableToolbar(disable, disable);
|
|
||||||
app.getController('RightMenu').SetDisabled(disable, false);
|
app.getController('RightMenu').SetDisabled(disable, false);
|
||||||
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
||||||
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
|
||||||
}
|
}
|
||||||
app.getController('LeftMenu').SetDisabled(disable, true);
|
app.getController('LeftMenu').SetDisabled(disable, true);
|
||||||
|
app.getController('Toolbar').DisableToolbar(disable, disable);
|
||||||
|
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
||||||
},
|
},
|
||||||
|
|
||||||
goBack: function(current) {
|
goBack: function(current) {
|
||||||
|
@ -676,6 +676,10 @@ define([
|
||||||
this._state.fastCoauth)
|
this._state.fastCoauth)
|
||||||
this.getApplication().getController('Common.Controllers.ReviewChanges').synchronizeChanges();
|
this.getApplication().getController('Common.Controllers.ReviewChanges').synchronizeChanges();
|
||||||
|
|
||||||
|
if ( id == Asc.c_oAscAsyncAction['Open']) {
|
||||||
|
Common.Utils.InternalSettings.get("de-settings-livecomment") ? this.api.asc_showComments(Common.Utils.InternalSettings.get("de-settings-resolvedcomment")) : this.api.asc_hideComments();
|
||||||
|
}
|
||||||
|
|
||||||
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
||||||
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
|
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
|
||||||
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl)) ) {
|
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl)) ) {
|
||||||
|
|
Loading…
Reference in a new issue