You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/05/13 19:47:40 UTC
svn commit: r655953 -
/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Author: bommel
Date: Tue May 13 10:47:39 2008
New Revision: 655953
URL: http://svn.apache.org/viewvc?rev=655953&view=rev
Log:
(TOBAGO-666) Selection of pageable sheet doesn't work
Modified:
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=655953&r1=655952&r2=655953&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Tue May 13 10:47:39 2008
@@ -453,7 +453,7 @@
Tobago.Sheet.prototype.addSelectionListener = function() {
var row = Tobago.element(this.firstRowId);
if (row) {
- var i = this.firstRowIndex;
+ var i = 0;
while (row) {
// LOG.debug("rowId = " + row.id + " next i=" + i);
Tobago.addBindEventListener(row, "click", this, "doSelection");
@@ -833,6 +833,7 @@
Tobago.Sheet.prototype.selectAll = function() {
var row = Tobago.element(this.firstRowId);
var i = this.firstRowIndex;
+ var j = 0;
var selected = Tobago.element(this.selectedId);
while (row) {
var image = this.getSelectionElementForRow(row);
@@ -842,7 +843,8 @@
selected.value = selected.value + i + ",";
}
}
- row = this.getSiblingRow(row, ++i);
+ i++;
+ row = this.getSiblingRow(row, ++j);
}
this.updateSelectionView();
};
@@ -853,13 +855,15 @@
var image = this.getSelectionElementForRow(row);
if (image) {
var i = this.firstRowIndex;
+ var j = 0;
while (row) {
image = this.getSelectionElementForRow(row);
if (!image || !image.src.match(/Disabled/)) {
var re = new RegExp("," + i + ",", 'g');
selected.value = selected.value.replace(re, ",");
}
- row = this.getSiblingRow(row, ++i);
+ i++;
+ row = this.getSiblingRow(row, ++j);
}
} else {
selected.value = ",";
@@ -870,9 +874,11 @@
Tobago.Sheet.prototype.toggleAllSelections = function(sheetId) {
var row = Tobago.element(this.firstRowId);
var i = this.firstRowIndex;
+ var j = 0;
while (row) {
this.toggleSelection(i);
- row = this.getSiblingRow(row, ++i);
+ i++;
+ row = this.getSiblingRow(row, ++j);
}
this.updateSelectionView();
};