Author: vmolotkov
Date: 2007-12-22 11:58:38 -0500 (Sat, 22 Dec 2007)
New Revision: 4992
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
new implementation of selection functionality
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 2007-12-22
16:44:13 UTC (rev 4991)
+++
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-12-22
16:58:38 UTC (rev 4992)
@@ -145,7 +145,7 @@
}
this.controlListManager();
this.targetList.controlListManager();
- this.saveState();
+ //this.saveState();
this.targetLayoutManager.widthSynchronization();
this.sourceLayoutManager.widthSynchronization();
@@ -187,7 +187,7 @@
addItem : function(component, item) {
//var newItem = Object.clone(item);
- item.doNormal();
+ item.doNormal(Richfaces.getExternalClass(item.rowIndex), component.columnsClasses);
component.shuttleTbody.insertBefore(item._node, null);
component.shuttleItems.push(item);
@@ -201,10 +201,10 @@
component.shuttleTbody = table.tBodies[0];
},
- saveState : function() {
+ /*saveState : function() {
this.targetList.saveState();
this.sourceList.saveState();
- },
+ },*/
moveItemByClick : function(event, sourceComponent, targetComponent, layoutManager) {
var item = this.sourceList.getEventTargetRow(event);
@@ -212,7 +212,7 @@
this.controlListManager();
this.targetList.controlListManager();
- this.saveState();
+ //this.saveState();
this.targetLayoutManager.widthSynchronization();
this.sourceLayoutManager.widthSynchronization();
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-22
16:44:13 UTC (rev 4991)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-22
16:58:38 UTC (rev 4992)
@@ -188,8 +188,8 @@
var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');
- var listShuttle = new Richfaces.ListShuttle(new
Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab',
'#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper',
cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context,
component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem),
- new Richfaces.ListShuttle.Source('#{clientId}',
'#{clientId}internal_tab', '#{clientId}internal_header_tab',
'#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem),
+ var listShuttle = new Richfaces.ListShuttle(new
Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab',
'#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper',
cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context,
component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
+ new Richfaces.ListShuttle.Source('#{clientId}',
'#{clientId}internal_tab', '#{clientId}internal_header_tab',
'#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
"#{clientId}", listShuttleCotrolsIdPrefix,
"#{switchByClick}", sourceLayoutManager, targetLayoutManager,
#{this:getAsEventHandler(context, component, "onlistchanged")});
var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');