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

How to create a module with new modal element #503

Open
michapr opened this issue Nov 30, 2019 · 2 comments
Open

How to create a module with new modal element #503

michapr opened this issue Nov 30, 2019 · 2 comments

Comments

@michapr
Copy link
Contributor

michapr commented Nov 30, 2019

Hi,

I cannot find a description how to create a new module with a modal file (for opening a new DIV)

I'm creating a new Chart module (inspired by intchart) - and all is working as expected, but I do not know how to create a new modal element.
Even modify the existing seems not to be possible easy, because the elements are inside the (old) build.js and templates.js files and taken from there.

In documentation do not find anything about it.

So question is, how to create the graphModal.html inside Z-Way, so that it can be used.
And - what is the right way to add an icon for statistics inside the device widget (like yout history or the Intchart symbol).

In this time using a modified Intchart structure (file names) but want to modify as sample the modal element.

Thanks!

Michael

@PoltoS
Copy link
Member

PoltoS commented Dec 4, 2019

Unfortunatelly there is no easy way to do it in the current architecture except for mangling the UI sources.

There are actually only four places to mangle:

If the new chart will be pretty easy to use, we can try to implement it in the main branch (or accept a pull-request)

@michapr
Copy link
Contributor Author

michapr commented Dec 4, 2019

Where can I find this files in the local installation - and how to merge the modified files there?
in /opt/z-way-server/htdocs/smarthome/app/ is no "views" and "controllers" directory.

I have seen at https://github.com/Z-Wave-Me/home-automation/wiki/How-to-create-a-widget
that templates should be precompiled:

$ cd /path/to/automationFolder
$ nunjucks-precompile ./templates/ > ./htdocs/_templates.js

But it seems that "_templates " is not existing more...
Is this the right way for inserting new elements?

And - will this changes be overwritten in case of updating? I think so,...

Implementing in main branch could not be possible because of license terms of highcharts - it is free for personal not commercial use only - so it could be added by me (when finished) as module "for personal use" only...

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

2 participants