Author: vmolotkov
Date: 2007-11-12 07:15:20 -0500 (Mon, 12 Nov 2007)
New Revision: 3908
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
management of controls
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-12
12:02:27 UTC (rev 3907)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-12
12:15:20 UTC (rev 3908)
@@ -121,11 +121,11 @@
}
.ol_control_shown {
+ visibility: visible;
+}
+.ol_control_hidden {
visibility: hidden;
}
-.ol_control_shown {
- visibity: visible;
-}
.body {
-moz-user-select: none;
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-12
12:02:27 UTC (rev 3907)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-12
12:15:20 UTC (rev 3908)
@@ -96,10 +96,10 @@
this.selectedItems.sort(this.compareByRowIndex);
var control;
//FIXME
- if (this.selectedItems.length <= 1) {
- for (var i = 0; i < this.controlList; i++) {
+ if ((this.shuttleItems.length <= 1) || (this.selectedItems.length == 0)) {
+ for (var i = 0; i < this.controlList.length; i++) {
control = this.controlList[i];
- this.controlList[i].doDisable();
+ control.doDisable();
}
} else if (this.selectedItems[0].rowIndex == 0) {
this.getControlByAction("first").doDisable();
@@ -112,9 +112,9 @@
this.getControlByAction("first").doEnable();
this.getControlByAction("up").doEnable();
} else {
- for (var i = 0; i < this.controlList; i++) {
+ for (var i = 0; i < this.controlList.length; i++) {
control = this.controlList[i];
- this.controlList[i].doEnable();
+ control.doEnable();
}
}
}
Show replies by date