Merge pull request #1212 from ONLYOFFICE/feature/fix-bug-react

Feature/fix bug react
This commit is contained in:
maxkadushkin 2021-10-04 23:28:35 +03:00 committed by GitHub
commit 40e68b5afb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 63 additions and 34 deletions

View file

@ -73,13 +73,8 @@
margin-bottom: 0;
margin-top: 8px;
}
.add-image {
ul:before, :after{
display: none;
}
}
.inputs-list {
ul:after {
.add-image, .inputs-list {
ul:after, :before{
display: none;
}
}

View file

@ -43,6 +43,10 @@
height: auto;
display: block;
line-height: normal;
&:before{
display: none;
}
}
}

View file

@ -11,7 +11,7 @@ const PageLinkSettings = props => {
<Page>
<Navbar title={_t.textLinkSettings} backLink={_t.textBack}></Navbar>
<BlockTitle>{_t.textAddress}</BlockTitle>
<List className='inputs-list'>
<List className='add-image'>
<ListInput
type='text'
placeholder={_t.textImageURL}

View file

@ -509,6 +509,12 @@ const EditShape = props => {
const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = !!props.storeFocusObjects.paragraphObject;
return (
@ -533,9 +539,11 @@ const EditShape = props => {
onOverlap: props.onOverlap,
onWrapDistance: props.onWrapDistance
}}></ListItem>
{ !hideChangeType &&
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
{ wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
onReorder: props.onReorder
}}></ListItem> }

View file

@ -174,10 +174,8 @@ const PageDocumentColorSchemes = props => {
return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => {
if(index !== curScheme) {
setScheme(index);
props.onColorSchemeChange(index);
};
setTimeout(() => props.onColorSchemeChange(index), 10);
}}>
<div slot="before-title">
<span className="color-schema-block">

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_CanFill();
const shapeType = shapeObject.asc_getType();
const hideChangeType = shapeObject.get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = !!props.storeFocusObjects.paragraphObject;
return (
@ -30,9 +36,12 @@ const EditShape = props => {
onBorderColor: props.onBorderColor
}}></ListItem>
}
{ !hideChangeType &&
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder
}}></ListItem>

View file

@ -56,10 +56,8 @@ const PagePresentationColorSchemes = props => {
return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => {
if(index !== curScheme) {
setScheme(index);
props.onColorSchemeChange(index);
};
setTimeout(() => props.onColorSchemeChange(index), 10);
}}>
<div slot="before-title">
<span className="color-schema-block">

View file

@ -114,13 +114,24 @@ class ContextMenu extends ContextMenuController {
onMergeCells() {
const { t } = this.props;
const _t = t("ContextMenu", { returnObjects: true });
const api = Common.EditorApi.get();
if (api.asc_mergeCellsDataLost(Asc.c_oAscMergeOptions.Merge)) {
setTimeout(() => {
f7.dialog.confirm(_t.warnMergeLostData, _t.notcriticalErrorTitle, () => {
f7.dialog.create({
title: t('ContextMenu.notcriticalErrorTitle'),
text: t('ContextMenu.warnMergeLostData'),
buttons: [
{
text: t('ContextMenu.menuCancel')
},
{
text: 'OK',
onClick: () => {
api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge);
});
}
}
]
}).open();
}, 0);
} else {
api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge);

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
return (
@ -30,9 +36,11 @@ const EditShape = props => {
onBorderColor: props.onBorderColor
}}></ListItem>
}
{ !hideChangeType &&
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder
}}></ListItem>

View file

@ -29,10 +29,8 @@ const PageSpreadsheetColorSchemes = props => {
return (
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
onChange={() => {
if(index !== curScheme) {
setScheme(index);
props.onColorSchemeChange(index);
};
setTimeout(() => props.onColorSchemeChange(index), 15);
}}>
<div slot="before-title">
<span className="color-schema-block">