Merge pull request #1212 from ONLYOFFICE/feature/fix-bug-react
Feature/fix bug react
This commit is contained in:
commit
40e68b5afb
|
@ -73,13 +73,8 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
.add-image {
|
.add-image, .inputs-list {
|
||||||
ul:before, :after{
|
ul:after, :before{
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.inputs-list {
|
|
||||||
ul:after {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|
||||||
|
&:before{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ const PageLinkSettings = props => {
|
||||||
<Page>
|
<Page>
|
||||||
<Navbar title={_t.textLinkSettings} backLink={_t.textBack}></Navbar>
|
<Navbar title={_t.textLinkSettings} backLink={_t.textBack}></Navbar>
|
||||||
<BlockTitle>{_t.textAddress}</BlockTitle>
|
<BlockTitle>{_t.textAddress}</BlockTitle>
|
||||||
<List className='inputs-list'>
|
<List className='add-image'>
|
||||||
<ListInput
|
<ListInput
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={_t.textImageURL}
|
placeholder={_t.textImageURL}
|
||||||
|
|
|
@ -508,7 +508,13 @@ const EditShape = props => {
|
||||||
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
|
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
|
||||||
const shapeObject = props.storeFocusObjects.shapeObject;
|
const shapeObject = props.storeFocusObjects.shapeObject;
|
||||||
const wrapType = props.storeShapeSettings.getWrapType(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;
|
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -533,9 +539,11 @@ const EditShape = props => {
|
||||||
onOverlap: props.onOverlap,
|
onOverlap: props.onOverlap,
|
||||||
onWrapDistance: props.onWrapDistance
|
onWrapDistance: props.onWrapDistance
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
|
{ !hideChangeType &&
|
||||||
onReplace: props.onReplace
|
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
|
||||||
}}></ListItem>
|
onReplace: props.onReplace
|
||||||
|
}}></ListItem>
|
||||||
|
}
|
||||||
{ wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
|
{ wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
|
||||||
onReorder: props.onReorder
|
onReorder: props.onReorder
|
||||||
}}></ListItem> }
|
}}></ListItem> }
|
||||||
|
|
|
@ -174,10 +174,8 @@ const PageDocumentColorSchemes = props => {
|
||||||
return (
|
return (
|
||||||
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
if(index !== curScheme) {
|
setScheme(index);
|
||||||
setScheme(index);
|
setTimeout(() => props.onColorSchemeChange(index), 10);
|
||||||
props.onColorSchemeChange(index);
|
|
||||||
};
|
|
||||||
}}>
|
}}>
|
||||||
<div slot="before-title">
|
<div slot="before-title">
|
||||||
<span className="color-schema-block">
|
<span className="color-schema-block">
|
||||||
|
|
|
@ -12,6 +12,12 @@ const EditShape = props => {
|
||||||
const shapeObject = storeFocusObjects.shapeObject;
|
const shapeObject = storeFocusObjects.shapeObject;
|
||||||
const canFill = shapeObject && shapeObject.get_CanFill();
|
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;
|
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -30,9 +36,12 @@ const EditShape = props => {
|
||||||
onBorderColor: props.onBorderColor
|
onBorderColor: props.onBorderColor
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
}
|
}
|
||||||
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
|
{ !hideChangeType &&
|
||||||
onReplace: props.onReplace
|
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
|
||||||
}}></ListItem>
|
onReplace: props.onReplace
|
||||||
|
}}></ListItem>
|
||||||
|
}
|
||||||
|
|
||||||
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
|
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
|
||||||
onReorder: props.onReorder
|
onReorder: props.onReorder
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
|
|
|
@ -56,10 +56,8 @@ const PagePresentationColorSchemes = props => {
|
||||||
return (
|
return (
|
||||||
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
if(index !== curScheme) {
|
setScheme(index);
|
||||||
setScheme(index);
|
setTimeout(() => props.onColorSchemeChange(index), 10);
|
||||||
props.onColorSchemeChange(index);
|
|
||||||
};
|
|
||||||
}}>
|
}}>
|
||||||
<div slot="before-title">
|
<div slot="before-title">
|
||||||
<span className="color-schema-block">
|
<span className="color-schema-block">
|
||||||
|
|
|
@ -114,13 +114,24 @@ class ContextMenu extends ContextMenuController {
|
||||||
|
|
||||||
onMergeCells() {
|
onMergeCells() {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
const _t = t("ContextMenu", { returnObjects: true });
|
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
if (api.asc_mergeCellsDataLost(Asc.c_oAscMergeOptions.Merge)) {
|
if (api.asc_mergeCellsDataLost(Asc.c_oAscMergeOptions.Merge)) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
f7.dialog.confirm(_t.warnMergeLostData, _t.notcriticalErrorTitle, () => {
|
f7.dialog.create({
|
||||||
api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge);
|
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);
|
}, 0);
|
||||||
} else {
|
} else {
|
||||||
api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge);
|
api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge);
|
||||||
|
|
|
@ -12,6 +12,12 @@ const EditShape = props => {
|
||||||
const shapeObject = storeFocusObjects.shapeObject;
|
const shapeObject = storeFocusObjects.shapeObject;
|
||||||
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
|
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;
|
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -30,9 +36,11 @@ const EditShape = props => {
|
||||||
onBorderColor: props.onBorderColor
|
onBorderColor: props.onBorderColor
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
}
|
}
|
||||||
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
|
{ !hideChangeType &&
|
||||||
onReplace: props.onReplace
|
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
|
||||||
}}></ListItem>
|
onReplace: props.onReplace
|
||||||
|
}}></ListItem>
|
||||||
|
}
|
||||||
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
|
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
|
||||||
onReorder: props.onReorder
|
onReorder: props.onReorder
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
|
|
|
@ -29,10 +29,8 @@ const PageSpreadsheetColorSchemes = props => {
|
||||||
return (
|
return (
|
||||||
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
<ListItem radio={true} className="color-schemes-menu no-fastclick" key={index} title={(index < 22) ? (SchemeNames[index] || name) : name} checked={stateScheme === index}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
if(index !== curScheme) {
|
setScheme(index);
|
||||||
setScheme(index);
|
setTimeout(() => props.onColorSchemeChange(index), 15);
|
||||||
props.onColorSchemeChange(index);
|
|
||||||
};
|
|
||||||
}}>
|
}}>
|
||||||
<div slot="before-title">
|
<div slot="before-title">
|
||||||
<span className="color-schema-block">
|
<span className="color-schema-block">
|
||||||
|
|
Loading…
Reference in a new issue