diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 41f856066..d14b0f595 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -878,12 +878,10 @@ input[type="number"]::-webkit-inner-spin-button { } .functions-list { - width: 100%; - height: 150px; + height: 175px; overflow-y: auto; position: absolute; top: 30px; - left: 0; right: 0; background-color: @white; .list { @@ -898,7 +896,7 @@ input[type="number"]::-webkit-inner-spin-button { padding-left: calc(var(--f7-list-item-padding-horizontal) + var(--f7-safe-area-left) - var(--menu-list-offset)); } .item-title { - font-size: 14px; + font-size: 15px; } } } diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index ff08cd9fc..bdafdfa0e 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -1,7 +1,10 @@ import React, { useState } from 'react'; -import { Input, View, Button, Link, Popover, ListItem, List } from 'framework7-react'; +import { Input, View, Button, Link, Popover, ListItem, List, Icon, f7 } from 'framework7-react'; import {observer, inject} from "mobx-react"; +// import {PageFunctionInfo} from "./add/AddFunction"; +import { __interactionsRef } from 'scheduler/tracing'; +import { Device } from '../../../../common/mobile/utils/device'; const viewStyle = { height: 30 @@ -13,7 +16,10 @@ const contentStyle = { const CellEditorView = props => { const [expanded, setExpanded] = useState(false); + const isPhone = Device.isPhone; const storeAppOptions = props.storeAppOptions; + const storeFunctions = props.storeFunctions; + const functions = storeFunctions.functions; const isEdit = storeAppOptions.isEdit; const funcArr = props.funcArr; @@ -35,11 +41,28 @@ const CellEditorView = props => { {funcArr && funcArr.length && -
+
{funcArr.map((elem, index) => { return ( - props.insertFormula(elem.name, elem.type)}> + props.insertFormula(elem.name, elem.type)}> +
{ + e.stopPropagation(); + let functionInfo = functions[elem.name]; + + if(functionInfo) { + f7.dialog.create({ + title: functionInfo.caption, + content: `

${functionInfo.caption} ${functionInfo.args}

+

${functionInfo.descr}

`, + buttons: [{text: 'Ok'}] + }).open(); + } + }}> + +
+
) })}
@@ -48,4 +71,4 @@ const CellEditorView = props => { ; }; -export default inject("storeAppOptions")(observer(CellEditorView)); +export default inject("storeAppOptions", "storeFunctions")(observer(CellEditorView));