[PE] For Bug 49152

This commit is contained in:
Julia Radzhabova 2021-03-27 01:21:17 +03:00
parent bdd940623b
commit 6321f579d9
3 changed files with 19 additions and 0 deletions

View file

@ -715,6 +715,18 @@ define([
if ( lock ) if ( lock )
$btnUsers.addClass('disabled').attr('disabled', 'disabled'); else $btnUsers.addClass('disabled').attr('disabled', 'disabled'); else
$btnUsers.removeClass('disabled').attr('disabled', ''); $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 { } else {
var _lockButton = function (btn) { var _lockButton = function (btn) {
if ( btn ) { if ( btn ) {

View file

@ -964,6 +964,7 @@ define([
app.getController('LeftMenu').SetDisabled(disable, true); app.getController('LeftMenu').SetDisabled(disable, true);
app.getController('Toolbar').DisableToolbar(disable); app.getController('Toolbar').DisableToolbar(disable);
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable); app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
app.getController('Viewport').SetDisabled(disable);
}, },
onOpenDocument: function(progress) { onOpenDocument: function(progress) {
@ -2157,6 +2158,7 @@ define([
appHeader.getButton('users') && appHeader.getButton('users').hide(); appHeader.getButton('users') && appHeader.getButton('users').hide();
this.getApplication().getController('LeftMenu').getView('LeftMenu').showHistory(); this.getApplication().getController('LeftMenu').getView('LeftMenu').showHistory();
this.disableEditing(true); this.disableEditing(true);
this._renameDialog && this._renameDialog.close();
var versions = opts.data.history, var versions = opts.data.history,
historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions'), historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions'),
currentVersion = null; currentVersion = null;

View file

@ -472,9 +472,14 @@ define([
this.header.btnPrint.hide(); this.header.btnPrint.hide();
if (this.header.btnEdit) if (this.header.btnEdit)
this.header.btnEdit.hide(); 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', textFitPage: 'Fit to Page',
textFitWidth: 'Fit to Width' textFitWidth: 'Fit to Width'
}, PE.Controllers.Viewport)); }, PE.Controllers.Viewport));