Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedback from contextmenu dosn't work #278

Closed
fylo1 opened this issue Jul 19, 2024 · 3 comments
Closed

feedback from contextmenu dosn't work #278

fylo1 opened this issue Jul 19, 2024 · 3 comments

Comments

@fylo1
Copy link

fylo1 commented Jul 19, 2024

Updated to version 4.8 and feedback function from contextmenu dosn't work as in version 4.7

example:

[
    {
        "id": "0a1de5838c388b45",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1a1150ee0e9e9cc5",
        "type": "inject",
        "z": "0a1de5838c388b45",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 200,
        "y": 100,
        "wires": [
            [
                "9a16b23b0045a745"
            ]
        ]
    },
    {
        "id": "9a16b23b0045a745",
        "type": "function",
        "z": "0a1de5838c388b45",
        "name": "function 1",
        "func": "var menu = 'Add some data <input name=\"foo\" value=\"${foo}\" onBlur=\\'addToForm(this.name,this.value)\\'></input><br/>'\nmenu += 'Add more data <input name=\"bar\" value=\"${bar}\" onBlur=\\'addToForm(this.name,this.value)\\'></input><br/>'\nmenu += '<button name=\"my_form\" onclick=\\'feedback(this.name,\"_form\",null,true)\\'>Submit</button>'\nmsg.payload = { command: { \"contextmenu\":menu } }\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 420,
        "y": 100,
        "wires": [
            [
                "657ec106e5d44e19"
            ]
        ]
    },
    {
        "id": "ba37d829a5d23440",
        "type": "debug",
        "z": "0a1de5838c388b45",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 360,
        "y": 180,
        "wires": []
    },
    {
        "id": "657ec106e5d44e19",
        "type": "worldmap",
        "z": "0a1de5838c388b45",
        "name": "",
        "lat": "",
        "lon": "",
        "zoom": "",
        "layer": "",
        "cluster": "",
        "maxage": "",
        "usermenu": "show",
        "layers": "show",
        "panit": "false",
        "panlock": "false",
        "zoomlock": "false",
        "hiderightclick": "false",
        "coords": "false",
        "showgrid": "false",
        "showruler": "false",
        "allowFileDrop": "false",
        "path": "/worldmap",
        "overlist": "DR,CO,RA,DN",
        "maplist": "OSMG,OSMC,EsriC,EsriS,UKOS",
        "mapname": "",
        "mapurl": "",
        "mapopt": "",
        "mapwms": false,
        "x": 600,
        "y": 100,
        "wires": []
    },
    {
        "id": "3104bd1c3954c382",
        "type": "worldmap in",
        "z": "0a1de5838c388b45",
        "name": "",
        "path": "/worldmap",
        "events": "connect,disconnect,point,layer,bounds,files,draw,other",
        "x": 200,
        "y": 180,
        "wires": [
            [
                "ba37d829a5d23440"
            ]
        ]
    }
]

expected (Output from version 4.7):

worldmap : msg.payload : Object {"action":"feedback","name":"my_form","value":{"foo":"123","bar":"654"},"lat":51.23870648334856,"lon":-1.7674255371093752}

but only get (Output from version 4.8):

worldmap : msg.payload : Object {"name":"my_form","action":"feedback","value":"_form"}
@ETHER-debug
Copy link

ETHER-debug commented Jul 23, 2024

workaround: remove the /* at line 868 and *\ at Line 893 in worldmap.js .

..and I'm a bit confused because of line 869 :

// suggest to reove all the special handling for simplification, no reason to send information
// about entities that the backend generaed, the need is only to get recognizable actions from the frontend
//

what does this mean for my individual frontend form ?

Thanks a lot :)

@dceejay
Copy link
Owner

dceejay commented Jul 23, 2024

apologies - a bit overzealous on the optimisation there... will revert in v4.9

@ETHER-debug
Copy link

Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants