git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git]
/
src
/
grid
/
View.js
diff --git
a/src/grid/View.js
b/src/grid/View.js
index
cb47756
..
c1b52a6
100644
(file)
--- a/
src/grid/View.js
+++ b/
src/grid/View.js
@@
-72,15
+72,22
@@
Ext.define('Ext.grid.View', {
this.doStripeRows(index);
},
this.doStripeRows(index);
},
+ onUpdate: function(ds, record, operation) {
+ var index = ds.indexOf(record);
+ this.callParent(arguments);
+ this.doStripeRows(index, index);
+ },
+
/**
* Stripe rows from a particular row index
* @param {Number} startRow
/**
* Stripe rows from a particular row index
* @param {Number} startRow
+ * @param {Number} endRow Optional argument specifying the last row to process. By default process up to the last row.
* @private
*/
* @private
*/
- doStripeRows: function(startRow) {
+ doStripeRows: function(startRow
, endRow
) {
// ensure stripeRows configuration is turned on
if (this.stripeRows) {
// ensure stripeRows configuration is turned on
if (this.stripeRows) {
- var rows = this.getNodes(startRow),
+ var rows = this.getNodes(startRow
, endRow
),
rowsLn = rows.length,
i = 0,
row;
rowsLn = rows.length,
i = 0,
row;
@@
-89,8
+96,9
@@
Ext.define('Ext.grid.View', {
row = rows[i];
// Remove prior applied row classes.
row.className = row.className.replace(this.rowClsRe, ' ');
row = rows[i];
// Remove prior applied row classes.
row.className = row.className.replace(this.rowClsRe, ' ');
+ startRow++;
// Every odd row will get an additional cls
// Every odd row will get an additional cls
- if (
i % 2 === 1
) {
+ if (
startRow % 2 === 0
) {
row.className += (' ' + this.altRowCls);
}
}
row.className += (' ' + this.altRowCls);
}
}