Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
if(!dojo._hasResource["dojox.grid._grid.rowbar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2
dojo._hasResource["dojox.grid._grid.rowbar"] = true;
3
dojo.provide("dojox.grid._grid.rowbar");
4
dojo.require("dojox.grid._grid.view");
5
 
6
dojo.declare('dojox.GridRowView', dojox.GridView, {
7
	// summary:
8
	//	Custom grid view. If used in a grid structure, provides a small selectable region for grid rows.
9
	defaultWidth: "3em",
10
	noscroll: true,
11
	padBorderWidth: 2,
12
	buildRendering: function(){
13
		this.inherited('buildRendering', arguments);
14
		this.scrollboxNode.style.overflow = "hidden";
15
		this.headerNode.style.visibility = "hidden";
16
	},
17
	getWidth: function(){
18
		return this.viewWidth || this.defaultWidth;
19
	},
20
	buildRowContent: function(inRowIndex, inRowNode){
21
		var w = this.contentNode.offsetWidth - this.padBorderWidth
22
		inRowNode.innerHTML = '<table style="width:' + w + 'px;" role="wairole:presentation"><tr><td class="dojoxGrid-rowbar-inner"></td></tr></table>';
23
	},
24
	renderHeader: function(){
25
	},
26
	resize: function(){
27
		this.resizeHeight();
28
	},
29
	// styling
30
	doStyleRowNode: function(inRowIndex, inRowNode){
31
		var n = [ "dojoxGrid-rowbar" ];
32
		if(this.grid.rows.isOver(inRowIndex)){
33
			n.push("dojoxGrid-rowbar-over");
34
		}
35
		if(this.grid.selection.isSelected(inRowIndex)){
36
			n.push("dojoxGrid-rowbar-selected");
37
		}
38
		inRowNode.className = n.join(" ");
39
	},
40
	// event handlers
41
	domouseover: function(e){
42
		this.grid.onMouseOverRow(e);
43
	},
44
	domouseout: function(e){
45
		if(!this.isIntraRowEvent(e)){
46
			this.grid.onMouseOutRow(e);
47
		}
48
	}
49
});
50
 
51
}