Pular para o conteúdo principal

Sample - Dialog for Terms and Conditions - IBM Connections


There are two parts to this, the OSGi package that contains the dialog code, and a customized header.jsp file that checks for the cookies, both attached to this mail.



Installing

1) Install OSGi - Copy the  com.tandc.example_1.0.0.jar file to your <provisionDir>/webresources directory. The <provisionDir> is shown in the WebSphere environment variable CONNECTIONS_PROVISION_PATH . The name of the jar must be kept as is.

2) Install JSP - Copy the header.jsp file to the <customizationDir>/common/nav/templates directory. Remember to also set the other customization settings such as the CONNECTIONS_CUSTOMIZATION_DEBUG variable. The only bit that matters is the <script> section at the bottom, so if you're already using a customized file just copy the <script> section over.

3) Restart the Common application (or the entire server).

4) Clear cookies and log into Connections

After you log in the Terms and Conditions dialog will be displayed. You must tick the acceptance box which will then enable the "I agree" button. Click the "I Agree" button to access the system. This process can be improved later.

How it works

The OSGi file contains most of the code. If you open that file you'll see a resources directory, and in that the TermsConditionsDialog.js file. This contains the class "com.tandc.example.TermsConditionsDialog". The _dialog property is the template to create the actual dialog. The _terms property holds the HTML for the terms shown within the dialog so we can easily customize this later.

The header.jsp file contains a script section at the end that adds in a dojo.addOnLoad function, which is fired when the header is loaded. This detects the "termsconditions" cookie, and if it isn't there an instance of the TermsConditionsDialog is created and shown.

The cookie is given a domain of the server the machine is on and no path so it stays in place if you go between different pages. I've set an expire time of 5 minutes to it so it's not too hard to demonstrate it expiring etc.

Improvements to make

There are a large number of improvements to be made.

1) *** Security of the cookie, and the T&C dialog - it wouldn't be hard to break in.
2) Localize the dialog so we can provide localized versions of the T&C
3) At the moment the "escape" key can be pressed to dismiss the dialog, we need to work around that.

Links


Sample for header.jsp
jarfile

Comentários

Postagens mais visitadas deste blog

Querendo aprender Design Thinking?

Segue uma lista interessante para você sobre Design Thinking. Canal do You Tube - Rodrigo Giaffredo https://www.youtube.com/channel/UCiZGIBd46d1EiVvlMVxkmkA?sub_confirmation=1 EXTERNAL RESOURCES IBM Design Thinking http://www.ibm.com/design/thinking/ IBM Design Language http://www.ibm.com/design/language/inspiration How It Works: Design Thinking - IBM Think Academy https://www.youtube.com/watch?v=pXtN4y3O35M Tim Brown: Designers -- think big! http://www.ted.com/talks/tim_brown_urges_designers_to_think_big#t-14620 IDEO Design Thinking http://designthinking.ideo.com/ Using Design Thinking to Design Business Models: http://labs.sogeti.com/using-design-thinking-to-design-business-models/ Remote Design Thinking https://medium.com/remote-design-thinking d.school bootcamp bootleg http://dschool.stanford.edu/wp-content/uploads/2011/03/BootcampBootleg2010v2SLIM.pdf Design Kit Org http://www.designkit.org/ http://www.designkit.org/methods The Field Guide to Human-Centered Design http://www.des...

Running Domino Administrator and Domino Designer on a MAC

I'm running Domino Designer and Domino Administrator on macOS Catalina 10.15.3. Prerequisites : - CrossOver 19.0.1 - Domino 10.01 Client Installer Steps : 1. create a bottle with Windows 7 32 bit 2. Install:     - Main sources     - Adobe Flash 18     - Visual C ++ 2005 8.0 SP1     - SDK 1.1 3. Install Domino 10 client Problems :    - eventually an error message appears with a window, just click ok Tips :    - when executing the designer for the first time, note that there will be a hidden window, which prevents you from clicking on the operation. Check not to warn anymore and it's ok.

How to install HCL Sametime V11

How to install  Sametime V10  - a series of blog posts by  Gabriella Davis : Installing Sametime V10 Limited Use  (including MongoDB) Installing Sametime V10 - The Proxy Server  (WAS based Proxy Server) How to install  Sametime V11 Official documentation How to set autostart for Sametime V11 Proxy Server (Tomcat):  Windows ,  Linux How to enable  business cards photos Configuring  Sametime V11  - a series of blog posts by  Roberto Boccadoro : Integrating Sametime 11 with iNotes and Verse on Premises How to allow access to mobile clients Enabling person photo in the client  (and related problem  solution ) What to do if file transfer is not working Replace self-signed certificate in Sametime...