myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r478505 - /myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
Date Thu, 23 Nov 2006 08:09:03 GMT
Author: weber
Date: Thu Nov 23 00:09:03 2006
New Revision: 478505

URL: http://svn.apache.org/viewvc?view=rev&rev=478505
Log:
TOBAGO-194 (Tooltip in tree and treeListbox)

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js?view=diff&rev=478505&r1=478504&r2=478505
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
(original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
Thu Nov 23 00:09:03 2006
@@ -291,14 +291,15 @@
   }
 };
 
-function TreeNode(label, id, mode, isFolder,
+function TreeNode(label, tip, id, mode, isFolder,
     hideIcons, hideJunctions, hideRootJunction,
     hideRoot, treeHiddenId, selectable, mutable,
     formId, selected, marked,
     expanded, required, disabled, treeResources,
     action, onclick, parent, icon, openIcon, width) {
   this.label = label;
-	this.id = id;
+  this.tip = tip;
+  this.id = id;
   Tobago.treeNodes[id] = this;
   this.mode = mode
   this.isFolder = isFolder
@@ -439,6 +440,9 @@
         itemStyle += " tree-item-marker";
       }
       str += '<a class="' + itemStyle + '"';
+      if (this.tip) {
+        str += ' title="' + this.tip + '"';
+      }
       if (!this.disabled) {
         str += ' href="' + Tobago.EMPTY_HREF +  '"'
             + ' onclick="Tobago.Tree.onClick(this)"'
@@ -806,6 +810,9 @@
   }
   var option = new Option(label, index);
   option.hiddenId = hiddenId;
+  if (node.tip) {
+    option.title = node.tip;
+  }
 //  Tobago.addEventListener(option, 'click', tbgTreeListboxClick);
 
   return option;



Mime
View raw message