Changeset 13860
- Timestamp:
- 06/02/08 12:51:20 (6 months ago)
- Location:
- dojox/trunk/grid
- Files:
-
- 10 modified
-
cells/_base.js (modified) (3 diffs)
-
DataGrid.js (modified) (1 diff)
-
tests/test_change_structure.html (modified) (1 diff)
-
tests/test_events.html (modified) (1 diff)
-
tests/test_expand.html (modified) (2 diffs)
-
tests/test_sizing.html (modified) (1 diff)
-
tests/test_sizing_ResizeHandle.html (modified) (1 diff)
-
tests/test_subgrid.html (modified) (4 diffs)
-
tests/yahooSearch.js (modified) (3 diffs)
-
_View.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dojox/trunk/grid/cells/_base.js
r13849 r13860 39 39 40 40 // data source 41 format: function(in Item, inRowIndex){41 format: function(inRowIndex, inItem){ 42 42 // summary: 43 43 // provides the html for a given grid cell. … … 45 45 // grid row index 46 46 // returns: html for a given grid cell 47 var f, i=this.grid.edit.info, d=this.get ? this.get(in Item, inRowIndex) : (this.value || this.defaultValue);47 var f, i=this.grid.edit.info, d=this.get ? this.get(inRowIndex, inItem) : (this.value || this.defaultValue); 48 48 if(this.editable && (this.alwaysEditing || (i.rowIndex==inRowIndex && i.cell==this))){ 49 49 return this.formatEditing(d, inRowIndex); … … 287 287 postscript: function(){ 288 288 this.editable = false; 289 this.get = function(in Item, inRowIndex){289 this.get = function(inRowIndex){ 290 290 return inRowIndex + 1; 291 291 }; -
dojox/trunk/grid/DataGrid.js
r13855 r13860 35 35 }, 36 36 37 get: function(in Item, inRowIndex){37 get: function(inRowIndex, inItem){ 38 38 return (!inItem ? this.defaultValue : (!this.field ? this.value : this.grid.store.getValue(inItem, this.field))); 39 39 }, -
dojox/trunk/grid/tests/test_change_structure.html
r13818 r13860 33 33 34 34 // get can return data for a cell of the grid 35 function get(in Item, inRowIndex) {35 function get(inRowIndex) { 36 36 return [this.index, inRowIndex].join(', '); 37 37 } -
dojox/trunk/grid/tests/test_events.html
r13818 r13860 71 71 ]; 72 72 73 getEventName = function(in Item, inRowIndex) {73 getEventName = function(inRowIndex) { 74 74 return eventRows[inRowIndex].name; 75 75 }; 76 76 77 getEventData = function(in Item, inRowIndex) {77 getEventData = function(inRowIndex) { 78 78 var d = eventRows[inRowIndex].data; 79 79 var r = []; -
dojox/trunk/grid/tests/test_expand.html
r13832 r13860 55 55 56 56 // get can return data for each cell of the grid 57 function get(in Item, inRowIndex) {57 function get(inRowIndex) { 58 58 return [this.index, inRowIndex].join(', '); 59 59 } 60 60 61 function getDetail(in Item, inRowIndex) {61 function getDetail(inRowIndex) { 62 62 if (this.grid.expandedRows[inRowIndex]) { 63 63 var n = (inRowIndex % 2); … … 77 77 } 78 78 79 function getCheck(in Item, inRowIndex) {79 function getCheck(inRowIndex) { 80 80 if (!this.grid.expandedRows) 81 81 this.grid.expandedRows = [ ]; -
dojox/trunk/grid/tests/test_sizing.html
r13832 r13860 50 50 51 51 // get can return data for each cell of the grid 52 function get(in Item, inRowIndex) {52 function get(inRowIndex) { 53 53 return [this.index, inRowIndex].join(', '); 54 54 } -
dojox/trunk/grid/tests/test_sizing_ResizeHandle.html
r13832 r13860 54 54 55 55 // get can return data for each cell of the grid 56 function get(in Item, inRowIndex) {56 function get(inRowIndex) { 57 57 return [this.index, inRowIndex].join(', '); 58 58 } -
dojox/trunk/grid/tests/test_subgrid.html
r13832 r13860 43 43 ]; 44 44 45 getDetailData = function(in Item, inRowIndex) {45 getDetailData = function(inRowIndex) { 46 46 var row = data[this.grid.dataRow % data.length]; 47 47 switch (this.index) { … … 63 63 } 64 64 65 getName = function(in Item, inRowIndex) {65 getName = function(inRowIndex) { 66 66 var row = data[inRowIndex % data.length]; 67 67 return row[2]; … … 84 84 85 85 // html for the +/- cell 86 function getCheck(in Item, inRowIndex) {86 function getCheck(inRowIndex) { 87 87 var image = (detailRows[inRowIndex] ? 'open.gif' : 'closed.gif'); 88 88 var show = (detailRows[inRowIndex] ? 'false' : 'true') … … 91 91 92 92 // provide html for the Detail cell in the master grid 93 function getDetail(in Item, inRowIndex) {93 function getDetail(inRowIndex) { 94 94 var cell = this; 95 95 // we can affect styles and content here, but we have to wait to access actual nodes -
dojox/trunk/grid/tests/yahooSearch.js
r13846 r13860 28 28 }; 29 29 30 var getLink = function(in Item, inRowIndex){30 var getLink = function(inRowIndex, inItem){ 31 31 if(!inItem){ return ' '; } 32 32 var text = getCellData(inItem, 'Title'); … … 47 47 }; 48 48 49 var getImage = function(in Item, inRowIndex){49 var getImage = function(inRowIndex, inItem){ 50 50 if(!inItem){ return ' '; } 51 51 var thumb = getCellData(inItem, "Thumbnail"); … … 60 60 }; 61 61 62 var getDimensions = function(in Item, inRowIndex){62 var getDimensions = function(inRowIndex, inItem){ 63 63 if(!inItem){ return ' '; } 64 64 var w = getCellData(inItem, "Width"); -
dojox/trunk/grid/_View.js
r13849 r13860 339 339 m = cell.markup, cc = cell.customClasses = [], cs = cell.customStyles = []; 340 340 // content (format can fill in cc and cs as side-effects) 341 m[5] = cell.format(i tem, inRowIndex);341 m[5] = cell.format(inRowIndex, item); 342 342 // classes 343 343 m[1] = cc.join(' ');