commit
f63232b2e2
|
@ -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 ) {
|
||||
|
|
|
@ -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;
|
||||
|
@ -589,7 +590,7 @@ define([
|
|||
if (!user) {
|
||||
user = new Common.Models.User({
|
||||
id : version.user.id,
|
||||
username : version.user.name,
|
||||
username : version.user.name || this.textAnonymous,
|
||||
colorval : Asc.c_oAscArrUserColors[usersCnt],
|
||||
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
|
||||
});
|
||||
|
@ -600,7 +601,7 @@ define([
|
|||
version: version.versionGroup,
|
||||
revision: version.version,
|
||||
userid : version.user.id,
|
||||
username : version.user.name,
|
||||
username : version.user.name || this.textAnonymous,
|
||||
usercolor: user.get('color'),
|
||||
created: version.created,
|
||||
docId: version.key,
|
||||
|
@ -637,7 +638,7 @@ define([
|
|||
if (!user) {
|
||||
user = new Common.Models.User({
|
||||
id : change.user.id,
|
||||
username : change.user.name,
|
||||
username : change.user.name || this.textAnonymous,
|
||||
colorval : Asc.c_oAscArrUserColors[usersCnt],
|
||||
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
|
||||
});
|
||||
|
@ -649,7 +650,7 @@ define([
|
|||
revision: version.version,
|
||||
changeid: i,
|
||||
userid : change.user.id,
|
||||
username : change.user.name,
|
||||
username : change.user.name || this.textAnonymous,
|
||||
usercolor: user.get('color'),
|
||||
created: change.created,
|
||||
docId: version.key,
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue