root / trunk / web / dojo / dojox / grid / _RowSelector.js
History | View | Annotate | Download (1.59 KB)
1 | 9 | andrej.cim | /*
|
---|---|---|---|
2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||
3 | Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||
4 | see: http://dojotoolkit.org/license for details
|
||
5 | */
|
||
6 | |||
7 | |||
8 | if(!dojo._hasResource["dojox.grid._RowSelector"]){ |
||
9 | dojo._hasResource["dojox.grid._RowSelector"]=true; |
||
10 | dojo.provide("dojox.grid._RowSelector");
|
||
11 | dojo.require("dojox.grid._View");
|
||
12 | dojo.declare("dojox.grid._RowSelector",dojox.grid._View,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){ |
||
13 | this.inherited("buildRendering",arguments); |
||
14 | this.scrollboxNode.style.overflow="hidden"; |
||
15 | this.headerNode.style.visibility="hidden"; |
||
16 | },getWidth:function(){ |
||
17 | return this.viewWidth||this.defaultWidth; |
||
18 | },buildRowContent:function(_1,_2){ |
||
19 | var w=this.contentWidth||0; |
||
20 | _2.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\"> </td></tr></table>"; |
||
21 | },renderHeader:function(){ |
||
22 | },updateRow:function(){ |
||
23 | },resize:function(){ |
||
24 | this.adaptHeight();
|
||
25 | },adaptWidth:function(){ |
||
26 | if(!("contentWidth" in this)&&this.contentNode){ |
||
27 | this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth; |
||
28 | } |
||
29 | },doStyleRowNode:function(_3,_4){ |
||
30 | var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"]; |
||
31 | if(this.grid.rows.isOver(_3)){ |
||
32 | n.push("dojoxGridRowbarOver");
|
||
33 | } |
||
34 | if(this.grid.selection.isSelected(_3)){ |
||
35 | n.push("dojoxGridRowbarSelected");
|
||
36 | } |
||
37 | _4.className=n.join(" ");
|
||
38 | },domouseover:function(e){ |
||
39 | this.grid.onMouseOverRow(e);
|
||
40 | },domouseout:function(e){ |
||
41 | if(!this.isIntraRowEvent(e)){ |
||
42 | this.grid.onMouseOutRow(e);
|
||
43 | } |
||
44 | }}); |
||
45 | } |