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>
|
||||
<List>
|
||||
{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>
|
||||
</Page>
|
||||
</View>
|
||||
|
@ -26,7 +26,7 @@ class DropdownListView extends Component {
|
|||
render() {
|
||||
return (
|
||||
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
|
||||
listItems={this.props.listItems}
|
||||
onChangeItemList={this.props.onChangeItemList}
|
||||
|
|
|
@ -505,6 +505,7 @@ const PageReorder = props => {
|
|||
const EditShape = props => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Edit', {returnObjects: true});
|
||||
const api = Common.EditorApi.get();
|
||||
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
|
||||
const shapeObject = props.storeFocusObjects.shapeObject;
|
||||
const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
|
||||
|
@ -515,23 +516,32 @@ const EditShape = props => {
|
|||
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
||||
|| 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;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<List>
|
||||
{canFill ?
|
||||
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
|
||||
onFillColor: props.onFillColor,
|
||||
onBorderSize: props.onBorderSize,
|
||||
onBorderColor: props.onBorderColor,
|
||||
onOpacity: props.onOpacity
|
||||
}}></ListItem> :
|
||||
<ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{
|
||||
onBorderSize: props.onBorderSize,
|
||||
onBorderColor: props.onBorderColor
|
||||
}}></ListItem>
|
||||
}
|
||||
{!fixedSize ?
|
||||
canFill ?
|
||||
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
|
||||
onFillColor: props.onFillColor,
|
||||
onBorderSize: props.onBorderSize,
|
||||
onBorderColor: props.onBorderColor,
|
||||
onOpacity: props.onOpacity
|
||||
}}></ListItem> :
|
||||
<ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{
|
||||
onBorderSize: props.onBorderSize,
|
||||
onBorderColor: props.onBorderColor
|
||||
}}></ListItem>
|
||||
: null}
|
||||
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
|
||||
onWrapType: props.onWrapType,
|
||||
onShapeAlign: props.onShapeAlign,
|
||||
|
@ -539,12 +549,12 @@ const EditShape = props => {
|
|||
onOverlap: props.onOverlap,
|
||||
onWrapDistance: props.onWrapDistance
|
||||
}}></ListItem>
|
||||
{ !hideChangeType &&
|
||||
{(!hideChangeType && !fixedSize) &&
|
||||
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
|
||||
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
|
||||
}}></ListItem> }
|
||||
</List>
|
||||
|
|
|
@ -350,35 +350,35 @@ const EditTabs = props => {
|
|||
component: <EditCellController />
|
||||
})
|
||||
}
|
||||
if (!store.isLockedShape && settings.indexOf('shape') > -1) {
|
||||
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) {
|
||||
editors.push({
|
||||
caption: _t.textShape,
|
||||
id: 'edit-shape',
|
||||
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 (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)) {
|
||||
editors.push({
|
||||
caption: _t.textHyperlink,
|
||||
|
|
Loading…
Reference in a new issue