Merge pull request #1836 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
7bf7e8cc59
|
@ -1086,6 +1086,9 @@ input[type="number"]::-webkit-inner-spin-button {
|
||||||
.view {
|
.view {
|
||||||
transition: .2s height;
|
transition: .2s height;
|
||||||
}
|
}
|
||||||
|
.popover-angle.on-bottom {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.target-function-list {
|
.target-function-list {
|
||||||
|
|
|
@ -198,6 +198,7 @@
|
||||||
&__text {
|
&__text {
|
||||||
margin: 0 32px;
|
margin: 0 32px;
|
||||||
text-align: center;
|
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);
|
box-shadow: 0px -2px 20px rgba(0, 0, 0, 0.2);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.sheet-modal-inner {
|
.sheet-modal-inner {
|
||||||
background: @background-tertiary;
|
background: @background-tertiary;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
&.sheet-modal-bottom:before, &.sheet-modal:not(.sheet-modal-top):before {
|
&.sheet-modal-bottom:before, &.sheet-modal:not(.sheet-modal-top):before {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -324,3 +326,4 @@
|
||||||
color: @brandColor;
|
color: @brandColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,6 +284,13 @@ const EditTabs = props => {
|
||||||
component: <EmptyEditLayout />
|
component: <EmptyEditLayout />
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if(inToc) {
|
||||||
|
editors.push({
|
||||||
|
caption: _t.textTableOfCont,
|
||||||
|
id: 'edit-table-contents',
|
||||||
|
component: <EditTableContentsController />
|
||||||
|
})
|
||||||
|
}
|
||||||
if (settings.indexOf('text') > -1) {
|
if (settings.indexOf('text') > -1) {
|
||||||
editors.push({
|
editors.push({
|
||||||
caption: _t.textText,
|
caption: _t.textText,
|
||||||
|
@ -333,13 +340,6 @@ const EditTabs = props => {
|
||||||
component: <EditChartController />
|
component: <EditChartController />
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(inToc) {
|
|
||||||
editors.push({
|
|
||||||
caption: _t.textTableOfCont,
|
|
||||||
id: 'edit-table-contents',
|
|
||||||
component: <EditTableContentsController />
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (settings.indexOf('hyperlink') > -1) {
|
if (settings.indexOf('hyperlink') > -1) {
|
||||||
editors.push({
|
editors.push({
|
||||||
caption: _t.textHyperlink,
|
caption: _t.textHyperlink,
|
||||||
|
|
|
@ -193,7 +193,6 @@ const EditParagraph = props => {
|
||||||
const curStyleName = storeParagraphSettings.styleName;
|
const curStyleName = storeParagraphSettings.styleName;
|
||||||
const curStyle = paragraphStyles.find(style => style.name === curStyleName);
|
const curStyle = paragraphStyles.find(style => style.name === curStyleName);
|
||||||
const thumbSize = storeParagraphSettings.styleThumbSize;
|
const thumbSize = storeParagraphSettings.styleThumbSize;
|
||||||
|
|
||||||
const paragraph = props.storeFocusObjects.paragraphObject;
|
const paragraph = props.storeFocusObjects.paragraphObject;
|
||||||
const curBackColor = storeParagraphSettings.backColor ? storeParagraphSettings.backColor : storeParagraphSettings.getBackgroundColor(paragraph);
|
const curBackColor = storeParagraphSettings.backColor ? storeParagraphSettings.backColor : storeParagraphSettings.getBackgroundColor(paragraph);
|
||||||
const background = curBackColor !== 'transparent' ? `#${(typeof curBackColor === "object" ? curBackColor.color : curBackColor)}` : '';
|
const background = curBackColor !== 'transparent' ? `#${(typeof curBackColor === "object" ? curBackColor.color : curBackColor)}` : '';
|
||||||
|
@ -203,14 +202,14 @@ const EditParagraph = props => {
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<BlockTitle>{t('Edit.textParagraphStyle')}</BlockTitle>
|
<BlockTitle>{t('Edit.textParagraphStyle')}</BlockTitle>
|
||||||
<List className={activeStyle} style={{marginBottom: 0}}>
|
<List className={activeStyle} style={{marginBottom: 0}}>
|
||||||
<ListItem link="/edit-paragraph-style/" routeProps={{
|
<ListItem link="/edit-paragraph-style/" title={!curStyle && curStyleName} routeProps={{
|
||||||
onStyleClick: props.onStyleClick,
|
onStyleClick: props.onStyleClick,
|
||||||
onSaveStyle: props.onSaveStyle,
|
onSaveStyle: props.onSaveStyle,
|
||||||
onStyleMenuDelete: props.onStyleMenuDelete
|
onStyleMenuDelete: props.onStyleMenuDelete
|
||||||
}}>
|
}}>
|
||||||
<div slot="inner"
|
{curStyle &&
|
||||||
style={{backgroundImage: 'url(' + curStyle.image + ')', width: thumbSize.width + 'px', height: thumbSize.height + 'px', backgroundSize: thumbSize.width + 'px ' + thumbSize.height + 'px', backgroundRepeat: 'no-repeat'}}
|
<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>
|
||||||
></div>
|
}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<List>
|
<List>
|
||||||
|
|
|
@ -8,8 +8,12 @@ const NavigationPopover = props => {
|
||||||
const _t = t('Settings', {returnObjects: true});
|
const _t = t('Settings', {returnObjects: true});
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const navigationObject = api.asc_ShowDocumentOutline();
|
const navigationObject = api.asc_ShowDocumentOutline();
|
||||||
const [currentPosition, setCurrentPosition] = useState(navigationObject.get_CurrentPosition());
|
const [currentPosition, setCurrentPosition] = useState(navigationObject ? navigationObject.get_CurrentPosition() : null);
|
||||||
const arrHeaders = props.updateNavigation();
|
let arrHeaders = [];
|
||||||
|
|
||||||
|
if(currentPosition) {
|
||||||
|
arrHeaders = props.updateNavigation();
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
@ -39,8 +43,12 @@ const NavigationSheet = props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const navigationObject = api.asc_ShowDocumentOutline();
|
const navigationObject = api.asc_ShowDocumentOutline();
|
||||||
const [currentPosition, setCurrentPosition] = useState(navigationObject.get_CurrentPosition());
|
const [currentPosition, setCurrentPosition] = useState(navigationObject ? navigationObject.get_CurrentPosition() : null);
|
||||||
const arrHeaders = props.updateNavigation();
|
let arrHeaders = [];
|
||||||
|
|
||||||
|
if(currentPosition) {
|
||||||
|
arrHeaders = props.updateNavigation();
|
||||||
|
}
|
||||||
|
|
||||||
const [stateHeight, setHeight] = useState('45%');
|
const [stateHeight, setHeight] = useState('45%');
|
||||||
const [stateOpacity, setOpacity] = useState(1);
|
const [stateOpacity, setOpacity] = useState(1);
|
||||||
|
|
|
@ -93,14 +93,22 @@ const CellEditor = inject("storeFunctions")(observer(props => {
|
||||||
|
|
||||||
return {name, type, descr, caption, args};
|
return {name, type, descr, caption, args};
|
||||||
});
|
});
|
||||||
|
|
||||||
setHintArr(hintArr);
|
|
||||||
setFuncArr(funcArr);
|
setFuncArr(funcArr);
|
||||||
|
setHintArr(hintArr);
|
||||||
|
|
||||||
f7.popover.open('#idx-functions-list', '#idx-list-target');
|
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 {
|
} else {
|
||||||
f7.popover.close('#idx-functions-list');
|
f7.popover.close('#idx-functions-list');
|
||||||
setFuncArr('');
|
setFuncArr('');
|
||||||
|
setHintArr('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue