[DE] Fix view mode

This commit is contained in:
Julia Radzhabova 2019-08-23 11:42:21 +03:00
parent 1ad49db48c
commit e1142bac16
2 changed files with 12 additions and 1 deletions

View file

@ -618,7 +618,7 @@ define([
comments.setPreviewMode(disable);
var leftMenu = app.getController('LeftMenu');
leftMenu.leftMenu.getMenu('file').miProtect.setDisabled(disable);
leftMenu.leftMenu.getMenu('file').getButton('protect').setDisabled(disable);
leftMenu.setPreviewMode(disable);
if (this.view) {

View file

@ -150,6 +150,11 @@ define([
canFocused: false
});
if ( !!this.options.miProtect ) {
this.miProtect.setDisabled(this.options.miProtect.isDisabled());
delete this.options.miProtect;
}
this.miRecent = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-recent'),
action : 'recent',
@ -418,6 +423,9 @@ define([
} else
if (type == 'rename') {
return this.options.miRename ? this.options.miRename : (this.options.miRename = new Common.UI.MenuItem({}));
} else
if (type == 'protect') {
return this.options.miProtect ? this.options.miProtect : (this.options.miProtect = new Common.UI.MenuItem({}));
}
} else {
if (type == 'save') {
@ -425,6 +433,9 @@ define([
} else
if (type == 'rename') {
return this.miRename;
}else
if (type == 'protect') {
return this.miProtect;
}
}
},