Read the statement by Michael Teeuw here.
MMM-Modal
-
I tweaked my modal that I’m using in some of my modules. Instead of duplicating this all over the place I created a new module for a single source of truth and so it can also be used by other devs/users.
[card:fewieden/MMM-Modal]
Modal and dialog windows with touch, voice and non input support.
I just started building it so it might still have some bugs.

-

-
[1.0.1]
Fixed
- Modal positioning
- Blur on render error
Added
- List of depending modules
- Callback option after render for developers
Changed
- ESLint ruleset from
airbnbtorecommended - Moved nunjuck templates in separate directory
- node versions for travis
Removed
- doclet integration
https://github.com/fewieden/MMM-Modal
[card:fewieden/MMM-Modal]
-
I really like this module, especially with touch screen usage.
The implementation is easy but still very powerful.F.e. I added support for the following two modules:
In MMM-Spotify it is used to display account / device selection popups on screen. The available
callbackpayload function makes this work in the first place, as we (of course) need to react on the made user selections :)So again, great module, thanks!
-
With MMM-ip another module has now integrated the modals. See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules
-
With MMM-soccer another module has now integrated the modals.

See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules
-
This post is deleted! -
@hango said in MMM-Modal:
template: “templates/MyModal.njk”,
I think u need
template: "../modulename/templates/MyModal.njk",to make it relative to your module
instead of the modal module -
@hango said in MMM-Modal:
I make my modal:
this.sendNotification("OPEN_MODAL", { template: "templates/MyModal.njk", data: { title: "Test modal", message: "Test message" }, options: { isDialog: true } });in console I get this:
nunjucks.min.js:4 GET http://localhost:8081/modules//modal/templates/modal.njk?s=1634300311396 404 (Not Found)templates/MyModal.njkdoesn’t really fit with the error messagetemplates/modal.njk?! Sure you have specified the correct path?
Referencing it to within your module path works just fine:template: "templates/MyModal.njk",If this is possible…
That seems a bit rude. Just look at the linked modules in this thread which have this implemented successfully.
-
This post is deleted! -
This post is deleted! -
@hango is a bug, doesn’t use the template name
edit the MMM-Modal.js , add the one line below after line 236
if (!sender) { modal = { identifier: this.identifier, senderName: this.name, template: 'templates/HelpModal.njk', data: this.voice, options: {} } } else { modal.senderName = sender.name; modal.identifier = sender.identifier; modal.options = modal.options || {}; modal.data = modal.data || {}; modal.template: modal.template || 'templates/HelpModal.njk', // add this line } -
@hango I responded with an MVP of a custom module using the modal in the related Github issue https://github.com/fewieden/MMM-Modal/issues/17
-
With MMM-NFL another module has now integrated the modals.

See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login