bySamo
bySamo

Reputation: 475

pnotify: buttons don't work

I'm trying to use buttons of Pnotify but I couldn't get them to work. The problem is that I'm using Pnotify with requiredJS and Bower (within backbone).. I tried in many ways..

Pnotify documentation has a comment regading this issue: (https://github.com/sciactive/pnotify#using-pnotify-with-requirejs) this is the 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
        }
    });
});

That example works for me, so I modified it a little 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
                }
            });
 });

Is this way the nonblock messages works fine and the desktop notifications too (if needed) but buttons don't appear... Someone had a similar problem?? Any idea? it would be great to find a solution for this.. Thanks!

NOTE: I already have all pnotify's modules installed

Upvotes: 3

Views: 2678

Answers (1)

bySamo
bySamo

Reputation: 475

It seems that nonblock and Buttons module doesn't play well together. There is an issue in github's project: https://github.com/sciactive/pnotify/issues/145

So when non-block module is removed the buttons works fine.

Upvotes: 3

Related Questions