diff --git a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx index 09ae62fec..79f782f80 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx @@ -1,9 +1,21 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import CellEditorView from '../view/CellEditor'; const CellEditor = props => { - return + useEffect(() => { + Common.Notifications.on('engineCreated', api => { + api.asc_registerCallback('asc_onSelectionNameChanged', onApiCellSelection.bind(this)); + }); + }, []); + + const [cellName, setCellName] = useState(''); + + const onApiCellSelection = info => { + setCellName(typeof(info)=='string' ? info : info.asc_getName()); + }; + + return }; export default CellEditor; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/less/celleditor.less b/apps/spreadsheeteditor/mobile/src/less/celleditor.less index fbb524834..a66ba45ff 100644 --- a/apps/spreadsheeteditor/mobile/src/less/celleditor.less +++ b/apps/spreadsheeteditor/mobile/src/less/celleditor.less @@ -3,8 +3,15 @@ @cellEditorExpandedHeight: 70px; @contentBackColor: #fff; @gray-light: #f1f1f1; +@gray-darker: #848484; //rgb(132, 132, 132) +@statusBarBorderColor: #cbcbcb; #idx-celleditor { + box-sizing: border-box; + * { + box-sizing: border-box; + } + display: flex; height: @cellEditorHeight; @@ -34,10 +41,31 @@ } #box-cell-name { + display: inline-flex; background-color: var(--f7-navbar-bg-color); } - #ce-cell-content { + #idx-cell-name { + display: inline-block; + width: 90px; + padding: 0 4px; + border: 0 none; + line-height: 30px; + //font-size: 17px; + text-align: center; + + &[disabled] { + color: @gray-darker; + opacity: 0.5; + } + } + + #idx-btn-function { + line-height: @cellEditorHeight; + padding: 0 10px; + } + + #idx-cell-content { padding: 3px 3px; line-height: 1.428571429; color: #000; @@ -76,4 +104,9 @@ } } } + + .group--content { + position: relative; + .hairline(left, @statusBarBorderColor); + } } diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index 68d939427..e9b889a78 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -19,13 +19,16 @@ const CellEditorView = props => { return
- F(x) + {props.cellName} + + +
-
- +
+