Author: vmolotkov
Date: 2007-11-06 07:25:15 -0500 (Tue, 06 Nov 2007)
New Revision: 3790
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
Correction of component loading
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2007-11-06
12:16:41 UTC (rev 3789)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2007-11-06
12:25:15 UTC (rev 3790)
@@ -1,5 +1,4 @@
LayoutManager = function(headerId, contentId) {
- alert('');
this.headerTable = document.getElementById(headerId);
this.contentTable = document.getElementById(contentId);
this.headerDiv = this.headerTable.parentNode;
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-06
12:16:41 UTC (rev 3789)
+++
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-06
12:25:15 UTC (rev 3790)
@@ -54,8 +54,6 @@
Shuttle.prototype.init = function(contentTableId, headerTableId, upControlId,
downControlId, firstControlId, lastControlId, onclickControlId, focusKeeperId) {
var obj = this;
Shuttle.setFocus(focusKeeperId);
- var layoutManager = new LayoutManager(headerTableId, contentTableId);
- layoutManager.widthSynchronization();
document.getElementById(upControlId).onclick = function()
{obj.moveSelectedItems('up');};
document.getElementById(downControlId).onclick = function()
{obj.moveSelectedItems('down');};
document.getElementById(firstControlId).onclick = function()
{obj.moveSelectedItems('first');};
Modified:
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
---
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-06
12:16:41 UTC (rev 3789)
+++
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-06
12:25:15 UTC (rev 3790)
@@ -50,11 +50,20 @@
<a id="#{clientId}last" href="#" >last</a>
</div>
<f:clientId var="cId"/>
- <script type="text/javascript">'#{cId}'
+ <script type="text/javascript">
+ var clientId = '#{cId}';
+ if (window.attachEvent) {
+ window.attachEvent("onload", init);
+ } else {
+ window.addEventListener("load", init, false);
+ }
document.body.onselectstart = function() {return false;};
document.body.className = "body";
- var shuttle = new Shuttle('#{cId}', '#{cId}internal_tab',
'#{cId}internal_header_tab',
- '#{cId}focusKeeper', '#{cId}valueKeeper','#{cId}up',
'#{cId}down', '#{cId}first',
- '#{cId}last', '#{cId}sortLabel');
+
+ var shuttle = new Shuttle('#{cId}', '#{cId}internal_tab',
'#{cId}internal_header_tab', '#{cId}focusKeeper',
'#{cId}valueKeeper','#{cId}up', '#{cId}down',
'#{cId}first', '#{cId}last', '#{cId}sortLabel');
+ function init() {
+ var layoutManager = new LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
+ layoutManager.widthSynchronization();
+ }
</script>
</f:root>
\ No newline at end of file
Show replies by date