Merge pull request #1836 from ONLYOFFICE/feature/fix-bugs

Feature/fix bugs
This commit is contained in:
maxkadushkin 2022-06-30 11:27:51 +03:00 committed by GitHub
commit 7bf7e8cc59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 19 deletions

View file

@ -1086,6 +1086,9 @@ input[type="number"]::-webkit-inner-spin-button {
.view {
transition: .2s height;
}
.popover-angle.on-bottom {
display: none;
}
}
.target-function-list {

View file

@ -198,6 +198,7 @@
&__text {
margin: 0 32px;
text-align: center;
color: @text-normal;
}
}
@ -215,11 +216,12 @@
}
}
.navigation-sheet {
.sheet-modal.navigation-sheet {
box-shadow: 0px -2px 20px rgba(0, 0, 0, 0.2);
overflow: hidden;
.sheet-modal-inner {
background: @background-tertiary;
overflow-y: auto;
}
&.sheet-modal-bottom:before, &.sheet-modal:not(.sheet-modal-top):before {
display: none;
@ -324,3 +326,4 @@
color: @brandColor;
}
}

View file

@ -284,6 +284,13 @@ const EditTabs = props => {
component: <EmptyEditLayout />
});
} else {
if(inToc) {
editors.push({
caption: _t.textTableOfCont,
id: 'edit-table-contents',
component: <EditTableContentsController />
})
}
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
@ -333,13 +340,6 @@ const EditTabs = props => {
component: <EditChartController />
})
}
if(inToc) {
editors.push({
caption: _t.textTableOfCont,
id: 'edit-table-contents',
component: <EditTableContentsController />
})
}
if (settings.indexOf('hyperlink') > -1) {
editors.push({
caption: _t.textHyperlink,

View file

@ -193,7 +193,6 @@ const EditParagraph = props => {
const curStyleName = storeParagraphSettings.styleName;
const curStyle = paragraphStyles.find(style => style.name === curStyleName);
const thumbSize = storeParagraphSettings.styleThumbSize;
const paragraph = props.storeFocusObjects.paragraphObject;
const curBackColor = storeParagraphSettings.backColor ? storeParagraphSettings.backColor : storeParagraphSettings.getBackgroundColor(paragraph);
const background = curBackColor !== 'transparent' ? `#${(typeof curBackColor === "object" ? curBackColor.color : curBackColor)}` : '';
@ -203,14 +202,14 @@ const EditParagraph = props => {
<Fragment>
<BlockTitle>{t('Edit.textParagraphStyle')}</BlockTitle>
<List className={activeStyle} style={{marginBottom: 0}}>
<ListItem link="/edit-paragraph-style/" routeProps={{
<ListItem link="/edit-paragraph-style/" title={!curStyle && curStyleName} routeProps={{
onStyleClick: props.onStyleClick,
onSaveStyle: props.onSaveStyle,
onStyleMenuDelete: props.onStyleMenuDelete
}}>
<div slot="inner"
style={{backgroundImage: 'url(' + curStyle.image + ')', width: thumbSize.width + 'px', height: thumbSize.height + 'px', backgroundSize: thumbSize.width + 'px ' + thumbSize.height + 'px', backgroundRepeat: 'no-repeat'}}
></div>
{curStyle &&
<div slot="inner" style={{backgroundImage: 'url(' + curStyle.image + ')', width: thumbSize.width + 'px', height: thumbSize.height + 'px', backgroundSize: thumbSize.width + 'px ' + thumbSize.height + 'px', backgroundRepeat: 'no-repeat'}}></div>
}
</ListItem>
</List>
<List>

View file

@ -8,8 +8,12 @@ const NavigationPopover = props => {
const _t = t('Settings', {returnObjects: true});
const api = Common.EditorApi.get();
const navigationObject = api.asc_ShowDocumentOutline();
const [currentPosition, setCurrentPosition] = useState(navigationObject.get_CurrentPosition());
const arrHeaders = props.updateNavigation();
const [currentPosition, setCurrentPosition] = useState(navigationObject ? navigationObject.get_CurrentPosition() : null);
let arrHeaders = [];
if(currentPosition) {
arrHeaders = props.updateNavigation();
}
return (
<Page>
@ -39,8 +43,12 @@ const NavigationSheet = props => {
const { t } = useTranslation();
const api = Common.EditorApi.get();
const navigationObject = api.asc_ShowDocumentOutline();
const [currentPosition, setCurrentPosition] = useState(navigationObject.get_CurrentPosition());
const arrHeaders = props.updateNavigation();
const [currentPosition, setCurrentPosition] = useState(navigationObject ? navigationObject.get_CurrentPosition() : null);
let arrHeaders = [];
if(currentPosition) {
arrHeaders = props.updateNavigation();
}
const [stateHeight, setHeight] = useState('45%');
const [stateOpacity, setOpacity] = useState(1);

View file

@ -93,14 +93,22 @@ const CellEditor = inject("storeFunctions")(observer(props => {
return {name, type, descr, caption, args};
});
setHintArr(hintArr);
setFuncArr(funcArr);
setHintArr(hintArr);
f7.popover.open('#idx-functions-list', '#idx-list-target');
const listTarget = document.querySelector('#idx-list-target');
const rect = listTarget.getBoundingClientRect();
const popoverList = document.querySelector('#idx-functions-list');
popoverList.style.top = `${rect.bottom}px`;
popoverList.style.left = `${rect.left}px`;
} else {
f7.popover.close('#idx-functions-list');
setFuncArr('');
setHintArr('');
}
}