[DE] Refactoring: hide protect button when show history

This commit is contained in:
Julia Radzhabova 2021-03-24 10:58:13 +03:00
parent 36e6394f2b
commit 63674429a6

View file

@ -413,9 +413,11 @@ define([
SetDisabled: function(disable) { SetDisabled: function(disable) {
var _btn_save = this.getButton('save'), var _btn_save = this.getButton('save'),
_btn_rename = this.getButton('rename'); _btn_rename = this.getButton('rename'),
_btn_protect = this.getButton('protect');
_btn_save[(disable || !this.mode.isEdit)?'hide':'show'](); _btn_save[(disable || !this.mode.isEdit)?'hide':'show']();
_btn_protect[(disable || !this.mode.isEdit)?'hide':'show']();
_btn_rename[(disable || !this.mode.canRename || this.mode.isDesktopApp) ?'hide':'show'](); _btn_rename[(disable || !this.mode.canRename || this.mode.isDesktopApp) ?'hide':'show']();
}, },
@ -440,7 +442,7 @@ define([
} else } else
if (type == 'rename') { if (type == 'rename') {
return this.miRename; return this.miRename;
}else }else
if (type == 'protect') { if (type == 'protect') {
return this.miProtect; return this.miProtect;
} }