diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 85bb1a407..12a20e1bb 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -715,6 +715,18 @@ define([ if ( lock ) $btnUsers.addClass('disabled').attr('disabled', 'disabled'); else $btnUsers.removeClass('disabled').attr('disabled', ''); + } else if ( alias == 'rename-user' ) { + if (me.labelUserName) { + if ( lock ) { + me.labelUserName.removeClass('clickable'); + me.labelUserName.addClass('disabled'); + } else { + me.labelUserName.addClass('clickable'); + me.labelUserName.removeClass('disabled'); + } + } else if (me.btnUserName) { + me.btnUserName.setDisabled(lock); + } } else { var _lockButton = function (btn) { if ( btn ) { diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 301812a56..41ba35615 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -571,6 +571,7 @@ define([ appHeader.getButton('users') && appHeader.getButton('users').hide(); this.getApplication().getController('LeftMenu').getView('LeftMenu').showHistory(); this.disableEditing(true); + this._renameDialog && this._renameDialog.close(); var versions = opts.data.history, historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions'), currentVersion = null; @@ -701,6 +702,7 @@ define([ app.getController('LeftMenu').SetDisabled(disable, true); app.getController('Toolbar').DisableToolbar(disable, disable); app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable); + app.getController('Viewport').SetDisabled(disable); }, goBack: function(current) { diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 3597aaee3..3b234b489 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -411,9 +411,14 @@ define([ this.header.btnPrint.hide(); if (this.header.btnEdit) this.header.btnEdit.hide(); + this.header.lockHeaderBtns( 'rename-user', true); } }, + SetDisabled: function(disable) { + this.header && this.header.lockHeaderBtns( 'rename-user', disable); + }, + textFitPage: 'Fit to Page', textFitWidth: 'Fit to Width' }, DE.Controllers.Viewport));