In this article I will demonstrate how to implement a cool notification technique using Pines Notify. This small (7k min) js library provides a wealth of flexibility and a feature set second to none. It can use multiple different CSS libraries (bootstrap, jQueryUI and others) so integration into your site is quick and simple.
Pines Notify is a notification popup capability which is easily integrated into a website. Like most jQuery plugins there is a methods to instantiate the capability and the ability to pass in multiple parameters. There are certainly other popup style plugins but this is easy to grasp and the examples are very good.
We are going to look at how to make some complex function popups like these…
Pines Notify provides a basic shell for popup creation and the capability for multiple custom configurations. A “popup” by default is created on the top right of the screen and disappears after a fixed period of time. The the position, CSS, length of time shown, transparency, contents, callbacks and other features can be controlled through the use of parameters. There are too many to mention in one article but they can all be seen at the example website.
Adding Pines Notify to an XPage
The Pines Notify download contains the .js files (readbale and minified) and a basic css file. These are easily added to our database as files in the WebContent folder.
Adding Pines Notify js and css fields to our database
Once we have added the js and css files to the database they can be added to our XPage as a resource(s)
The Pines Notify examples website gives us the code we need to create each button
Taking the sample code from the Pines Notify examples page
And to convert this to our XPages button we just need to copy and paste this code and insert it into the <![CDATA[ code section above. Using this we can quickly and easily convert the examples into functioning XPages buttons.
By default all Notifications have the ability to "pin" them to the screen. Should they contain information the user wishes to retain, they can do so
Pinning your notification
By default all notifications can be closed before they fade out using the X in the notification
Pines Notify notifications always stack on top of each other, so you never have to worry about position or overlaying issues, they will organize themselves nicely.
Showing all notifications
By default there is a bar added to the screen which allows user to see the last and/or all previous notifications.
Showing all previous notificaitons
Working this into XPages functionality
In our XPages applications we could potentially notify the user after:
Successful REST update from the server
General application workflow progress
really the possibilities are endless and really up to you the developer.
My demonstration site examples page has illustrated a number of buttons taken directly from the website and I have also added some notifications to the other jQuery in XPages examples (linked in through the menu).
On the XPages server without the need for jQuery you can use the dojo toaster widget to provide a notification capability. You should take a look at Chris Toohey’s well written article on Mastering the Dojo Toaster for XPages to get a comparison.
To Alan Hurt for pointing me in the direction of this plugin
The consummate Champion
Thu, Jul 24th 2014 8:42p Mark Roden As Russ Maher said today in Hey Who got the Handsome Champion it is an honor and a privilege to not only be recognized by IBM as a Champion for ICS 2014, but you also get some very cool stuff. Thanks to Amanda Bauman and Oliver Heinz for organizing “the champions” and all the gear. I just wonder what I am going to do with all of it :)
Seriously though, I am very humbled to be an IBM Champion !
Thank you to everyone who nominated me and made this possible :) [read] Keywords: ibm
Web Components – Entering the ShadowDOM….
Wed, Jul 9th 2014 9:18p Mark Roden Web Components – the future
You should first ground yourself on Web Components and read this article on Web Components and concepts, ShadowDOM, imports, templates, custom elements by Todd Motto.
Then listen to this Podcast (thanks to Steve for pointing it out) - Web Components with Peter Gasston
Once you have read/listened you will have some idea and concept about Web Components and how they are the future…..
But what I wanted to show briefly was how to enable the ShadowDOM in C [read] Keywords: agent
Hi Chicago – what changed?
Wed, Jul 2nd 2014 7:16a Mark Roden Well it has been on the cards now for 6 months but we finally did it. My family and I moved from Virginia to Chicago and I have started working out of the PSC office in Schaumburg, IL.
I was asked nearly 18 months ago if I would consider moving, but for mostly family reasons it took a year or so to organize and agree this was the right thing to do for my career and just as importantly for the family. Working at home has been wonderful for the past two years. But it was also a little limiting [read] Keywords: office
Angular.js in XPages #5 – Routing
Sun, May 25th 2014 6:52p Mark Roden In this article I will show how angular using routing to create a bookmarkable URL string and how that fits together with additional controllers. This will start us on the path to creating our basic CRUD application. This article is based on the Routing and Multiple views tutorial
Way back when the world was young (in internet terms a couple of years ago), when single page apps were all the rage, it was noticed that there was a significant drawback to only having one URL index.html; [read] Keywords: ibm