Pnotify: buttons not working
I'm trying to use the Pnotify buttons, but I couldn't get them to work. The problem is I am using Pnotify with the required JS and Bower (within the spine). I have tried in different ways.
The pnotify documentation has a comment addressing this issue: ( https://github.com/sciactive/pnotify#using-pnotify-with-requirejs ) this is an example:
requirejs(['pnotify', 'pnotify.nonblock', 'pnotify.desktop'], function(PNotify){
PNotify.desktop.permission();
new PNotify({
title: 'Desktop Notice',
text: 'If you\'ve given me permission, I\'ll appear as a desktop notification. If you haven\'t, I\'ll still appear as a regular PNotify notice.',
desktop: {
desktop: true
},
nonblock: {
nonblock: true
}
});
});
This example works for me, so I modified it a bit for my needs:
require(['pnotify', 'pnotify.buttons', 'pnotify.nonblock'], function(PNotify){
new PNotify({
title: title ,
text: msg,
type: classes,
delay: delay,
animation: 'fade',
opacity: .9,
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
Don't unblocked messages work fine and desktop notifications too (if needed) but buttons not showing ... Anyone had a similar problem? Any ideas? it would be great to find a solution for this. Thank!
NOTE. I already have all pnotify modules installed.
source to share
It seems that the unlocked and button module are not working well. There is an issue in the github project: https://github.com/sciactive/pnotify/issues/145
Therefore, when the non-blocking module is removed, the buttons work normally.
source to share