[DE PE SSE mobile] Changed order edit tabs

This commit is contained in:
SergeyEzhin 2022-06-09 15:37:57 +04:00
parent 3225ab3d0a
commit 09512d4c4f
3 changed files with 62 additions and 75 deletions

View file

@ -284,18 +284,25 @@ const EditTabs = props => {
component: <EmptyEditLayout />
});
} else {
if (settings.indexOf('text') > -1) {
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('paragraph') > -1) {
if (settings.indexOf('shape') > -1) {
editors.push({
caption: _t.textParagraph,
id: 'edit-paragraph',
component: <EditParagraphController />
caption: _t.textShape,
id: 'edit-shape',
component: <EditShapeController />
})
}
if (settings.indexOf('chart') > -1) {
editors.push({
caption: _t.textChart,
id: 'edit-chart',
component: <EditChartController />
})
}
if (settings.indexOf('table') > -1) {
@ -312,27 +319,6 @@ const EditTabs = props => {
component: <EditHeaderController />
})
}
if (settings.indexOf('shape') > -1) {
editors.push({
caption: _t.textShape,
id: 'edit-shape',
component: <EditShapeController />
})
}
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('chart') > -1) {
editors.push({
caption: _t.textChart,
id: 'edit-chart',
component: <EditChartController />
})
}
if(inToc) {
editors.push({
caption: _t.textTableOfCont,
@ -340,11 +326,18 @@ const EditTabs = props => {
component: <EditTableContentsController />
})
}
if (settings.indexOf('hyperlink') > -1) {
if (settings.indexOf('paragraph') > -1) {
editors.push({
caption: _t.textHyperlink,
id: 'edit-link',
component: <EditHyperlinkController />
caption: _t.textParagraph,
id: 'edit-paragraph',
component: <EditParagraphController />
})
}
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
}

View file

@ -289,18 +289,11 @@ const EditTabs = props => {
component: <EmptyEditLayout />
});
} else {
if (settings.indexOf('slide') > -1) {
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textSlide,
id: 'edit-slide',
component: <EditSlideController />
})
}
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('shape') > -1) {
@ -310,13 +303,6 @@ const EditTabs = props => {
component: <EditShapeController />
})
}
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('table') > -1) {
editors.push({
caption: _t.textTable,
@ -331,11 +317,18 @@ const EditTabs = props => {
component: <EditChartController />
})
}
if (settings.indexOf('hyperlink') > -1) {
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textHyperlink,
id: 'edit-link',
component: <EditLinkController />
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
if (settings.indexOf('slide') > -1) {
editors.push({
caption: _t.textSlide,
id: 'edit-slide',
component: <EditSlideController />
})
}
}

View file

@ -363,11 +363,11 @@ const EditTabs = props => {
component: <EmptyEditLayout />
});
} else {
if (settings.indexOf('cell') > -1) {
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) {
editors.push({
caption: _t.textCell,
id: 'edit-text',
component: <EditCellController />
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) {
@ -377,11 +377,11 @@ const EditTabs = props => {
component: <EditShapeController />
})
}
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
if (settings.indexOf('cell') > -1) {
editors.push({
caption: _t.textText,
caption: _t.textCell,
id: 'edit-text',
component: <EditTextController />
component: <EditCellController />
})
}
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) {
@ -391,22 +391,23 @@ const EditTabs = props => {
component: <EditChartController />
})
}
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) {
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
if(!wsProps.Objects) {
if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
editors.push({
caption: _t.textHyperlink,
id: 'edit-link',
component: <EditLinkController />
})
}
}
// if(!wsProps.Objects) {
// if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
// editors.push({
// caption: _t.textHyperlink,
// id: 'edit-link',
// component: <EditLinkController />
// })
// }
// }
}
if(!editors.length) {