Merge pull request #1400 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2021-12-08 19:31:26 +03:00 committed by GitHub
commit 39731791c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 39 deletions

View file

@ -10,7 +10,7 @@ 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>
@ -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}

View file

@ -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,12 +516,21 @@ 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 ?
{!fixedSize ?
canFill ?
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
onFillColor: props.onFillColor,
onBorderSize: props.onBorderSize,
@ -531,7 +541,7 @@ const EditShape = props => {
onBorderSize: props.onBorderSize,
onBorderColor: props.onBorderColor
}}></ListItem>
}
: null}
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
onWrapType: props.onWrapType,
onShapeAlign: props.onShapeAlign,
@ -539,7 +549,7 @@ 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>

View file

@ -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) {
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('text') > -1) {
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
if (settings.indexOf('chart') > -1) {
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('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
editors.push({
caption: _t.textHyperlink,