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
An open letter to Mr. NotesIn9
Wed, Apr 2nd 2014 6:33a Mark Roden Dear Mr Leedy,
I regret to inform you that your blatant use of child labor has offended my child labor union. They do not feel like you have represented me in the correct light.
I trust that you will find this short response in the same light as your original offense.
Your very good friend Marky Roden
CC: everyone who has seen this video
And the gloves are off……
Mon, Mar 31st 2014 5:57p Mark Roden Picture this: I have been away for 5 days and during that time “someone” has been posting cryptic comments on twitter about how the next notesin9 is going to be different….and scaring me.
So I am waiting at the airport this afternoon, about to board my plane home and I get this link from this “friend” who tells me to watch the new video it and enjoy. I download it and watch it on the plane. People start to look at me funny as I start to snort and giggle at my phone. [read] Keywords: ibm
When the community comes together we get the right answer
To give a little more background as to why I decided to post: I was not to be antagonistic or instigate a storm in a tea cup. It was because for the third time in 2014 I had been told by a notes developer something along the lines of “I can’t learn XPages because I have read that you need to learn Java and I do [read] Keywords: notes
PATCHing a Document using Domino Data Service
Mon, Mar 24th 2014 7:11p Mark Roden Talk about frustrating – in a week full of slow progress and CORS cross domain hell I found this little annoyance after hours of staring and curing – once again the power of trial and error triumphs over my stupidity again.
I have a Domino Data Service running on the server and I want to update a document
This is the imaginary URL
returning the imaginary data just fine
"@href": [read] Keywords: domino
How to ad icons to individual items in a Select2 multi-value field
Tue, Mar 18th 2014 8:08p Mark Roden Select2 is one of the best user interface enhancers I have come across – if you do not know what it is then you need to go play with it.
It transforms SELECT boxes into dynamic, stunning, interactive UI elements and allows for all sorts of customizations and developer fun.
What I want to be able to do is select items from different categories within the select2 box and then add an icon displaying to the user which category they came from. In this article I will show how.
I want to [read] Keywords: css
My ongoing struggle with stupidity and what is not valid JSON
Sun, Mar 16th 2014 6:06p Mark Roden So this was a frustrating lesson to learn – and please feel free to be entertained by my apparent stupidity.
I was trying to create my own JSON with an xAgent – seems easy enough. I created a simple output which looked like this
and when I fed it through my AJAX code it failed.
//url: 'http://coppe [read] Keywords: ajax