Merge pull request #1229 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
8da1200ea1
|
@ -878,7 +878,7 @@ input[type="number"]::-webkit-inner-spin-button {
|
||||||
}
|
}
|
||||||
|
|
||||||
.functions-list {
|
.functions-list {
|
||||||
height: 175px;
|
max-height: 175px;
|
||||||
width: 360px;
|
width: 360px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
|
@ -581,7 +581,12 @@
|
||||||
"txtScheme6": "Concourse",
|
"txtScheme6": "Concourse",
|
||||||
"txtScheme7": "Equity",
|
"txtScheme7": "Equity",
|
||||||
"txtScheme8": "Flow",
|
"txtScheme8": "Flow",
|
||||||
"txtScheme9": "Foundry"
|
"txtScheme9": "Foundry",
|
||||||
|
"textPages": "Pages",
|
||||||
|
"textParagraphs": "Paragraphs",
|
||||||
|
"textWords": "Words",
|
||||||
|
"textSymbols": "Symbols",
|
||||||
|
"textSpaces": "Spaces"
|
||||||
},
|
},
|
||||||
"Toolbar": {
|
"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.",
|
"dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||||
|
|
|
@ -57,11 +57,11 @@ const PageDocumentInfo = (props) => {
|
||||||
) : null}
|
) : null}
|
||||||
<BlockTitle>{_t.textStatistic}</BlockTitle>
|
<BlockTitle>{_t.textStatistic}</BlockTitle>
|
||||||
<List>
|
<List>
|
||||||
<ListItem title="Pages" after={isLoaded ? String(pageCount) : _t.textLoading}></ListItem>
|
<ListItem title={t('Settings.textPages')} after={isLoaded ? String(pageCount) : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Paragraphs" after={isLoaded ? String(paragraphCount) : _t.textLoading}></ListItem>
|
<ListItem title={t('Settings.textParagraphs')} after={isLoaded ? String(paragraphCount) : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Words" after={isLoaded ? String(wordsCount) : _t.textLoading}></ListItem>
|
<ListItem title={t('Settings.textWords')} after={isLoaded ? String(wordsCount) : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Symbols" after={isLoaded ? String(symbolsCount) : _t.textLoading}></ListItem>
|
<ListItem title={t('Settings.textSymbols')} after={isLoaded ? String(symbolsCount) : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Spaces" after={isLoaded ? String(symbolsWSCount) : _t.textLoading}></ListItem>
|
<ListItem title={t('Settings.textSpaces')} after={isLoaded ? String(symbolsWSCount) : _t.textLoading}></ListItem>
|
||||||
</List>
|
</List>
|
||||||
{props.title ? (
|
{props.title ? (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
|
|
@ -224,7 +224,8 @@
|
||||||
"unknownErrorText": "Unknown error.",
|
"unknownErrorText": "Unknown error.",
|
||||||
"uploadImageExtMessage": "Unknown image format.",
|
"uploadImageExtMessage": "Unknown image format.",
|
||||||
"uploadImageFileCountMessage": "No images uploaded.",
|
"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": {
|
"LongActions": {
|
||||||
"applyChangesTextText": "Loading data...",
|
"applyChangesTextText": "Loading data...",
|
||||||
|
|
|
@ -304,7 +304,7 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.ChangeOnProtectedSheet:
|
case Asc.c_oAscError.ID.ChangeOnProtectedSheet:
|
||||||
config.msg = _t.errorChangeOnProtectedSheet;
|
config.msg = t('Error.errorChangeOnProtectedSheet');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.LoadingFontError:
|
case Asc.c_oAscError.ID.LoadingFontError:
|
||||||
|
|
|
@ -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);
|
||||||
|
@ -123,6 +126,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
|
||||||
const _t = t('Statusbar', {returnObjects: true});
|
const _t = t('Statusbar', {returnObjects: true});
|
||||||
const isEdit = storeAppOptions.isEdit;
|
const isEdit = storeAppOptions.isEdit;
|
||||||
const isDisconnected = users.isDisconnected;
|
const isDisconnected = users.isDisconnected;
|
||||||
|
const isProtectedWorkbook = sheets.isProtectedWorkbook;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const on_main_view_click = e => {
|
const on_main_view_click = e => {
|
||||||
|
@ -180,7 +184,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
|
||||||
|
|
||||||
if (index == api.asc_getActiveWorksheetIndex()) {
|
if (index == api.asc_getActiveWorksheetIndex()) {
|
||||||
if (!opened) {
|
if (!opened) {
|
||||||
if (isEdit && !isDisconnected && !model.locked) {
|
if (isEdit && !isDisconnected && !model.locked && !isProtectedWorkbook) {
|
||||||
api.asc_closeCellEditor();
|
api.asc_closeCellEditor();
|
||||||
f7.popover.open('#idx-tab-context-menu-popover', target);
|
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());
|
let current = api.asc_getWorksheetName(api.asc_getActiveWorksheetIndex());
|
||||||
|
|
||||||
f7.dialog.create({
|
f7.dialog.create({
|
||||||
title: _t.textRenameSheet,
|
title: _t.textSheetName,
|
||||||
content: Device.ios ?
|
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="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>',
|
'<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>',
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -47,7 +47,7 @@ const PageApplicationSettings = props => {
|
||||||
</List>
|
</List>
|
||||||
<BlockTitle>{_t.textFormulaLanguage}</BlockTitle>
|
<BlockTitle>{_t.textFormulaLanguage}</BlockTitle>
|
||||||
<List mediaList>
|
<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={{
|
routeProps={{
|
||||||
onFormulaLangChange: props.onFormulaLangChange
|
onFormulaLangChange: props.onFormulaLangChange
|
||||||
}}>
|
}}>
|
||||||
|
@ -147,7 +147,7 @@ const PageFormulaLanguage = props => {
|
||||||
<List mediaList>
|
<List mediaList>
|
||||||
{dataLang.map((elem, index) => {
|
{dataLang.map((elem, index) => {
|
||||||
return (
|
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={() => {
|
onChange={() => {
|
||||||
storeApplicationSettings.changeFormulaLang(elem.value);
|
storeApplicationSettings.changeFormulaLang(elem.value);
|
||||||
props.onFormulaLangChange(elem.value);
|
props.onFormulaLangChange(elem.value);
|
||||||
|
|
Loading…
Reference in a new issue