Author: konstantin.mishin
Date: 2008-08-21 10:07:30 -0400 (Thu, 21 Aug 2008)
New Revision: 10162
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
Log:
RF-4236
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
---
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2008-08-21
13:47:11 UTC (rev 10161)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2008-08-21
14:07:30 UTC (rev 10162)
@@ -71,7 +71,9 @@
throw "Script inconsistency detected! Please inform developers...";
}
- }
+ } else {
+ this.elements.handle = null;
+ }
this.eventSelectionClick = this.toggleSelection.bindAsEventListener(this);
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
@@ -458,5 +460,9 @@
getElement: function() {
return $(this.id);
+ },
+
+ isLeaf: function() {
+ return !this.elements.handle;
}
}
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
===================================================================
---
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-08-21
13:47:11 UTC (rev 10161)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-08-21
14:07:30 UTC (rev 10162)
@@ -126,7 +126,7 @@
break;
case Event.KEY_LEFT:
if (this.inFocus) {
- if (!event.ctrlKey && !event.shiftKey && !event.altKey) {
+ if (!event.ctrlKey && !event.shiftKey && !event.altKey &&
!this.activeItem.isLeaf()) {
this.activeItem.collapse();
}
noDefault = true;
@@ -134,7 +134,7 @@
break;
case Event.KEY_RIGHT:
if (this.inFocus) {
- if (!event.ctrlKey && !event.shiftKey && !event.altKey) {
+ if (!event.ctrlKey && !event.shiftKey && !event.altKey &&
!this.activeItem.isLeaf()) {
this.activeItem.expand();
}
noDefault = true;
Show replies by date