Merge pull request #1229 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2021-10-06 14:26:52 +03:00 committed by GitHub
commit 8da1200ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 17 deletions

View file

@ -878,7 +878,7 @@ input[type="number"]::-webkit-inner-spin-button {
}
.functions-list {
height: 175px;
max-height: 175px;
width: 360px;
overflow-y: auto;
overflow-x: hidden;

View file

@ -581,7 +581,12 @@
"txtScheme6": "Concourse",
"txtScheme7": "Equity",
"txtScheme8": "Flow",
"txtScheme9": "Foundry"
"txtScheme9": "Foundry",
"textPages": "Pages",
"textParagraphs": "Paragraphs",
"textWords": "Words",
"textSymbols": "Symbols",
"textSpaces": "Spaces"
},
"Toolbar": {
"dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.",

View file

@ -57,11 +57,11 @@ const PageDocumentInfo = (props) => {
) : null}
<BlockTitle>{_t.textStatistic}</BlockTitle>
<List>
<ListItem title="Pages" after={isLoaded ? String(pageCount) : _t.textLoading}></ListItem>
<ListItem title="Paragraphs" after={isLoaded ? String(paragraphCount) : _t.textLoading}></ListItem>
<ListItem title="Words" after={isLoaded ? String(wordsCount) : _t.textLoading}></ListItem>
<ListItem title="Symbols" after={isLoaded ? String(symbolsCount) : _t.textLoading}></ListItem>
<ListItem title="Spaces" after={isLoaded ? String(symbolsWSCount) : _t.textLoading}></ListItem>
<ListItem title={t('Settings.textPages')} after={isLoaded ? String(pageCount) : _t.textLoading}></ListItem>
<ListItem title={t('Settings.textParagraphs')} after={isLoaded ? String(paragraphCount) : _t.textLoading}></ListItem>
<ListItem title={t('Settings.textWords')} after={isLoaded ? String(wordsCount) : _t.textLoading}></ListItem>
<ListItem title={t('Settings.textSymbols')} after={isLoaded ? String(symbolsCount) : _t.textLoading}></ListItem>
<ListItem title={t('Settings.textSpaces')} after={isLoaded ? String(symbolsWSCount) : _t.textLoading}></ListItem>
</List>
{props.title ? (
<Fragment>

View file

@ -224,7 +224,8 @@
"unknownErrorText": "Unknown error.",
"uploadImageExtMessage": "Unknown image format.",
"uploadImageFileCountMessage": "No images uploaded.",
"uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB."
"uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.",
"errorChangeOnProtectedSheet": "The cell or chart you are trying to change is on a protected sheet. To make a change, unprotect the sheet. You might be requested to enter a password."
},
"LongActions": {
"applyChangesTextText": "Loading data...",

View file

@ -304,7 +304,7 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
break;
case Asc.c_oAscError.ID.ChangeOnProtectedSheet:
config.msg = _t.errorChangeOnProtectedSheet;
config.msg = t('Error.errorChangeOnProtectedSheet');
break;
case Asc.c_oAscError.ID.LoadingFontError:

View file

@ -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);
@ -123,6 +126,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
const _t = t('Statusbar', {returnObjects: true});
const isEdit = storeAppOptions.isEdit;
const isDisconnected = users.isDisconnected;
const isProtectedWorkbook = sheets.isProtectedWorkbook;
useEffect(() => {
const on_main_view_click = e => {
@ -180,7 +184,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
if (index == api.asc_getActiveWorksheetIndex()) {
if (!opened) {
if (isEdit && !isDisconnected && !model.locked) {
if (isEdit && !isDisconnected && !model.locked && !isProtectedWorkbook) {
api.asc_closeCellEditor();
f7.popover.open('#idx-tab-context-menu-popover', target);
}
@ -229,7 +233,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
let current = api.asc_getWorksheetName(api.asc_getActiveWorksheetIndex());
f7.dialog.create({
title: _t.textRenameSheet,
title: _t.textSheetName,
content: Device.ios ?
'<div class="input-field"><input type="text" name="modal-sheet-name" maxlength="31" value="' + current + '" placeholder="' + _t.textSheetName + '" class="modal-text-input"></div>' :
'<div class="item-content item-input" style="margin-top: 15px; position: relative; padding-bottom: 10px;"><div class="item-inner"><div class="item-input-wrap" style="min-height: initial; width: 100%;"><input type="text" style="width: 100%;" name="modal-sheet-name" value="' + current + '" maxlength="31" placeholder="' + _t.textSheetName + '" /></div></div></div>',

View file

@ -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;
}
}

View file

@ -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>

View file

@ -47,7 +47,7 @@ const PageApplicationSettings = props => {
</List>
<BlockTitle>{_t.textFormulaLanguage}</BlockTitle>
<List mediaList>
<ListItem title={currentFormulaLang.displayValue} subtitle={`Example: ${currentFormulaLang.exampleValue}`} link="/formula-languages/"
<ListItem title={currentFormulaLang.displayValue} subtitle={`${t('View.Settings.textExample')}: ${currentFormulaLang.exampleValue}`} link="/formula-languages/"
routeProps={{
onFormulaLangChange: props.onFormulaLangChange
}}>
@ -147,7 +147,7 @@ const PageFormulaLanguage = props => {
<List mediaList>
{dataLang.map((elem, index) => {
return (
<ListItem radio key={index} title={elem.displayValue} subtitle={`Example: ${elem.exampleValue}`} checked={elem.value === formulaLang}
<ListItem radio key={index} title={elem.displayValue} subtitle={`${t('View.Settings.textExample')}: ${elem.exampleValue}`} checked={elem.value === formulaLang}
onChange={() => {
storeApplicationSettings.changeFormulaLang(elem.value);
props.onFormulaLangChange(elem.value);