[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);
|
sheets.setWorksheetLocked(index, locked);
|
||||||
storeFocusObjects.setIsLocked(api.asc_getCellInfo());
|
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_onSheetsChanged', onApiSheetsChanged);
|
||||||
api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged);
|
api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged);
|
||||||
api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu);
|
api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu);
|
||||||
|
|
|
@ -33,7 +33,10 @@ export class storeWorksheets {
|
||||||
setWorkbookLocked: action,
|
setWorkbookLocked: action,
|
||||||
|
|
||||||
isWorksheetLocked: observable,
|
isWorksheetLocked: observable,
|
||||||
setWorksheetLocked: action
|
setWorksheetLocked: action,
|
||||||
|
|
||||||
|
isProtectedWorkbook: observable,
|
||||||
|
setProtectedWorkbook: action
|
||||||
});
|
});
|
||||||
this.sheets = [];
|
this.sheets = [];
|
||||||
}
|
}
|
||||||
|
@ -89,4 +92,9 @@ export class storeWorksheets {
|
||||||
model.locked = locked;
|
model.locked = locked;
|
||||||
this.isWorkbookLocked = 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 {sheets, storeAppOptions, users} = props;
|
||||||
const allSheets = sheets.sheets;
|
const allSheets = sheets.sheets;
|
||||||
const hiddenSheets = sheets.hiddenWorksheets();
|
const hiddenSheets = sheets.hiddenWorksheets();
|
||||||
// const isWorkbookLocked = sheets.isWorkbookLocked;
|
const isWorkbookLocked = sheets.isWorkbookLocked;
|
||||||
|
const isProtectedWorkbook = sheets.isProtectedWorkbook;
|
||||||
const isEdit = storeAppOptions.isEdit;
|
const isEdit = storeAppOptions.isEdit;
|
||||||
const isDisconnected = users.isDisconnected;
|
const isDisconnected = users.isDisconnected;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<View id="idx-statusbar" className="statusbar" style={viewStyle}>
|
<View id="idx-statusbar" className="statusbar" style={viewStyle}>
|
||||||
<div id="idx-box-add-tab" className={`${isDisconnected ? 'disabled' : ''}`}>
|
<div id="idx-box-add-tab" className={`${isDisconnected || isWorkbookLocked || isProtectedWorkbook ? 'disabled' : ''}`}>
|
||||||
<Link href={false} id="idx-btn-addtab" className={`tab${isDisconnected ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
|
<Link href={false} id="idx-btn-addtab" className={`tab${isDisconnected || isWorkbookLocked || isProtectedWorkbook ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
|
||||||
<Icon className="icon icon-plus" />
|
<Icon className="icon icon-plus" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue