From a6ec9b33c3577276834e237b9de6a3f8c180d575 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 10 Feb 2011 17:53:43 +0800 Subject: [PATCH] docs/symbols/src/Roo_grid_GridView.js.html --- docs/symbols/src/Roo_grid_GridView.js.html | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/docs/symbols/src/Roo_grid_GridView.js.html b/docs/symbols/src/Roo_grid_GridView.js.html index de25b78e14..73a12b5e4a 100644 --- a/docs/symbols/src/Roo_grid_GridView.js.html +++ b/docs/symbols/src/Roo_grid_GridView.js.html @@ -842,6 +842,9 @@ var ts = this.templates, ct = ts.cell, rt = ts.row; // buffers var buf = "", lbuf = "", cb, lcb, c, p = {}, rp = {}, r, rowIndex; + + var hasListener = this.grid.hasListener('rowclass'); + var rowcfg = {}; for(var j = 0, len = rs.length; j < len; j++){ r = rs[j]; cb = ""; lcb = ""; rowIndex = (j+startRow); for(var i = 0; i < colCount; i++){ @@ -863,14 +866,24 @@ } var alt = []; if(stripe && ((rowIndex+1) % 2 == 0)){ - alt[0] = "x-grid-row-alt"; + alt.push("x-grid-row-alt") } if(r.dirty){ - alt[1] = " x-grid-dirty-row"; + alt.push( " x-grid-dirty-row"); } rp.cells = lcb; if(this.getRowClass){ - alt[2] = this.getRowClass(r, rowIndex); + alt.push(this.getRowClass(r, rowIndex)); + } + if (hasListener) { + rowcfg = { + + record: r, + rowIndex : rowIndex, + rowClass : ''; + } + this.grid.fireEvent('rowclass', this, rowcfg); + alt.push(rowcfg.rowClass); } rp.alt = alt.join(" "); lbuf+= rt.apply(rp); @@ -883,6 +896,8 @@ var ts = this.templates, ct = ts.cell, rt = ts.row; // buffers var buf = [], lbuf = [], cb, lcb, c, p = {}, rp = {}, r, rowIndex; + var hasListener = this.grid.hasListener('rowclass'); + var rowcfg = {}; for(var j = 0, len = rs.length; j < len; j++){ r = rs[j]; cb = []; lcb = []; rowIndex = (j+startRow); for(var i = 0; i < colCount; i++){ @@ -904,14 +919,24 @@ } var alt = []; if(stripe && ((rowIndex+1) % 2 == 0)){ - alt[0] = "x-grid-row-alt"; + alt.push( "x-grid-row-alt"); } if(r.dirty){ - alt[1] = " x-grid-dirty-row"; + alt.push(" x-grid-dirty-row"); } rp.cells = lcb; if(this.getRowClass){ - alt[2] = this.getRowClass(r, rowIndex); + alt.push( this.getRowClass(r, rowIndex)); + } + if (hasListener) { + rowcfg = { + + record: r, + rowIndex : rowIndex, + rowClass : ''; + } + this.grid.fireEvent('rowclass', this, rowcfg); + alt.push(rowcfg.rowClass); } rp.alt = alt.join(" "); rp.cells = lcb.join(""); -- 2.39.2