Picture of Oscar Arango
Using Notify on text links
by Oscar Arango - Wednesday, 16 September 2015, 2:03 PM
 

So i've been searching the web and conversing with others on this, can't seem to get a solution that works.  Is it safe to assume that we will not be able to use notify on text links to act as a popup.  this is the only function missing for me to be able to use this framework.

I've tried multiple plugins, components and have read through all the forums, does anyone else not use them? there has to be someone with this function working.  I don't know how to create my own components using other components.

thanks,

Picture of Matt Leathes
Re: Using Notify on text links
by Matt Leathes - Wednesday, 16 September 2015, 6:51 PM
 

Hi Oscar

This is an absolutely horrifying way of achieving what you want - but if you don't want to be mucking about with the code then I can't think of any other way... and it does work!

Basically add a hyperlink like this to your JSON:

<a href='#' onclick='require(\"coreJS/adapt\").trigger(\"notify:popup\",{title:\"Notify Title Text\",body:\"Notify message\"});return false;'>Click here to show a Notify popup!</a>

Note how I've used backslashes to escape the double quotes within the code.

Picture of Oscar Arango
Re: Using Notify on text links
by Oscar Arango - Wednesday, 16 September 2015, 8:05 PM
 

Matt,

your a god send, thank you very much for that chunk of code, it worked like a champ, Though I couldn't use the editor to add it, but success when I added it directly to the json code.

I'm guessing it's something to do with backslashes that I'm not doing correctly, but I'll check it out.

thanks,