Author: vmolotkov
Date: 2008-03-11 12:34:55 -0400 (Tue, 11 Mar 2008)
New Revision: 6702
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
copy,copyALl,remove, removeAll functions are added
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
---
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-03-11
16:07:01 UTC (rev 6701)
+++
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-03-11
16:34:55 UTC (rev 6702)
@@ -234,13 +234,29 @@
this.sourceLayoutManager.widthSynchronization();
this.container.fire("rich:onlistchanged", {});
+ },
+
+ copyAll : function() {
+ this.moveItems(this.sourceList, this.targetList, this.sourceList.shuttleItems);
+ },
+
+ copy : function() {
+ this.moveItems(this.sourceList, this.targetList, this.sourceList.selectedItems);
+ },
+
+ removeAll : function() {
+ this.moveItems(this.targetList, this.sourceList, this.targetList.shuttleItems);
+ },
+
+ remove : function() {
+ this.moveItems(this.targetList, this.sourceList, this.targetList.selectedItems);
}
};
Richfaces.ListShuttle.HANDLERS = {
- copy: function (e) { this.moveItems(this.sourceList, this.targetList,
this.sourceList.selectedItems); return false; },
- copyAll: function (e) { this.moveItems(this.sourceList, this.targetList,
this.sourceList.shuttleItems); return false; },
- remove: function (e) { this.moveItems(this.targetList, this.sourceList,
this.targetList.selectedItems); return false; },
- removeAll: function (e) { this.moveItems(this.targetList, this.sourceList,
this.targetList.shuttleItems); return false; }
+ copy: function (e) { this.copy(); return false; },
+ copyAll: function (e) { this.copyAll(); return false; },
+ remove: function (e) { this.remove(); return false; },
+ removeAll: function (e) { this.removeAll(); return false; }
};
\ No newline at end of file
Show replies by date