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

Anyone use this with rails flash? #27

Closed
mhenrixon opened this issue Sep 27, 2012 · 4 comments
Closed

Anyone use this with rails flash? #27

mhenrixon opened this issue Sep 27, 2012 · 4 comments
Labels

Comments

@mhenrixon
Copy link

This is not an issue really but I'd appreciate if this was left open to give someone the chance to suggest how pnotify might be used with rails messages.

Anyone out there using pnotify with rails flash that can suggest how to make it work?

@PikachuEXE
Copy link

I am trying to use it

  1. I require all JS in vendor
  2. Then hide the normal flash display
  3. Use jQuery to call pnotify on ready

Right now I am trying to figure out why the custom stack is not working

@PikachuEXE
Copy link

So finally I write this:

window.App ||= {}
window.App.Notifier ||=
  ## Internal Stacks for PNofify

  stack_topleft: {"dir1": "down", "dir2": "right", "push": "top"}

  ## Functions for displaying flashes

  showNotice: (message) ->
    $.pnotify
      type: 'notice'
      text: message
      nonblock: true, # So that user can see through it on mouse hover
      nonblock_opacity: 0.2
      addclass: "stack-topleft"
      stack: @stack_topleft

Then I either call it from somewhere else

@musaffa
Copy link

musaffa commented Sep 1, 2014

I've added a wiki that suggests how rails flash integration can be achieved with pnotify.

Here's the link: Rails flash integration with PNotify

@varunrayen
Copy link

How can you add custom params like title or icon through flash message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants