[SSE mobile] Fix Bug 47962

This commit is contained in:
SergeyEzhin 2021-06-25 18:14:24 +03:00
parent d5e1aa57e9
commit daa60bdd88
2 changed files with 7 additions and 3 deletions

View file

@ -71,7 +71,8 @@ export class storeAppOptions {
}
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
permissions.edit = params.asc_getRights() !== Asc.c_oRights.Edit ? false : true;
if (params.asc_getRights() !== Asc.c_oRights.Edit)
permissions.edit = false;
this.canAutosave = true;
this.canAnalytics = params.asc_getIsAnalyticsEnable();
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);

View file

@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { Input, View, Button, Link } from 'framework7-react';
import {observer, inject} from "mobx-react";
const viewStyle = {
height: 30
@ -12,6 +13,8 @@ const contentStyle = {
const CellEditorView = props => {
const [expanded, setExpanded] = useState(false);
const storeAppOptions = props.storeAppOptions;
const isEdit = storeAppOptions.isEdit;
const expandClick = e => {
setExpanded(!expanded);
@ -20,7 +23,7 @@ const CellEditorView = props => {
return <View id="idx-celleditor" style={viewStyle} className={expanded?'expanded':'collapsed'}>
<div id="box-cell-name" className="ce-group">
<span id="idx-cell-name">{props.cellName}</span>
<a href="#" id="idx-btn-function" className="link icon-only" onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
<a href="#" id="idx-btn-function" className='link icon-only' disabled={!isEdit && true} onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
<i className="icon icon-function" />
</a>
</div>
@ -33,4 +36,4 @@ const CellEditorView = props => {
</View>;
};
export default CellEditorView;
export default inject("storeAppOptions")(observer(CellEditorView));