Changeset 12793
- Timestamp:
- 02/29/08 15:06:15 (9 months ago)
- Location:
- dojox/trunk/grid
- Files:
-
- 4 modified
-
tests/test_events.html (modified) (2 diffs)
-
_grid/builder.js (modified) (2 diffs)
-
_grid/publicEvents.js (modified) (5 diffs)
-
_grid/view.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dojox/trunk/grid/tests/test_events.html
r11257 r12793 52 52 { name: 'onCellMouseOver' }, 53 53 { name: 'onCellMouseOut' }, 54 { name: 'onCellMouseDown' }, 54 55 { name: 'onRowMouseOver' }, 55 56 { name: 'onRowMouseOut' }, 57 { name: 'onRowMouseDown' }, 56 58 { name: 'onHeaderCellClick' }, 57 59 { name: 'onHeaderClick', properties: ['rowIndex'] }, … … 60 62 { name: 'onHeaderCellMouseOver' }, 61 63 { name: 'onHeaderCellMouseOut' }, 64 { name: 'onHeaderCellMouseDown' }, 62 65 { name: 'onHeaderMouseOver' }, 63 66 { name: 'onHeaderMouseOut' }, -
dojox/trunk/grid/_grid/builder.js
r12791 r12793 146 146 } 147 147 } 148 }, 149 150 domousedown: function(e){ 151 if (e.cellNode) 152 this.grid.onMouseDown(e); 153 this.grid.onMouseDownRow(e) 148 154 } 149 155 … … 341 347 if((this.overRightResizeArea(e) || this.overLeftResizeArea(e)) && this.canResize(e)){ 342 348 this.beginColumnResize(e); 349 }else{ 350 this.grid.onMouseDown(e); 351 this.grid.onMouseOverRow(e); 343 352 } 344 353 //else{ -
dojox/trunk/grid/_grid/publicEvents.js
r12742 r12793 130 130 e.rowIndex == -1 ? this.onHeaderCellMouseOut(e) : this.onCellMouseOut(e); 131 131 }, 132 133 onMouseDown: function(e){ 134 // summary: 135 // Event fired when mouse is down inside grid. 136 // e: Event 137 // Decorated event object that contains reference to grid, cell, and rowIndex 138 e.rowIndex == -1 ? this.onHeaderCellMouseDown(e) : this.onCellMouseDown(e); 139 }, 140 132 141 onMouseOverRow: function(e){ 133 142 // summary: … … 152 161 } 153 162 }, 163 164 onMouseDownRow: function(e){ 165 // summary: 166 // Event fired when mouse is down inside grid row 167 // e: Event 168 // Decorated event object that contains reference to grid, cell, and rowIndex 169 if(e.rowIndex != -1) 170 this.onRowMouseDown(e); 171 }, 154 172 155 173 // cell events … … 168 186 // Decorated event object which contains reference to grid, cell, and rowIndex 169 187 dojo.removeClass(e.cellNode, this.cellOverClass); 188 }, 189 190 onCellMouseDown: function(e){ 191 // summary: 192 // Event fired when mouse is down in a header cell. 193 // e: Event 194 // Decorated event object which contains reference to grid, cell, and rowIndex 170 195 }, 171 196 … … 246 271 // Decorated event object contains reference to grid, cell, and rowIndex 247 272 }, 273 274 onRowMouseDown: function(e){ 275 // summary: 276 // Event fired when mouse is down in a row. 277 // e: Event 278 // Decorated event object which contains reference to grid, cell, and rowIndex 279 }, 248 280 249 281 onRowContextMenu: function(e){ … … 284 316 // Decorated event object which contains reference to grid, cell, and rowIndex 285 317 dojo.removeClass(e.cellNode, this.cellOverClass); 318 }, 319 320 onHeaderCellMouseDown: function(e) { 321 // summary: 322 // Event fired when mouse is down in a header cell. 323 // e: Event 324 // Decorated event object which contains reference to grid, cell, and rowIndex 286 325 }, 287 326 -
dojox/trunk/grid/_grid/view.js
r12791 r12793 34 34 postCreate: function(){ 35 35 this.connect(this.scrollboxNode,"onscroll","doscroll"); 36 dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu' ]);36 dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]); 37 37 dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]); 38 38 this.content = new dojox.grid.contentBuilder(this);