[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 /> component: <EmptyEditLayout />
}); });
} else { } else {
if (settings.indexOf('text') > -1) { if (settings.indexOf('image') > -1) {
editors.push({ editors.push({
caption: _t.textText, caption: _t.textImage,
id: 'edit-text', id: 'edit-image',
component: <EditTextController /> component: <EditImageController />
}) })
} }
if (settings.indexOf('paragraph') > -1) { if (settings.indexOf('shape') > -1) {
editors.push({ editors.push({
caption: _t.textParagraph, caption: _t.textShape,
id: 'edit-paragraph', id: 'edit-shape',
component: <EditParagraphController /> component: <EditShapeController />
})
}
if (settings.indexOf('chart') > -1) {
editors.push({
caption: _t.textChart,
id: 'edit-chart',
component: <EditChartController />
}) })
} }
if (settings.indexOf('table') > -1) { if (settings.indexOf('table') > -1) {
@ -312,27 +319,6 @@ const EditTabs = props => {
component: <EditHeaderController /> 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) { if(inToc) {
editors.push({ editors.push({
caption: _t.textTableOfCont, caption: _t.textTableOfCont,
@ -340,11 +326,18 @@ const EditTabs = props => {
component: <EditTableContentsController /> component: <EditTableContentsController />
}) })
} }
if (settings.indexOf('hyperlink') > -1) { if (settings.indexOf('paragraph') > -1) {
editors.push({ editors.push({
caption: _t.textHyperlink, caption: _t.textParagraph,
id: 'edit-link', id: 'edit-paragraph',
component: <EditHyperlinkController /> 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 /> component: <EmptyEditLayout />
}); });
} else { } else {
if (settings.indexOf('slide') > -1) { if (settings.indexOf('image') > -1) {
editors.push({ editors.push({
caption: _t.textSlide, caption: _t.textImage,
id: 'edit-slide', id: 'edit-image',
component: <EditSlideController /> component: <EditImageController />
})
}
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
}) })
} }
if (settings.indexOf('shape') > -1) { if (settings.indexOf('shape') > -1) {
@ -310,13 +303,6 @@ const EditTabs = props => {
component: <EditShapeController /> component: <EditShapeController />
}) })
} }
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('table') > -1) { if (settings.indexOf('table') > -1) {
editors.push({ editors.push({
caption: _t.textTable, caption: _t.textTable,
@ -331,11 +317,18 @@ const EditTabs = props => {
component: <EditChartController /> component: <EditChartController />
}) })
} }
if (settings.indexOf('hyperlink') > -1) { if (settings.indexOf('text') > -1) {
editors.push({ editors.push({
caption: _t.textHyperlink, caption: _t.textText,
id: 'edit-link', id: 'edit-text',
component: <EditLinkController /> 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 /> component: <EmptyEditLayout />
}); });
} else { } else {
if (settings.indexOf('cell') > -1) { if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) {
editors.push({ editors.push({
caption: _t.textCell, caption: _t.textImage,
id: 'edit-text', id: 'edit-image',
component: <EditCellController /> component: <EditImageController />
}) })
} }
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) { if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) {
@ -377,11 +377,11 @@ const EditTabs = props => {
component: <EditShapeController /> component: <EditShapeController />
}) })
} }
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { if (settings.indexOf('cell') > -1) {
editors.push({ editors.push({
caption: _t.textText, caption: _t.textCell,
id: 'edit-text', id: 'edit-text',
component: <EditTextController /> component: <EditCellController />
}) })
} }
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) { if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) {
@ -391,22 +391,23 @@ const EditTabs = props => {
component: <EditChartController /> component: <EditChartController />
}) })
} }
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
editors.push({ editors.push({
caption: _t.textImage, caption: _t.textText,
id: 'edit-image', id: 'edit-text',
component: <EditImageController /> component: <EditTextController />
}) })
} }
if(!wsProps.Objects) {
if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { // if(!wsProps.Objects) {
editors.push({ // if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
caption: _t.textHyperlink, // editors.push({
id: 'edit-link', // caption: _t.textHyperlink,
component: <EditLinkController /> // id: 'edit-link',
}) // component: <EditLinkController />
} // })
} // }
// }
} }
if(!editors.length) { if(!editors.length) {