[richfaces-svn-commits] JBoss Rich Faces SVN: r1132 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Jun 12 06:58:40 EDT 2007


Author: konstantin.mishin
Date: 2007-06-12 06:58:40 -0400 (Tue, 12 Jun 2007)
New Revision: 1132

Modified:
   trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
small fix

Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js	2007-06-12 07:26:32 UTC (rev 1131)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js	2007-06-12 10:58:40 UTC (rev 1132)
@@ -225,7 +225,7 @@
 	restoreState: function() {
 		this.selectionFlag = null;
 		this.selection.initRanges($(this.inputElement).value);
-		this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
+	//	this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
 		var i = 0;
 		var j;
 		while(i < this.selection.ranges.length) {
@@ -360,13 +360,14 @@
 		}		
 		var range;
 		if ( event.shiftKey && !event.ctrlKey && !event.altKey) {
+			this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
 			this.selectionFlag = "x";
 			if(!this.shiftRow) {
 				this.shiftRow = this.activeRow;
 			}
 			this.startRow = this.shiftRow;
 			if (((this.startRow <= rowIndex) && (this.firstIndex <= this.startRow || rowIndex < this.firstIndex))
-				|| (this.startRow > rowIndex && this.firstIndex > this.startRow && rowIndex >= this.firstIndex)) {
+				|| (this.startRow > rowIndex && this.firstIndex < this.startRow && rowIndex <= this.firstIndex)) {
 				this.endRow = rowIndex;
 			} else {
 				this.endRow = this.startRow;




More information about the richfaces-svn-commits mailing list