Author: vmolotkov
Date: 2007-11-08 15:18:29 -0500 (Thu, 08 Nov 2007)
New Revision: 3840
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
control list was added
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-08
20:18:10 UTC (rev 3839)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-08
20:18:29 UTC (rev 3840)
@@ -19,7 +19,7 @@
}
Shuttle = function(containerId, contentTableId, headerTableId, focusKeeperId,
valueKeeperId,
- upControlId, downControlId, firstControlId, lastControlId, onclickControlId) {
+ upControlIdPr, downControlIdPr, firstControlIdPr, lastControlIdPr,
onclickControlId) {
this.container = document.getElementById(containerId);
this.shuttleTable = document.getElementById(contentTableId);
this.shuttleTbody = this.shuttleTable.tBodies[0];
@@ -41,7 +41,7 @@
this.focusKeeper.onkeydown = function(e) {
obj.onkeydownHandler(window.event || e);
}
- this.init(contentTableId, headerTableId, upControlId, downControlId, firstControlId,
lastControlId, onclickControlId, focusKeeperId);
+ this.init(contentTableId, headerTableId, containerId + upControlIdPr, containerId +
downControlIdPr, containerId + firstControlIdPr, containerId + lastControlIdPr,
onclickControlId, focusKeeperId);
}
Shuttle.ASC = "acs";
@@ -67,10 +67,10 @@
Shuttle.prototype.init = function(contentTableId, headerTableId, upControlId,
downControlId, firstControlId, lastControlId, onclickControlId, focusKeeperId) {
var obj = this;
Shuttle.setFocus(focusKeeperId);
- document.getElementById(upControlId).onclick = function()
{obj.moveSelectedItems('up');};
- document.getElementById(downControlId).onclick = function()
{obj.moveSelectedItems('down');};
- document.getElementById(firstControlId).onclick = function()
{obj.moveSelectedItems('first');};
- document.getElementById(lastControlId).onclick = function()
{obj.moveSelectedItems('last');};
+ document.getElementById(upControlId).onclick = function()
{obj.moveSelectedItems('up');return false;};
+ document.getElementById(downControlId).onclick = function()
{obj.moveSelectedItems('down');return false;};
+ document.getElementById(firstControlId).onclick = function()
{obj.moveSelectedItems('first');return false;};
+ document.getElementById(lastControlId).onclick = function()
{obj.moveSelectedItems('last');return false;};
document.getElementById(contentTableId).onclick = function(e)
{obj.onclickHandler(window.event || e);};
this.shuttleTop = LayoutManager.getElemXY(this.shuttleTable).top;
}
@@ -161,8 +161,7 @@
for (var i = 0; i < rows.length; i++) {
this.shuttleItems.push(rows[i].item);
}
-
- this.saveState();
+ this.saveState();
}
}
Show replies by date