Asking for saving javascript inside DB
Collapse
X
-
Kharg
yes sure, do you have telegram to have conversation about this? I'm working on it but still take times to resolve some situations because of my limitation in reading and coding for Espo Framework. -
trungtvmso
Would you mind sharing your project? It looks really interesting.
To add a detail/list button globally you can use the Global scope:
clientDefs/Global.json
PHP Code:{ "menu": { "detail": { "buttons": [ "__APPEND__", { "name": "myGlobalButton", "action": "globalAction", "style": "default", "acl": "delete", "aclScope": "User", "hidden": true, "iconHtml": "<span title='Global Action' class="icon fas fa-building"></span> ", "data": { "handler": "my-extension:global-action" }, "initFunction": "init" } ] }, "list": { "buttons": [ "__APPEND__", { "name": "myGlobalButton", "action": "globalAction", "iconHtml": "<span title='Global Action' class="icon fas fa-building"></span> ", "style": "default", "acl": "delete", "aclScope": "User", "hidden": true, "data": { "handler": "my-extension:global-action" }, "initFunction": "init" } ] } } } Leave a comment:
-
Offtopic, but do you Github these code? Need to do a follow on you
-
yuri
Hi yuri, I have a question that can I extend views/detail for adding custom mass button for all entity like "Star" button?
I'm looking for threads about this question but have no clue. Can you help me to let me know also path to register it in autoload please?
Thank you so much.Leave a comment:
-
yea I understand that I just store it in a field and only Root User can use this plugin.Leave a comment:
-
A code stored in a field won't be executed, unless you will call it explicitly. A user who can edit this code potentially can gain access to an account of another user, if the code will be executed in a browser of that user.Leave a comment:
-
Asking for saving javascript inside DB
Dear yuri
I'm planning to build my own custom plugin what It will semi-auto generate code after I create new module(list) of buttons/edit current module from FE.
I want to ask you that can we save javascript functions into DB? shall it be not conflicted to any classes inside our framework? I'm using Wysiwyg field type for coding field.
This is my demo:
Last edited by trungtvmso; 07-29-2024, 12:47 PM.Tags: None

Leave a comment: