Breadcrumbs using JQuery | J Query | Boolean Data Type

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
 0
 
  Breadcrumbs using JQuery 2010-February-27 at 9:14 pm · Filed under UI, View ·Tagged Agent, breadcrumbs, domino, jquery, View Bob Balfe asked some time ago who is using JQuery for their Domino development projects. I hoped it was gonna rain with examples of implementation of JQuery plugins in Lotus Notes but so far it remains a bit quiet. So why not describe an example myself? Figure: Screenshot from the website. xBreadcrumbs is a nice plugin to JQuery to provide horizontal navigation. It uses a
Share
Transcript
  Breadcrumbs using JQuery 2010-February-27 at 9:14 pm · Filed under  UI,View ·Tagged Agent, breadcrumbs,domino,  jquery, View Bob Balfeasked some time ago who is using JQuery for their Domino development projects. I hoped itwas gonna rain with examples of implementation of JQuery plugins in Lotus Notes but so far it remainsa bit quiet. So why not describe an example myself?Figure: Screenshot from the website.xBreadcrumbsis a nice plugin to JQuery to provide horizontal navigation. It uses an unordered list(UL) as source so when you provide that data dynamically with Notes data it becomes interesting.In my case the customer wanted to have breadcrumbs on top of documents that are stored in a Notesview. Documents are categorized in a parent-response hierarchy so for each document I have tocalculate the complete path from the opened document to its uber-parent (some points on that u) aka as‘Home’.Figure: Document location in Notes view.Figure: Document location in breadcrumb. Implementation Download the zip file, extract it and upload the files in your Notes application.Create a subform that you will embed on the form of your document. Add the following code to thesubform:  <script type=”text/javascript” src=”../jquery-1.3.2.min.js”></script><script type=”text/javascript” src=”../breadcrumbs/js/xbreadcrumbs.js”></script><link rel=”stylesheet” href=”../breadcrumbs/css/xbreadcrumbs.css” /><script type=”text/javascript”>$(document).ready(function(){$(‘#breadcrumbs-2′).xBreadcrumbs({ collapsible: true });});</script><style type=”text/css”>.xbreadcrumbs { background:#FFF none repeat scroll 0 0;}.xbreadcrumbs LI { border-right: none; background: url(../img/frmwrk/breadcrumb/separator.gif) no-repeat right center; padding-right: 15px;}.xbreadcrumbs LI.current { background: none; }.xbreadcrumbs LI UL LI { background: none; }.xbreadcrumbs LI A.home { background: url(../img/frmwrk/breadcrumb/home.gif) no-repeat left center; padding-left: 20px;}/* Custom styles for breadcrums (#breadcrumbs-3) */.xbreadcrumbs#breadcrumbs-3 { background: none;}.xbreadcrumbs#breadcrumbs-3 LI A {text-decoration: underline;color: #0A8ECC;}.xbreadcrumbs#breadcrumbs-3 LI A:HOVER, .xbreadcrumbs#breadcrumbs-3 LI.hover A{ text-decoration: none; }.xbreadcrumbs#breadcrumbs-3 LI.current A {color: #333333;text-decoration: none;}.xbreadcrumbs#breadcrumbs-3 LI { border-right: none; background: url(../img/frmwrk/breadcrumb/separator.gif) no-repeat right center; padding-right: 15px; padding-left:0px;}.xbreadcrumbs#breadcrumbs-3 LI.current { background: none; }.xbreadcrumbs#breadcrumbs-3 LI UL LI { background: none; padding: 0; }</style>  <script src=”../$a-get-bread-crumb?OpenAgent&breadcrumb= <ComputedValue> &ul&view=$v-treeview&id=myCrumb&class=xbreadcrumbs&activecrumbclass=current”></script>The source for my unordered list is the agent $a-get-bread-crumb.The formula for the computed value is as followed:@Text(@DocumentUniqueID)The agent will use the Notes view ‘$v-treeview’, find the document by its document UNID andnavigates via each parent all the way up in the Notes view. While doing so the required information to build the unordered list is collected.By the way, the code for this agent was co-written by my collegueTomas Ekström<?xml version='1.0' encoding='utf-8'?><!DOCTYPE scriptlibrary SYSTEM 'C:\ProgramFiles\IBM\Lotus\Notes\xmlschemas/domino_8_0_2.dtd'><scriptlibrary name='class:ULTreeFromView' xmlns='http://www.lotus.com/dxl'version='8.0' maintenanceversion='2.0' replicaid='C1256A770023CD97' hide='v3 v4strict'designerversion='8.5'><noteinfo noteid='21885a' unid='59060A2A3E0AE532C12576A10046FE03' sequence='24'><created><datetime>20100104T135525,47+01</datetime></created><modified><datetime>20100118T105706,77+01</datetime></modified><revised><datetime>20100118T105706,65+01</datetime></revised><lastaccessed><datetime>20100118T105706,74+01</datetime></lastaccessed><addedtofile><datetime>20100111T083443,65+01</datetime></addedtofile></noteinfo><updatedby><name>CN=Patrick Kwinten</name><name>Patrick Kwinten</name></updatedby><wassignedby><name>Patrick Kwinten</name></wassignedby><codeevent='options'><lotusscript>%REMLibrary class:WebGetTreeFromViewCreated Sep 1, 2009 by Tomas EkströmDescription: Comments for Library%END REMOption PublicOption Declare</lotusscript></code><code event='declarations'><lotusscript>%REMClass ULTreeFromViewDescription: Comments for Class%END REMClass ULTreeFromViewPrivate hasChild As BooleanPrivate childNodes() As ChildNodePrivate nview As NotesViewPrivate vnav As NotesViewNavigator Private ve As NotesViewEntryPrivate session As NotesSessionPrivate contentSource As String  Private liClass As StringPrivate id As StringPrivate className As StringPrivate activeCrumbClass As String'Private currentLevel As Integer Private levelsToReturn As Integer Private fromPosition As StringPublic Property Get getContentSource As StringgetContentSource = contentSourceEnd Property%REMProperty Set setContentSourceValue: field:[fieldname] or column:# or universalID:%%UNID%%Description: Comments for Property Get. In column:# the first column is 0.Example:ULTreeFromView.setContentSource = field:Tx_Title Result &lt;li&gt;Home&lt;/li&gt; if the field Tx_Title contains Home ULTreeFromView.setContentSource = column:1 Result &lt;li&gt;Home&lt;/li&gt; if the column in the view contains Home (first column is 0)ULTreeFromView.setContentSource = universalID:field:Tx_Title&lt;ahref='http://server/directory/datbase.nsf/0/%%UNID%%'&gt;%%CONTENT%%&lt;/a&gt; Result &lt;li&gt;&lt;ahref='http://server/directory/databse.nsf/0/CEA6C8D38AC6E216C1257678006CE1BA'&gt;Home&lt;/a&gt;&lt;/li&gt; if the documents universal id is CEA6C8D38AC6E216C1257678006CE1BA%END REMPublic Property Set setFromPosition As StringMe.fromPosition = setFromPositionEnd PropertyPublic Property Set setLevelsToReturn As StringMe.levelsToReturn = setLevelsToReturnEnd PropertyPublic Property Set setContentSource As StringcontentSource = setContentSourceEnd PropertyPublic Property Get getLiClass As StringgetLiClass = liClassEnd PropertyPublic Property Set setLiClass As StringliClass = setLiClass
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x