From 3c05927fbc8621ca121b4df1cbe2de877f22c363 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 26 May 2021 14:45:05 +0300 Subject: [PATCH 1/7] Fix Bug 48186 --- apps/common/mobile/resources/less/common.less | 1 + apps/common/mobile/resources/less/dataview.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 0b2f9ae4b..5a0e5d461 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -484,6 +484,7 @@ .row { &, li { margin-bottom: 12px; + padding-left: 5px; } } diff --git a/apps/common/mobile/resources/less/dataview.less b/apps/common/mobile/resources/less/dataview.less index 104d04836..25e7a9c64 100644 --- a/apps/common/mobile/resources/less/dataview.less +++ b/apps/common/mobile/resources/less/dataview.less @@ -2,7 +2,7 @@ .dataview { .row { - justify-content: space-around; + justify-content: flex-start; } ul { From c51221e46e2397386e9de88a974dfd3c5282d8f2 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 26 May 2021 20:25:04 +0300 Subject: [PATCH 2/7] Fix Bug 48186 addition --- apps/common/mobile/resources/less/common.less | 7 ++- .../mobile/resources/less/dataview.less | 2 +- .../mobile/src/view/edit/EditTable.jsx | 43 ++++++------------- 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 5a0e5d461..ae4d8caa4 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -484,7 +484,6 @@ .row { &, li { margin-bottom: 12px; - padding-left: 5px; } } @@ -500,6 +499,12 @@ } } +#edit-table-style { + .list ul ul { + padding-left: 0; + } +} + // Cell styles .cell-styles-list { diff --git a/apps/common/mobile/resources/less/dataview.less b/apps/common/mobile/resources/less/dataview.less index 25e7a9c64..104d04836 100644 --- a/apps/common/mobile/resources/less/dataview.less +++ b/apps/common/mobile/resources/less/dataview.less @@ -2,7 +2,7 @@ .dataview { .row { - justify-content: flex-start; + justify-content: space-around; } ul { diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index bd0544906..d100f60fe 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -7,45 +7,30 @@ import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile // Style -const StyleTemplates = inject("storeFocusObjects")(observer(({templates, onStyleClick, storeFocusObjects}) => { +const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer(({onStyleClick,storeTableSettings,storeFocusObjects}) => { const tableObject = storeFocusObjects.tableObject; const styleId = tableObject ? tableObject.get_TableStyle() : null; const [stateId, setId] = useState(styleId); - - const widthContainer = document.querySelector(".page-content").clientWidth; - const columns = parseInt((widthContainer - 47) / 70); // magic - const styles = []; - let row = -1; - templates.forEach((style, index) => { - if (0 == index % columns) { - styles.push([]); - row++ - } - styles[row].push(style); - }); + const styles = storeTableSettings.styles; if (!tableObject && Device.phone) { $$('.sheet-modal.modal-in').length > 0 && f7.sheet.close(); return null; } - + return (
- {styles.map((row, rowIndex) => { - return ( -
- {row.map((style, index)=>{ - return( -
{onStyleClick(style.templateId); setId(style.templateId)}}> - -
- ) - })} -
- ) - })} +
    + {styles.map((style, index) => { + return ( +
  • {onStyleClick(style.templateId); setId(style.templateId)}}> + +
  • + ) + })} +
) })); From a65bb211d71342218d5047aa8e48bf7e05fe1471 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 27 May 2021 12:28:16 +0300 Subject: [PATCH 3/7] Fix Bug 48186 doc --- .../mobile/src/view/edit/EditTable.jsx | 41 ++++++------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index e1eb03bd4..0d7ed4c08 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -173,40 +173,25 @@ const PageWrap = props => { // Style -const StyleTemplates = inject("storeFocusObjects")(observer(({templates, onStyleClick, storeFocusObjects}) => { +const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer(({onStyleClick,storeTableSettings,storeFocusObjects}) => { const tableObject = storeFocusObjects.tableObject; const styleId = tableObject && tableObject.get_TableStyle(); const [stateId, setId] = useState(styleId); - - const widthContainer = document.querySelector(".page-content").clientWidth; - const columns = parseInt((widthContainer - 47) / 70); // magic - const styles = []; - let row = -1; - templates.forEach((style, index) => { - if (0 == index % columns) { - styles.push([]); - row++ - } - styles[row].push(style); - }); + const styles = storeTableSettings.styles; return (
- {styles.map((row, rowIndex) => { - return ( -
- {row.map((style, index)=>{ - return( -
{onStyleClick(style.templateId); setId(style.templateId)}}> - -
- ) - })} -
- ) - })} +
    + {styles.map((style, index) => { + return ( +
  • {onStyleClick(style.templateId); setId(style.templateId)}}> + +
  • + ) + })} +
) })); From 552362ed5542c03d128af7050574414683badfae Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 27 May 2021 20:54:43 +0300 Subject: [PATCH 4/7] Fix Bug 49343 --- apps/documenteditor/mobile/src/controller/ContextMenu.jsx | 8 +++++++- apps/documenteditor/mobile/src/controller/Error.jsx | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 136679559..54d0b7c63 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -25,6 +25,7 @@ class ContextMenu extends ContextMenuController { this.onApiHideComment = this.onApiHideComment.bind(this); this.onApiShowChange = this.onApiShowChange.bind(this); this.getUserName = this.getUserName.bind(this); + this.ShowModal = this.ShowModal.bind(this); } static closeContextMenu() { @@ -43,9 +44,13 @@ class ContextMenu extends ContextMenuController { api.asc_unregisterCallback('asc_onShowComment', this.onApiShowComment); api.asc_unregisterCallback('asc_onHideComment', this.onApiHideComment); api.asc_unregisterCallback('asc_onShowRevisionsChange', this.onApiShowChange); + Common.Notifications.off('showSplitModal', this.ShowModal); } - + ShowModal() { + this.showSplitModal() + } + onApiShowComment(comments) { this.isComments = comments && comments.length > 0; } @@ -199,6 +204,7 @@ class ContextMenu extends ContextMenuController { api.asc_registerCallback('asc_onShowComment', this.onApiShowComment); api.asc_registerCallback('asc_onHideComment', this.onApiHideComment); api.asc_registerCallback('asc_onShowRevisionsChange', this.onApiShowChange); + Common.Notifications.on('showSplitModal', this.ShowModal); } initMenuItems() { diff --git a/apps/documenteditor/mobile/src/controller/Error.jsx b/apps/documenteditor/mobile/src/controller/Error.jsx index ff499f251..21b8d35e4 100644 --- a/apps/documenteditor/mobile/src/controller/Error.jsx +++ b/apps/documenteditor/mobile/src/controller/Error.jsx @@ -199,14 +199,18 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu Common.Gateway.reportWarning(id, config.msg); config.title = _t.notcriticalErrorTitle; + config.callback = (btn) => { if (id === Asc.c_oAscError.ID.Warning && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) { api.asc_DownloadOrigin(); + } else if(id === Asc.c_oAscError.ID.SplitCellMaxRows || + Asc.c_oAscError.ID.SplitCellMaxCols || + Asc.c_oAscError.ID.SplitCellRowsDivider && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) { + Common.Notifications.trigger('showSplitModal',true); } storeAppOptions.changeEditingRights(false); }; } - f7.dialog.create({ cssClass: 'error-dialog', title : config.title, From 06da18294a05b55dbba5488fd0aa559da904d263 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 12:51:18 +0300 Subject: [PATCH 5/7] Disable button in doc --- apps/documenteditor/mobile/src/view/edit/EditShape.jsx | 7 ++++++- apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index 093bb735a..c3abf01c9 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -507,6 +507,10 @@ const EditShape = props => { const storeShapeSettings = props.storeShapeSettings; const shapeObject = props.storeFocusObjects.shapeObject; const wrapType = storeShapeSettings.getWrapType(shapeObject); + + let setDisabled = true; + props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false; + return ( @@ -537,7 +541,8 @@ const EditShape = props => { }}> - {props.onRemoveShape()}} className='button-red button-fill button-raised'/> + {props.onRemoveShape()}} + className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} /> ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx index f4fcb7c19..67540141e 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx @@ -11,6 +11,7 @@ const EditShape = props => { const storeFocusObjects = props.storeFocusObjects; const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); + let setDisabled = true; return ( From a7e8f1812e4738378fad9972a2ebfb3d4324bb83 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 15:50:56 +0300 Subject: [PATCH 6/7] Fix Bug 44360 --- apps/documenteditor/mobile/src/view/edit/EditShape.jsx | 7 +++---- apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index c3abf01c9..60dff3262 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -507,9 +507,8 @@ const EditShape = props => { const storeShapeSettings = props.storeShapeSettings; const shapeObject = props.storeFocusObjects.shapeObject; const wrapType = storeShapeSettings.getWrapType(shapeObject); - - let setDisabled = true; - props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false; + + let disableRemove = !!props.storeFocusObjects.paragraphObject; return ( @@ -542,7 +541,7 @@ const EditShape = props => { {props.onRemoveShape()}} - className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} /> + className={`button-red button-fill button-raised ${disableRemove ? 'disabled' : ''}`} /> ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx index 67540141e..f2e77639f 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx @@ -11,7 +11,8 @@ const EditShape = props => { const storeFocusObjects = props.storeFocusObjects; const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); - let setDisabled = true; + + let disableRemove = storeFocusObjects.selections.indexOf('text') > -1; return ( @@ -37,7 +38,8 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} ) From ac56abf8d3598673cd179461e76b5396c12b05ec Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 16:52:34 +0300 Subject: [PATCH 7/7] Fix Bug 44360 presentation --- apps/presentationeditor/mobile/src/view/edit/EditShape.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx index 5f93af329..82560418d 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx @@ -12,6 +12,8 @@ const EditShape = props => { const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_CanFill(); + let disableRemove = !!props.storeFocusObjects.paragraphObject; + return ( @@ -39,7 +41,8 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} )