Merge pull request #1400 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
39731791c8
|
@ -10,8 +10,8 @@ const PageDropdownList = props => {
|
||||||
<Page>
|
<Page>
|
||||||
<List>
|
<List>
|
||||||
{listItems.length && listItems.map((elem, index) => (
|
{listItems.length && listItems.map((elem, index) => (
|
||||||
<ListItem key={index} className='no-indicator' title={elem.caption} onClick={() => props.onChangeItemList(elem.value)}></ListItem>
|
<ListItem key={index} className='no-indicator' style={index === 0 ? {opacity: 0.6} : null} title={elem.caption} onClick={() => props.onChangeItemList(elem.value)}></ListItem>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
</Page>
|
</Page>
|
||||||
</View>
|
</View>
|
||||||
|
@ -26,7 +26,7 @@ class DropdownListView extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
Device.isPhone ?
|
Device.isPhone ?
|
||||||
<Sheet id="dropdown-list-sheet" closeByOutsideClick={true} backdrop={false} closeByBackdropClick={false} swipeToStep={true} swipeToClose={true}>
|
<Sheet id="dropdown-list-sheet" closeByOutsideClick={true} backdrop={false} closeByBackdropClick={false} swipeToClose={true}>
|
||||||
<PageDropdownList
|
<PageDropdownList
|
||||||
listItems={this.props.listItems}
|
listItems={this.props.listItems}
|
||||||
onChangeItemList={this.props.onChangeItemList}
|
onChangeItemList={this.props.onChangeItemList}
|
||||||
|
|
|
@ -505,6 +505,7 @@ const PageReorder = props => {
|
||||||
const EditShape = props => {
|
const EditShape = props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t('Edit', {returnObjects: true});
|
const _t = t('Edit', {returnObjects: true});
|
||||||
|
const api = Common.EditorApi.get();
|
||||||
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);
|
||||||
|
@ -515,23 +516,32 @@ const EditShape = props => {
|
||||||
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
||||||
|| shapeType=='straightConnector1';
|
|| shapeType=='straightConnector1';
|
||||||
|
|
||||||
|
let controlProps = api && api.asc_IsContentControl() ? api.asc_GetContentControlProperties() : null,
|
||||||
|
fixedSize = false;
|
||||||
|
|
||||||
|
if (controlProps) {
|
||||||
|
let spectype = controlProps.get_SpecificType();
|
||||||
|
fixedSize = (spectype == Asc.c_oAscContentControlSpecificType.CheckBox || spectype == Asc. c_oAscContentControlSpecificType.ComboBox || spectype == Asc.c_oAscContentControlSpecificType.DropDownList || spectype == Asc.c_oAscContentControlSpecificType.None || spectype == Asc.c_oAscContentControlSpecificType.Picture) && controlProps.get_FormPr() && controlProps.get_FormPr().get_Fixed();
|
||||||
|
}
|
||||||
|
|
||||||
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<List>
|
<List>
|
||||||
{canFill ?
|
{!fixedSize ?
|
||||||
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
|
canFill ?
|
||||||
onFillColor: props.onFillColor,
|
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
|
||||||
onBorderSize: props.onBorderSize,
|
onFillColor: props.onFillColor,
|
||||||
onBorderColor: props.onBorderColor,
|
onBorderSize: props.onBorderSize,
|
||||||
onOpacity: props.onOpacity
|
onBorderColor: props.onBorderColor,
|
||||||
}}></ListItem> :
|
onOpacity: props.onOpacity
|
||||||
<ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{
|
}}></ListItem> :
|
||||||
onBorderSize: props.onBorderSize,
|
<ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{
|
||||||
onBorderColor: props.onBorderColor
|
onBorderSize: props.onBorderSize,
|
||||||
}}></ListItem>
|
onBorderColor: props.onBorderColor
|
||||||
}
|
}}></ListItem>
|
||||||
|
: null}
|
||||||
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
|
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
|
||||||
onWrapType: props.onWrapType,
|
onWrapType: props.onWrapType,
|
||||||
onShapeAlign: props.onShapeAlign,
|
onShapeAlign: props.onShapeAlign,
|
||||||
|
@ -539,12 +549,12 @@ const EditShape = props => {
|
||||||
onOverlap: props.onOverlap,
|
onOverlap: props.onOverlap,
|
||||||
onWrapDistance: props.onWrapDistance
|
onWrapDistance: props.onWrapDistance
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
{ !hideChangeType &&
|
{(!hideChangeType && !fixedSize) &&
|
||||||
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
|
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
|
||||||
onReplace: props.onReplace
|
onReplace: props.onReplace
|
||||||
}}></ListItem>
|
}}></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> }
|
||||||
</List>
|
</List>
|
||||||
|
|
|
@ -350,35 +350,35 @@ const EditTabs = props => {
|
||||||
component: <EditCellController />
|
component: <EditCellController />
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (!store.isLockedShape && settings.indexOf('shape') > -1) {
|
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) {
|
||||||
editors.push({
|
editors.push({
|
||||||
caption: _t.textShape,
|
caption: _t.textShape,
|
||||||
id: 'edit-shape',
|
id: 'edit-shape',
|
||||||
component: <EditShapeController />
|
component: <EditShapeController />
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
|
||||||
|
editors.push({
|
||||||
|
caption: _t.textText,
|
||||||
|
id: 'edit-text',
|
||||||
|
component: <EditTextController />
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) {
|
||||||
|
editors.push({
|
||||||
|
caption: _t.textChart,
|
||||||
|
id: 'edit-chart',
|
||||||
|
component: <EditChartController />
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) {
|
||||||
|
editors.push({
|
||||||
|
caption: _t.textImage,
|
||||||
|
id: 'edit-image',
|
||||||
|
component: <EditImageController />
|
||||||
|
})
|
||||||
|
}
|
||||||
if(!wsProps.Objects) {
|
if(!wsProps.Objects) {
|
||||||
if (settings.indexOf('image') > -1) {
|
|
||||||
editors.push({
|
|
||||||
caption: _t.textImage,
|
|
||||||
id: 'edit-image',
|
|
||||||
component: <EditImageController />
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (settings.indexOf('text') > -1) {
|
|
||||||
editors.push({
|
|
||||||
caption: _t.textText,
|
|
||||||
id: 'edit-text',
|
|
||||||
component: <EditTextController />
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (settings.indexOf('chart') > -1) {
|
|
||||||
editors.push({
|
|
||||||
caption: _t.textChart,
|
|
||||||
id: 'edit-chart',
|
|
||||||
component: <EditChartController />
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
|
if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
|
||||||
editors.push({
|
editors.push({
|
||||||
caption: _t.textHyperlink,
|
caption: _t.textHyperlink,
|
||||||
|
|
Loading…
Reference in a new issue