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
Sorting an unsorted XPages document collection based on a date field
Creating the array
var sSearch = "[FIELD Subject contains smith]"
var dc:N [read] Keywords: xpages applications
Using jQuery to remove Dojo CSS from an XPage
Thu, Feb 20th 2014 10:59p Mark Roden I am currently working on a customer application which is oneuiv2.1 themed and I wanted to create a simple jQuery Mobile site. the dojo css was really messing up the styling and just for interest I wanted to see if I could programmatically remove the dojo css from the page client side
Using a jQuery selector I can get a handle on that as follows
$( [read] Keywords: xpages application
What does Firebug say?
If you ever ask me for help this will always be my first question – and a significant number o [read] Keywords: domino
Exciting changes for 2014 – moving to Chicago
Wed, Feb 12th 2014 5:52a Mark Roden 2013 was a fantastic year for the PSC XPages team. We completed work on the world’s largest XPages project, started work for a number of new customers and early in 2014 we are actively looking to hire the best XPages developers available . It is a very exciting time to be taking a leading role within the largest XPages consultancy practice in North America.
With all this comes the opportunity for advancement. I am very pleased to announce that I have been promoted from Senior Consultant to [read] Keywords: collaboration
Lowering your ODS – an oldie but goodie
Fri, Feb 7th 2014 6:14a Mark Roden After Connect this year I tried to post my Ext JS sample database on my demo site and most users were reporting unsupported notes version. I did some digging and it turns out that amongst everything else R9.0.1 has a newer ODS (52) and therefore would not run on a lower than R9.0.1 server/client.
So after much idiocy and locally encrypted stupidity on my part, I did a search around and found/remembered that you can reduce the ODS aaaaaall the way back to 20 by doing this
File – Applicatio [read] Keywords: notes
My thoughts on Connect 14 – What makes a good presentation?
Mon, Feb 3rd 2014 6:44p Mark Roden I wanted to write down some thoughts and ideas, notes almost, after watching the IBM Connect 2014 technical presentations.
Ultimately what I want to understand and be able to execute myself is – What makes a good presenter/presentation?
Let’s ignore the content for the moment. Last week I attended sessions where I was interested in the content but the delivery was poor. I also went to presentations where the content didn’t interest me but the presentation kept my attention. Fig [read] Keywords: ibm
show and tell