Author: nbelaevski
Date: 2008-04-30 13:39:15 -0400 (Wed, 30 Apr 2008)
New Revision: 8389
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
previous & lastDescendant functions added
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
---
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-04-30
17:32:35 UTC (rev 8388)
+++
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-04-30
17:39:15 UTC (rev 8389)
@@ -358,6 +358,15 @@
return n;
};
+Richfaces.lastDescendant = function(node) {
+ var n = node.lastChild;
+ while (n && n.nodeType != 1) {
+ n = n.previousSibling;
+ }
+
+ return n;
+};
+
Richfaces.next = function(node) {
var n = node;
do {
@@ -367,6 +376,15 @@
return n;
};
+Richfaces.previous = function(node) {
+ var n = node;
+ do {
+ n = n.previousSibling;
+ } while (n && n.nodeType != 1);
+
+ return n;
+};
+
Richfaces.removeNode = function(node) {
if (node) {
var parentNode = node.parentNode;