[DE Mobile] disable editing for fill forms and commenting when no license (Bug 54910)

This commit is contained in:
Julia Radzhabova 2022-01-19 16:08:03 +03:00
parent 8d36662f15
commit 743cd8a42a

View file

@ -558,32 +558,31 @@ class MainController extends Component {
storeDocumentSettings.changeDocSize(w, h); storeDocumentSettings.changeDocSize(w, h);
}); });
const storeAppOptions = this.props.storeAppOptions; this.api.asc_registerCallback('asc_onShowContentControlsActions', (obj, x, y) => {
const storeAppOptions = this.props.storeAppOptions;
if (!storeAppOptions.isEdit && !(storeAppOptions.isRestrictedEdit && storeAppOptions.canFillForms) || this.props.users.isDisconnected) return;
if (storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit && storeAppOptions.canFillForms) { switch (obj.type) {
this.api.asc_registerCallback('asc_onShowContentControlsActions', (obj, x, y) => { case Asc.c_oAscContentControlSpecificType.DateTime:
switch (obj.type) { this.onShowDateActions(obj, x, y);
case Asc.c_oAscContentControlSpecificType.DateTime: break;
this.onShowDateActions(obj, x, y); case Asc.c_oAscContentControlSpecificType.Picture:
break; if (obj.pr && obj.pr.get_Lock) {
case Asc.c_oAscContentControlSpecificType.Picture: let lock = obj.pr.get_Lock();
if (obj.pr && obj.pr.get_Lock) { if (lock == Asc.c_oAscSdtLockType.SdtContentLocked || lock == Asc.c_oAscSdtLockType.ContentLocked)
let lock = obj.pr.get_Lock(); return;
if (lock == Asc.c_oAscSdtLockType.SdtContentLocked || lock == Asc.c_oAscSdtLockType.ContentLocked) }
return; this.api.asc_addImage(obj);
} setTimeout(() => {
this.api.asc_addImage(obj); this.api.asc_UncheckContentControlButtons();
setTimeout(() => { }, 500);
this.api.asc_UncheckContentControlButtons(); break;
}, 500); case Asc.c_oAscContentControlSpecificType.DropDownList:
break; case Asc.c_oAscContentControlSpecificType.ComboBox:
case Asc.c_oAscContentControlSpecificType.DropDownList: this.onShowListActions(obj, x, y);
case Asc.c_oAscContentControlSpecificType.ComboBox: break;
this.onShowListActions(obj, x, y); }
break; });
}
});
}
const storeTextSettings = this.props.storeTextSettings; const storeTextSettings = this.props.storeTextSettings;
storeTextSettings.resetFontsRecent(LocalStorage.getItem('dde-settings-recent-fonts')); storeTextSettings.resetFontsRecent(LocalStorage.getItem('dde-settings-recent-fonts'));