[SSE mobile] Fix Bug 52831
This commit is contained in:
parent
96f81d6c6d
commit
291f2ddb7b
|
@ -19,6 +19,9 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser
|
|||
sheets.setWorksheetLocked(index, locked);
|
||||
storeFocusObjects.setIsLocked(api.asc_getCellInfo());
|
||||
});
|
||||
api.asc_registerCallback('asc_onChangeProtectWorkbook', () => {
|
||||
sheets.setProtectedWorkbook(api.asc_isProtectedWorkbook());
|
||||
});
|
||||
api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged);
|
||||
api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged);
|
||||
api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu);
|
||||
|
|
|
@ -33,7 +33,10 @@ export class storeWorksheets {
|
|||
setWorkbookLocked: action,
|
||||
|
||||
isWorksheetLocked: observable,
|
||||
setWorksheetLocked: action
|
||||
setWorksheetLocked: action,
|
||||
|
||||
isProtectedWorkbook: observable,
|
||||
setProtectedWorkbook: action
|
||||
});
|
||||
this.sheets = [];
|
||||
}
|
||||
|
@ -89,4 +92,9 @@ export class storeWorksheets {
|
|||
model.locked = locked;
|
||||
this.isWorkbookLocked = locked;
|
||||
}
|
||||
|
||||
isProtectedWorkbook = false;
|
||||
setProtectedWorkbook(value) {
|
||||
this.isProtectedWorkbook = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,15 +16,16 @@ const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(prop
|
|||
const {sheets, storeAppOptions, users} = props;
|
||||
const allSheets = sheets.sheets;
|
||||
const hiddenSheets = sheets.hiddenWorksheets();
|
||||
// const isWorkbookLocked = sheets.isWorkbookLocked;
|
||||
const isWorkbookLocked = sheets.isWorkbookLocked;
|
||||
const isProtectedWorkbook = sheets.isProtectedWorkbook;
|
||||
const isEdit = storeAppOptions.isEdit;
|
||||
const isDisconnected = users.isDisconnected;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<View id="idx-statusbar" className="statusbar" style={viewStyle}>
|
||||
<div id="idx-box-add-tab" className={`${isDisconnected ? 'disabled' : ''}`}>
|
||||
<Link href={false} id="idx-btn-addtab" className={`tab${isDisconnected ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
|
||||
<div id="idx-box-add-tab" className={`${isDisconnected || isWorkbookLocked || isProtectedWorkbook ? 'disabled' : ''}`}>
|
||||
<Link href={false} id="idx-btn-addtab" className={`tab${isDisconnected || isWorkbookLocked || isProtectedWorkbook ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
|
||||
<Icon className="icon icon-plus" />
|
||||
</Link>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue