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
Practice what you preach – be fast and look sexy
Tue, Dec 16th 2014 5:19p Mark Roden As people who know me well may have heard once or twice, user experience is everything. When designing a custom web based application for a customer, there is always an unwritten requirement of “look sexy” and be fast.
This week my team and I at PSC successfully rolled out a new global application to a customer and here are some examples of the feedback we received within the first day or so:
I tried the new site only this morning and I have only one word: fantastic! It is very u [read] Keywords: domino
Looking forward to IBM ConnectED – AD201: IBM Domino Applications in Bluemix
Thu, Dec 11th 2014 8:04p Mark Roden The session preview tool for ConnectED 2015 has been announced.
Looking through it I found the following abstract – which unsurprisingly has me really excited !!!
AD201: IBM Domino Applications in Bluemix
This session will show how Bluemix enables you to deploy Domino applications to the cloud in a matter of minutes. We will demonstrate how to leverage Bluemix buildpacks like XPages and Node.js both to modernize Domino applic [read] Keywords: domino
Multiple Chrome Incognito browsers share the same data
Sun, Nov 23rd 2014 7:15p Mark Roden In a previous post I talked about how going porn-mode on your browser is great for a developer. What I didn’t realize until today is that incognito mode is not as unique as I want it to be.
We use localStorage in one of the applications we are developing and I had issues when I was opening up multiple Chrome Incognito mode browsers, assuming they were unique….I wanted to compare separate instances in separate windows
Mr. Genius (Toby) pointed out to me that localStorage is shared a [read] Keywords: applications
x$ – now a part of XPages Extension Library
Tue, Nov 18th 2014 9:16p Mark Roden I am very flattered to find out that not only is my x$ OpenNTF xSnippet being used more widely than I realized (over 600 downloads). It now being used in the latest release of the OpenNTF Extension library.
If you look here – http://bootstrap4xpages.com/xsp/.ibmxspres/.extlib/responsive/xpages/js/xsp-mixin.js and search for it you will find
//jQuery selector that works with XPages IDs
//See - http://openntf.org/XSnippets.nsf/snippet.xsp?id=x-jquery-selector-for-xpages
function x$(id [read] Keywords: xpages community