[DE] Protect settings depend on permissions
This commit is contained in:
parent
8f1f89ee31
commit
0d54c6d31e
|
@ -124,6 +124,7 @@ define([
|
|||
var me = this,
|
||||
btn,
|
||||
win = new DE.Views.ProtectDialog({
|
||||
props: me.appConfig,
|
||||
handler: function(result, value, props) {
|
||||
btn = result;
|
||||
if (result == 'ok') {
|
||||
|
|
|
@ -61,10 +61,7 @@ define([
|
|||
}, options);
|
||||
|
||||
this.handler = options.handler;
|
||||
this.txtDescription = options.txtDescription || '';
|
||||
this.props = options.props;
|
||||
this.isEdit = options.isEdit;
|
||||
this.api = options.api;
|
||||
|
||||
this.template = options.template || [
|
||||
'<div class="box">',
|
||||
|
@ -194,12 +191,9 @@ define([
|
|||
|
||||
_setDefaults: function (props) {
|
||||
if (props) {
|
||||
var type = props.asc_getType();
|
||||
switch (type) {
|
||||
case Asc.c_oAscProtection.Forms: this.rbForms.setValue(true, true); break;
|
||||
case Asc.c_oAscProtection.Review: this.rbReview.setValue(true, true); break;
|
||||
case Asc.c_oAscProtection.Comments: this.rbComments.setValue(true, true); break;
|
||||
}
|
||||
this.rbReview.setDisabled(!props.canReview);
|
||||
this.rbForms.setDisabled(!props.canFillForms);
|
||||
this.rbComments.setDisabled(!props.canComments);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue