Author: pyaschenko
Date: 2008-03-25 12:09:00 -0400 (Tue, 25 Mar 2008)
New Revision: 7179
Modified:
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
trunk/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
RF-2525
listShuttle and pickList also were changed (the same problem)
Modified:
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
===================================================================
---
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2008-03-25
16:07:06 UTC (rev 7178)
+++
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2008-03-25
16:09:00 UTC (rev 7179)
@@ -46,13 +46,13 @@
public ListShuttleDemoBean() {
super();
- source = new ListShuttleOptionItem[2000];
- for (int i = 0; i < 2000; i++) {
+ source = new ListShuttleOptionItem[20];
+ for (int i = 0; i < 20; i++) {
source[i] = new ListShuttleOptionItem("Source Item " + i, new
Random().nextInt(40));
}
- target = new ListShuttleOptionItem[2000];
- for (int i = 0; i < 2000; i++) {
+ target = new ListShuttleOptionItem[20];
+ for (int i = 0; i < 20; i++) {
target[i] = new ListShuttleOptionItem("Target Item " + i, new
Random().nextInt(40));
}
Modified: trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2008-03-25 16:07:06 UTC
(rev 7178)
+++ trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2008-03-25 16:09:00 UTC
(rev 7179)
@@ -105,9 +105,7 @@
<ls:listShuttle onlistchanged="alert(event.type)"
id="listShuttle2" var="item"
sourceValue="#{listShuttleDemoBean.zebraItems}"
- columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1,
zebraRow2"
- moveControlsVerticalAlign="top"
orderControlsVerticalAlign="bottom"
- downControlClass="downControlClass">
+ columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1,
zebraRow2" downControlClass="downControlClass">
<rich:column width="10px">
<f:facet name="header">
<h:outputText value="Name" />
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-25
16:07:06 UTC (rev 7178)
+++
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-03-25
16:09:00 UTC (rev 7179)
@@ -42,7 +42,7 @@
}
Richfaces.ListShuttle.prototype = {
- initialize: function(targetList, sourceList, clientId, controlIds, switchByClick,
sourceLayoutManager, targetLayoutManager, onlistchanged) {
+ initialize: function(targetList, sourceList, clientId, controlIds, switchByClick,
onlistchanged) {
this.containerId = clientId;
this["rich:destructor"] = "destroy";
@@ -52,8 +52,8 @@
this.targetList = targetList;
this.sourceList = sourceList;
- this.targetLayoutManager = targetLayoutManager;
- this.sourceLayoutManager = sourceLayoutManager;
+ this.targetLayoutManager = targetList.layoutManager;
+ this.sourceLayoutManager = sourceList.layoutManager;
if (switchByClick == "true") {
this.targetList.shuttleTable.observe("click", function(e)
{this.moveItemByClick(window.event||e, this.targetList,
this.sourceList)}.bindAsEventListener(this));
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-25
16:07:06 UTC (rev 7178)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-25
16:09:00 UTC (rev 7179)
@@ -186,19 +186,14 @@
var clientId = '#{clientId}';
RichShuttleUtils.execOnLoad(
function(){
- var cotrolsIdPrefix = [['up', 'disup'], ['down',
'disdown'], ['last', 'dislast'],
['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'],
['copyAll', 'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']];
-
- 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,
#{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');
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
+ new Richfaces.ListShuttle(
+ new Richfaces.ListShuttle.Target('#{clientId}',
'#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab',
'#{clientId}tlFocusKeeper',
+ [['up', 'disup'], ['down', 'disdown'],
['last', 'dislast'], ['first','disfirst']],
+ '#{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}",
+ [['copy', 'discopy'], ['copyAll',
'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']],
+ "#{switchByClick}", #{this:getAsEventHandler(context, component,
"onlistchanged")});
},
RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
);
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
---
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-03-25
16:07:06 UTC (rev 7178)
+++
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-03-25
16:09:00 UTC (rev 7179)
@@ -64,6 +64,10 @@
this.sortOrder = Richfaces.ListBase.ASC;
this.clckHandler = function(e) {this.onclickHandler(window.event ||
e)}.bindAsEventListener(this);
this.shuttleTable.observe("click", this.clckHandler);
+
+ //
+ this.layoutManager = new LayoutManager(headerTableId, contentTableId);
+ this.layoutManager.widthSynchronization();
},
destroy: function() {
Modified: trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
---
trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-03-25
16:07:06 UTC (rev 7178)
+++
trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-03-25
16:09:00 UTC (rev 7179)
@@ -118,16 +118,14 @@
<script type="text/javascript">
var clientId = '#{cId}';
RichShuttleUtils.execOnLoad(function(){
- var cotrolsIdPrefix = [['up', 'disup'], ['down',
'disdown'], ['last', 'dislast'],
['first','disfirst']];
- var shuttle = new Richfaces.OrderingList('#{cId}',
'#{cId}internal_tab',
+ new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab',
'#{cId}internal_header_tab', '#{cId}focusKeeper',
- cotrolsIdPrefix, '#{cId}sortLabel',
+ [['up', 'disup'], ['down', 'disdown'],
['last', 'dislast'], ['first','disfirst']],
+ '#{cId}sortLabel',
#{this:getAsEventHandler(context, component, "onorderchanged")},
Richfaces.OrderingListSelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)});
- var layoutManager = new LayoutManager('#{cId}internal_header_tab',
'#{cId}internal_tab');
- layoutManager.widthSynchronization();
}, RichShuttleUtils.Condition.ElementPresent("#{cId}"), 100);
//setTimeout(init, 0);
</script>
Modified:
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
===================================================================
---
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2008-03-25
16:07:06 UTC (rev 7178)
+++
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2008-03-25
16:09:00 UTC (rev 7179)
@@ -1,8 +1,8 @@
if(!window.Richfaces) window.Richfaces = {};
Richfaces.PickList = Class.create(Richfaces.ListShuttle, {
- initialize : function($super, targetList, sourceList, clientId, controlIds,
switchByClick, sourceLayoutManager, targetLayoutManager, onlistchanged, valueKeeperId) {
- $super(targetList, sourceList, clientId, controlIds, switchByClick,
sourceLayoutManager, targetLayoutManager, onlistchanged);
+ initialize : function($super, targetList, sourceList, clientId, controlIds,
switchByClick, onlistchanged, valueKeeperId) {
+ $super(targetList, sourceList, clientId, controlIds, switchByClick, onlistchanged);
this.valueKeeper = $(valueKeeperId);
//this.controlListManager();
},
Modified: trunk/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-03-25 16:07:06 UTC (rev
7178)
+++ trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-03-25 16:09:00 UTC (rev
7179)
@@ -157,18 +157,11 @@
var clientId = '#{clientId}';
RichShuttleUtils.execOnLoad(
function(){
- var cotrolsIdPrefix = [['up', 'disup'], ['down',
'disdown'], ['last', 'dislast'],
['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'],
['copyAll', 'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']];
-
- 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.PickList(new
Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab',
'#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined,
Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context,
component)}, #{this:getRowClassesAsJSArray(context, component)}),
+ new Richfaces.PickList(new Richfaces.PickList.Target('#{clientId}',
'#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab',
'#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
new Richfaces.PickList.Source('#{clientId}',
'#{clientId}internal_tab', '#{clientId}internal_header_tab',
'#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
- "#{clientId}", listShuttleCotrolsIdPrefix,
"#{switchByClick}", sourceLayoutManager, targetLayoutManager,
#{this:getAsEventHandler(context, component, "onlistchanged")},
+ "#{clientId}", [['copy', 'discopy'],
['copyAll', 'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']],
+ "#{switchByClick}", #{this:getAsEventHandler(context,
component, "onlistchanged")},
"#{clientId}valueKeeper");
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
},
RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
);