a:73:{s:9:"#provides";s:28:"dojox.grid.compat._grid.view";s:9:"#resource";s:25:"grid/compat/_grid/view.js";s:9:"#requires";a:3:{i:0;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}i:1;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Templated";i:2;s:5:"dijit";}i:2;a:2:{i:0;s:6:"common";i:1;s:31:"dojox.grid.compat._grid.builder";}}s:14:"dojox.GridView";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:2:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Templated";}}s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dijit._Templated.prototype";}}s:7:"summary";s:228:"A collection of grid columns. A grid is comprised of a set of views that stack horizontally.
Grid creates views automatically based on grid's layout structure.
Users should typically not need to access individual views directly.";s:9:"classlike";b:1;}s:27:"dojox.GridView.defaultWidth";a:3:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:6:"String";s:7:"summary";s:26:"Default widget of the view";}s:24:"dojox.GridView.viewWidth";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:8:"instance";s:14:"dojox.GridView";s:4:"type";s:6:"String";s:7:"summary";s:37:"Width for the view, in valid css unit";}s:27:"dojox.GridView.templatePath";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:24:"dojox.GridView.themeable";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:23:"dojox.GridView.classTag";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:27:"dojox.GridView.marginBottom";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:21:"dojox.GridView.rowPad";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:34:"dojox.GridView.postMixInProperties";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:21:" this.rowNodes = [];";s:7:"summary";s:0:"";}s:25:"dojox.GridView.postCreate";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:626:" this.connect(this.scrollboxNode,"onscroll","doscroll");
dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]);
dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]);
this.content = new dojox.grid.contentBuilder(this);
this.header = new dojox.grid.headerBuilder(this);
//BiDi: in RTL case, style width='9000em' causes scrolling problem in head node
if(!dojo._isBodyLtr()){
this.headerNodeContainer.style.width = "";
}";s:7:"summary";s:0:"";}s:22:"dojox.GridView.destroy";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:81:" dojox.grid.removeNode(this.headerNode);
this.inherited("destroy", arguments);";s:7:"summary";s:0:"";}s:20:"dojox.GridView.focus";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:113:" if(dojo.isWebKit || dojo.isOpera){
this.hiddenFocusNode.focus();
}else{
this.scrollboxNode.focus();
}";s:7:"summary";s:0:"";}s:27:"dojox.GridView.setStructure";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"inStructure";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:489:" var vs = (this.structure = inStructure);
// FIXME: similar logic is duplicated in layout
if(vs.width && !isNaN(vs.width)){
this.viewWidth = vs.width + 'em';
}else{
this.viewWidth = vs.width || this.viewWidth; //|| this.defaultWidth;
}
this.onBeforeRow = vs.onBeforeRow;
this.noscroll = vs.noscroll;
if(this.noscroll){
this.scrollboxNode.style.overflow = "hidden";
}
// bookkeeping
this.testFlexCells();
// accomodate new structure
this.updateStructure();";s:7:"summary";s:0:"";}s:28:"dojox.GridView.testFlexCells";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:2672:"dojo.provide("dojox.grid.compat._grid.view");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.grid.compat._grid.builder");
dojo.declare('dojox.GridView',
[dijit._Widget, dijit._Templated],
{
// summary:
// A collection of grid columns. A grid is comprised of a set of views that stack horizontally.
// Grid creates views automatically based on grid's layout structure.
// Users should typically not need to access individual views directly.
//
// defaultWidth: String
// Default widget of the view
defaultWidth: "18em",
// viewWidth: String
// Width for the view, in valid css unit
viewWidth: "",
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/GridView.html"),
themeable: false,
classTag: 'dojoxGrid',
marginBottom: 0,
rowPad: 2,
postMixInProperties: function(){
this.rowNodes = [];
},
postCreate: function(){
this.connect(this.scrollboxNode,"onscroll","doscroll");
dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]);
dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]);
this.content = new dojox.grid.contentBuilder(this);
this.header = new dojox.grid.headerBuilder(this);
//BiDi: in RTL case, style width='9000em' causes scrolling problem in head node
if(!dojo._isBodyLtr()){
this.headerNodeContainer.style.width = "";
}
},
destroy: function(){
dojox.grid.removeNode(this.headerNode);
this.inherited("destroy", arguments);
},
// focus
focus: function(){
if(dojo.isWebKit || dojo.isOpera){
this.hiddenFocusNode.focus();
}else{
this.scrollboxNode.focus();
}
},
setStructure: function(inStructure){
var vs = (this.structure = inStructure);
// FIXME: similar logic is duplicated in layout
if(vs.width && !isNaN(vs.width)){
this.viewWidth = vs.width + 'em';
}else{
this.viewWidth = vs.width || this.viewWidth; //|| this.defaultWidth;
}
this.onBeforeRow = vs.onBeforeRow;
this.noscroll = vs.noscroll;
if(this.noscroll){
this.scrollboxNode.style.overflow = "hidden";
}
// bookkeeping
this.testFlexCells();
// accomodate new structure
this.updateStructure();
},
testFlexCells: function(){
// FIXME: cheater, this function does double duty as initializer and tester
this.flexCells = false;
for(var j=0, row; (row=this.structure.rows[j]); j++){
for(var i=0, cell; (cell=row[i]); i++){
cell.view = this;
this.flexCells = this.flexCells || cell.isFlex();
}
}
return this.flexCells;";s:7:"summary";s:0:"";}s:30:"dojox.GridView.updateStructure";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:2853:"dojo.provide("dojox.grid.compat._grid.view");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.grid.compat._grid.builder");
dojo.declare('dojox.GridView',
[dijit._Widget, dijit._Templated],
{
// summary:
// A collection of grid columns. A grid is comprised of a set of views that stack horizontally.
// Grid creates views automatically based on grid's layout structure.
// Users should typically not need to access individual views directly.
//
// defaultWidth: String
// Default widget of the view
defaultWidth: "18em",
// viewWidth: String
// Width for the view, in valid css unit
viewWidth: "",
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/GridView.html"),
themeable: false,
classTag: 'dojoxGrid',
marginBottom: 0,
rowPad: 2,
postMixInProperties: function(){
this.rowNodes = [];
},
postCreate: function(){
this.connect(this.scrollboxNode,"onscroll","doscroll");
dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]);
dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]);
this.content = new dojox.grid.contentBuilder(this);
this.header = new dojox.grid.headerBuilder(this);
//BiDi: in RTL case, style width='9000em' causes scrolling problem in head node
if(!dojo._isBodyLtr()){
this.headerNodeContainer.style.width = "";
}
},
destroy: function(){
dojox.grid.removeNode(this.headerNode);
this.inherited("destroy", arguments);
},
// focus
focus: function(){
if(dojo.isWebKit || dojo.isOpera){
this.hiddenFocusNode.focus();
}else{
this.scrollboxNode.focus();
}
},
setStructure: function(inStructure){
var vs = (this.structure = inStructure);
// FIXME: similar logic is duplicated in layout
if(vs.width && !isNaN(vs.width)){
this.viewWidth = vs.width + 'em';
}else{
this.viewWidth = vs.width || this.viewWidth; //|| this.defaultWidth;
}
this.onBeforeRow = vs.onBeforeRow;
this.noscroll = vs.noscroll;
if(this.noscroll){
this.scrollboxNode.style.overflow = "hidden";
}
// bookkeeping
this.testFlexCells();
// accomodate new structure
this.updateStructure();
},
testFlexCells: function(){
// FIXME: cheater, this function does double duty as initializer and tester
this.flexCells = false;
for(var j=0, row; (row=this.structure.rows[j]); j++){
for(var i=0, cell; (cell=row[i]); i++){
cell.view = this;
this.flexCells = this.flexCells || cell.isFlex();
}
}
return this.flexCells;
},
updateStructure: function(){
// header builder needs to update table map
this.header.update();
// content builder needs to update markup cache
this.content.update();";s:7:"summary";s:0:"";}s:32:"dojox.GridView.getScrollbarWidth";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:73:" return (this.noscroll ? 0 : dojox.grid.getScrollbarWidth()); // Integer";s:7:"returns";s:7:"Integer";s:7:"summary";s:0:"";}s:30:"dojox.GridView.getColumnsWidth";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:66:" return this.headerContentNode.firstChild.offsetWidth; // Integer";s:7:"returns";s:7:"Integer";s:7:"summary";s:0:"";}s:23:"dojox.GridView.getWidth";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:93:" return this.viewWidth || (this.getColumnsWidth()+this.getScrollbarWidth()) +'px'; // String";s:7:"returns";s:6:"String";s:7:"summary";s:0:"";}s:30:"dojox.GridView.getContentWidth";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:102:" return Math.max(0, dojo._getContentBox(this.domNode).w - this.getScrollbarWidth()) + 'px'; // String";s:7:"returns";s:6:"String";s:7:"summary";s:0:"";}s:21:"dojox.GridView.render";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:62:" this.scrollboxNode.style.height = '';
this.renderHeader();";s:7:"summary";s:0:"";}s:27:"dojox.GridView.renderHeader";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:86:" this.headerContentNode.innerHTML = this.header.generateHtml(this._getHeaderContent);";s:7:"summary";s:0:"";}s:32:"dojox.GridView._getHeaderContent";a:6:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"inCell";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:346:" var n = inCell.name || inCell.grid.getCellName(inCell);
if(inCell.index != inCell.grid.getSortIndex()){
return n;
}
return [ '
', inCell.grid.sortInfo > 0 ? '▼' : '▲', '
', n, '
' ].join('');";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"dojox.GridView.resize";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:42:" this.adaptHeight();
this.adaptWidth();";s:7:"summary";s:0:"";}s:27:"dojox.GridView.hasScrollbar";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:89:" return (this.scrollboxNode.clientHeight != this.scrollboxNode.offsetHeight); // Boolean";s:7:"returns";s:7:"Boolean";s:7:"summary";s:0:"";}s:26:"dojox.GridView.adaptHeight";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:228:" if(!this.grid.autoHeight){
var h = this.domNode.clientHeight;
if(!this.hasScrollbar()){ // no scrollbar is rendered
h -= dojox.grid.getScrollbarWidth();
}
dojox.grid.setStyleHeightPx(this.scrollboxNode, h);
}";s:7:"summary";s:0:"";}s:25:"dojox.GridView.adaptWidth";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:534:" if(this.flexCells){
// the view content width
this.contentWidth = this.getContentWidth();
this.headerContentNode.firstChild.style.width = this.contentWidth;
}
// FIXME: it should be easier to get w from this.scrollboxNode.clientWidth,
// but clientWidth seemingly does not include scrollbar width in some cases
var w = this.scrollboxNode.offsetWidth - this.getScrollbarWidth();
w = Math.max(w, this.getColumnsWidth()) + 'px';
with(this.contentNode){
style.width = '';
offsetWidth;
style.width = w;
}";s:7:"summary";s:0:"";}s:22:"dojox.GridView.setSize";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"w";a:1:{s:4:"type";s:0:"";}s:1:"h";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:164:" with(this.domNode.style){
if(w){
width = w;
}
height = (h >= 0 ? h + 'px' : '');
}
with(this.headerNode.style){
if(w){
width = w;
}
}";s:7:"summary";s:0:"";}s:24:"dojox.GridView.renderRow";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:10:"inHeightPx";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:159:" var rowNode = this.createRowNode(inRowIndex);
this.buildRow(inRowIndex, rowNode, inHeightPx);
this.grid.edit.restore(this, inRowIndex);
return rowNode;";s:7:"summary";s:0:"";}s:28:"dojox.GridView.createRowNode";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:224:" var node = document.createElement("div");
node.className = this.classTag + '-row';
node[dojox.grid.gridViewTag] = this.id;
node[dojox.grid.rowIndexTag] = inRowIndex;
this.rowNodes[inRowIndex] = node;
return node;";s:7:"summary";s:0:"";}s:23:"dojox.GridView.buildRow";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:86:" this.buildRowContent(inRowIndex, inRowNode);
this.styleRow(inRowIndex, inRowNode);";s:7:"summary";s:0:"";}s:30:"dojox.GridView.buildRowContent";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:218:" inRowNode.innerHTML = this.content.generateHtml(inRowIndex, inRowIndex);
if(this.flexCells){
// FIXME: accessing firstChild here breaks encapsulation
inRowNode.firstChild.style.width = this.contentWidth;
}";s:7:"summary";s:0:"";}s:25:"dojox.GridView.rowRemoved";a:2:{s:9:"prototype";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:25:"dojox.GridView.getRowNode";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:35:" return this.rowNodes[inRowIndex];";s:7:"summary";s:0:"";}s:26:"dojox.GridView.getCellNode";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:11:"inCellIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:109:" var row = this.getRowNode(inRowIndex);
if(row){
return this.content.getCellNode(row, inCellIndex);
}";s:7:"summary";s:0:"";}s:23:"dojox.GridView.styleRow";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:100:" inRowNode._style = dojox.grid.getStyleText(inRowNode);
this.styleRowNode(inRowIndex, inRowNode);";s:7:"summary";s:0:"";}s:27:"dojox.GridView.styleRowNode";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:67:" if(inRowNode){
this.doStyleRowNode(inRowIndex, inRowNode);
}";s:7:"summary";s:0:"";}s:29:"dojox.GridView.doStyleRowNode";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:48:" this.grid.styleRowNode(inRowIndex, inRowNode);";s:7:"summary";s:0:"";}s:24:"dojox.GridView.updateRow";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:10:"inHeightPx";a:1:{s:4:"type";s:0:"";}s:10:"inPageNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:150:" var rowNode = this.getRowNode(inRowIndex);
if(rowNode){
rowNode.style.height = '';
this.buildRow(inRowIndex, rowNode);
}
return rowNode;";s:7:"summary";s:0:"";}s:30:"dojox.GridView.updateRowStyles";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:61:" this.styleRowNode(inRowIndex, this.getRowNode(inRowIndex));";s:7:"summary";s:0:"";}s:22:"dojox.GridView.lastTop";a:3:{s:9:"prototype";s:14:"dojox.GridView";s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:26:"dojox.GridView.firstScroll";a:3:{s:9:"prototype";s:14:"dojox.GridView";s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:23:"dojox.GridView.doscroll";a:6:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"inEvent";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:8391:"dojo.provide("dojox.grid.compat._grid.view");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.grid.compat._grid.builder");
dojo.declare('dojox.GridView',
[dijit._Widget, dijit._Templated],
{
// summary:
// A collection of grid columns. A grid is comprised of a set of views that stack horizontally.
// Grid creates views automatically based on grid's layout structure.
// Users should typically not need to access individual views directly.
//
// defaultWidth: String
// Default widget of the view
defaultWidth: "18em",
// viewWidth: String
// Width for the view, in valid css unit
viewWidth: "",
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/GridView.html"),
themeable: false,
classTag: 'dojoxGrid',
marginBottom: 0,
rowPad: 2,
postMixInProperties: function(){
this.rowNodes = [];
},
postCreate: function(){
this.connect(this.scrollboxNode,"onscroll","doscroll");
dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]);
dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]);
this.content = new dojox.grid.contentBuilder(this);
this.header = new dojox.grid.headerBuilder(this);
//BiDi: in RTL case, style width='9000em' causes scrolling problem in head node
if(!dojo._isBodyLtr()){
this.headerNodeContainer.style.width = "";
}
},
destroy: function(){
dojox.grid.removeNode(this.headerNode);
this.inherited("destroy", arguments);
},
// focus
focus: function(){
if(dojo.isWebKit || dojo.isOpera){
this.hiddenFocusNode.focus();
}else{
this.scrollboxNode.focus();
}
},
setStructure: function(inStructure){
var vs = (this.structure = inStructure);
// FIXME: similar logic is duplicated in layout
if(vs.width && !isNaN(vs.width)){
this.viewWidth = vs.width + 'em';
}else{
this.viewWidth = vs.width || this.viewWidth; //|| this.defaultWidth;
}
this.onBeforeRow = vs.onBeforeRow;
this.noscroll = vs.noscroll;
if(this.noscroll){
this.scrollboxNode.style.overflow = "hidden";
}
// bookkeeping
this.testFlexCells();
// accomodate new structure
this.updateStructure();
},
testFlexCells: function(){
// FIXME: cheater, this function does double duty as initializer and tester
this.flexCells = false;
for(var j=0, row; (row=this.structure.rows[j]); j++){
for(var i=0, cell; (cell=row[i]); i++){
cell.view = this;
this.flexCells = this.flexCells || cell.isFlex();
}
}
return this.flexCells;
},
updateStructure: function(){
// header builder needs to update table map
this.header.update();
// content builder needs to update markup cache
this.content.update();
},
getScrollbarWidth: function(){
return (this.noscroll ? 0 : dojox.grid.getScrollbarWidth()); // Integer
},
getColumnsWidth: function(){
return this.headerContentNode.firstChild.offsetWidth; // Integer
},
getWidth: function(){
return this.viewWidth || (this.getColumnsWidth()+this.getScrollbarWidth()) +'px'; // String
},
getContentWidth: function(){
return Math.max(0, dojo._getContentBox(this.domNode).w - this.getScrollbarWidth()) + 'px'; // String
},
render: function(){
this.scrollboxNode.style.height = '';
this.renderHeader();
},
renderHeader: function(){
this.headerContentNode.innerHTML = this.header.generateHtml(this._getHeaderContent);
},
// note: not called in 'view' context
_getHeaderContent: function(inCell){
var n = inCell.name || inCell.grid.getCellName(inCell);
if(inCell.index != inCell.grid.getSortIndex()){
return n;
}
return [ '', inCell.grid.sortInfo > 0 ? '▼' : '▲', '
', n, '
' ].join('');
},
resize: function(){
this.adaptHeight();
this.adaptWidth();
},
hasScrollbar: function(){
return (this.scrollboxNode.clientHeight != this.scrollboxNode.offsetHeight); // Boolean
},
adaptHeight: function(){
if(!this.grid.autoHeight){
var h = this.domNode.clientHeight;
if(!this.hasScrollbar()){ // no scrollbar is rendered
h -= dojox.grid.getScrollbarWidth();
}
dojox.grid.setStyleHeightPx(this.scrollboxNode, h);
}
},
adaptWidth: function(){
if(this.flexCells){
// the view content width
this.contentWidth = this.getContentWidth();
this.headerContentNode.firstChild.style.width = this.contentWidth;
}
// FIXME: it should be easier to get w from this.scrollboxNode.clientWidth,
// but clientWidth seemingly does not include scrollbar width in some cases
var w = this.scrollboxNode.offsetWidth - this.getScrollbarWidth();
w = Math.max(w, this.getColumnsWidth()) + 'px';
with(this.contentNode){
style.width = '';
offsetWidth;
style.width = w;
}
},
setSize: function(w, h){
with(this.domNode.style){
if(w){
width = w;
}
height = (h >= 0 ? h + 'px' : '');
}
with(this.headerNode.style){
if(w){
width = w;
}
}
},
renderRow: function(inRowIndex, inHeightPx){
var rowNode = this.createRowNode(inRowIndex);
this.buildRow(inRowIndex, rowNode, inHeightPx);
this.grid.edit.restore(this, inRowIndex);
return rowNode;
},
createRowNode: function(inRowIndex){
var node = document.createElement("div");
node.className = this.classTag + '-row';
node[dojox.grid.gridViewTag] = this.id;
node[dojox.grid.rowIndexTag] = inRowIndex;
this.rowNodes[inRowIndex] = node;
return node;
},
buildRow: function(inRowIndex, inRowNode){
this.buildRowContent(inRowIndex, inRowNode);
this.styleRow(inRowIndex, inRowNode);
},
buildRowContent: function(inRowIndex, inRowNode){
inRowNode.innerHTML = this.content.generateHtml(inRowIndex, inRowIndex);
if(this.flexCells){
// FIXME: accessing firstChild here breaks encapsulation
inRowNode.firstChild.style.width = this.contentWidth;
}
},
rowRemoved:function(inRowIndex){
this.grid.edit.save(this, inRowIndex);
delete this.rowNodes[inRowIndex];
},
getRowNode: function(inRowIndex){
return this.rowNodes[inRowIndex];
},
getCellNode: function(inRowIndex, inCellIndex){
var row = this.getRowNode(inRowIndex);
if(row){
return this.content.getCellNode(row, inCellIndex);
}
},
// styling
styleRow: function(inRowIndex, inRowNode){
inRowNode._style = dojox.grid.getStyleText(inRowNode);
this.styleRowNode(inRowIndex, inRowNode);
},
styleRowNode: function(inRowIndex, inRowNode){
if(inRowNode){
this.doStyleRowNode(inRowIndex, inRowNode);
}
},
doStyleRowNode: function(inRowIndex, inRowNode){
this.grid.styleRowNode(inRowIndex, inRowNode);
},
// updating
updateRow: function(inRowIndex, inHeightPx, inPageNode){
var rowNode = this.getRowNode(inRowIndex);
if(rowNode){
rowNode.style.height = '';
this.buildRow(inRowIndex, rowNode);
}
return rowNode;
},
updateRowStyles: function(inRowIndex){
this.styleRowNode(inRowIndex, this.getRowNode(inRowIndex));
},
// scrolling
lastTop: 0,
firstScroll:0,
doscroll: function(inEvent){
//var s = dojo.marginBox(this.headerContentNode.firstChild);
var isLtr = dojo._isBodyLtr();
if(this.firstScroll < 2){
if((!isLtr && this.firstScroll == 1) || (isLtr && this.firstScroll == 0)){
var s = dojo.marginBox(this.headerNodeContainer);
if(dojo.isIE){
this.headerNodeContainer.style.width = s.w + this.getScrollbarWidth() + 'px';
}else if(dojo.isMoz){
//TODO currently only for FF, not sure for safari and opera
this.headerNodeContainer.style.width = s.w - this.getScrollbarWidth() + 'px';
//this.headerNodeContainer.style.width = s.w + 'px';
//set scroll to right in FF
if(isLtr){
this.scrollboxNode.scrollLeft = this.scrollboxNode.scrollWidth - this.scrollboxNode.clientWidth;
}else{
this.scrollboxNode.scrollLeft = this.scrollboxNode.clientWidth - this.scrollboxNode.scrollWidth;
}
}
}
this.firstScroll++;
}
this.headerNode.scrollLeft = this.scrollboxNode.scrollLeft;
// 'lastTop' is a semaphore to prevent feedback-loop with setScrollTop below
var top = this.scrollboxNode.scrollTop;
if(top != this.lastTop){
this.grid.scrollTo(top);
}";s:7:"returns";s:22:"Integer|String|Boolean";s:7:"summary";s:0:"";}s:27:"dojox.GridView.setScrollTop";a:6:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"inTop";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:8607:"dojo.provide("dojox.grid.compat._grid.view");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.grid.compat._grid.builder");
dojo.declare('dojox.GridView',
[dijit._Widget, dijit._Templated],
{
// summary:
// A collection of grid columns. A grid is comprised of a set of views that stack horizontally.
// Grid creates views automatically based on grid's layout structure.
// Users should typically not need to access individual views directly.
//
// defaultWidth: String
// Default widget of the view
defaultWidth: "18em",
// viewWidth: String
// Width for the view, in valid css unit
viewWidth: "",
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/GridView.html"),
themeable: false,
classTag: 'dojoxGrid',
marginBottom: 0,
rowPad: 2,
postMixInProperties: function(){
this.rowNodes = [];
},
postCreate: function(){
this.connect(this.scrollboxNode,"onscroll","doscroll");
dojox.grid.funnelEvents(this.contentNode, this, "doContentEvent", [ 'mouseover', 'mouseout', 'click', 'dblclick', 'contextmenu', 'mousedown' ]);
dojox.grid.funnelEvents(this.headerNode, this, "doHeaderEvent", [ 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'click', 'contextmenu' ]);
this.content = new dojox.grid.contentBuilder(this);
this.header = new dojox.grid.headerBuilder(this);
//BiDi: in RTL case, style width='9000em' causes scrolling problem in head node
if(!dojo._isBodyLtr()){
this.headerNodeContainer.style.width = "";
}
},
destroy: function(){
dojox.grid.removeNode(this.headerNode);
this.inherited("destroy", arguments);
},
// focus
focus: function(){
if(dojo.isWebKit || dojo.isOpera){
this.hiddenFocusNode.focus();
}else{
this.scrollboxNode.focus();
}
},
setStructure: function(inStructure){
var vs = (this.structure = inStructure);
// FIXME: similar logic is duplicated in layout
if(vs.width && !isNaN(vs.width)){
this.viewWidth = vs.width + 'em';
}else{
this.viewWidth = vs.width || this.viewWidth; //|| this.defaultWidth;
}
this.onBeforeRow = vs.onBeforeRow;
this.noscroll = vs.noscroll;
if(this.noscroll){
this.scrollboxNode.style.overflow = "hidden";
}
// bookkeeping
this.testFlexCells();
// accomodate new structure
this.updateStructure();
},
testFlexCells: function(){
// FIXME: cheater, this function does double duty as initializer and tester
this.flexCells = false;
for(var j=0, row; (row=this.structure.rows[j]); j++){
for(var i=0, cell; (cell=row[i]); i++){
cell.view = this;
this.flexCells = this.flexCells || cell.isFlex();
}
}
return this.flexCells;
},
updateStructure: function(){
// header builder needs to update table map
this.header.update();
// content builder needs to update markup cache
this.content.update();
},
getScrollbarWidth: function(){
return (this.noscroll ? 0 : dojox.grid.getScrollbarWidth()); // Integer
},
getColumnsWidth: function(){
return this.headerContentNode.firstChild.offsetWidth; // Integer
},
getWidth: function(){
return this.viewWidth || (this.getColumnsWidth()+this.getScrollbarWidth()) +'px'; // String
},
getContentWidth: function(){
return Math.max(0, dojo._getContentBox(this.domNode).w - this.getScrollbarWidth()) + 'px'; // String
},
render: function(){
this.scrollboxNode.style.height = '';
this.renderHeader();
},
renderHeader: function(){
this.headerContentNode.innerHTML = this.header.generateHtml(this._getHeaderContent);
},
// note: not called in 'view' context
_getHeaderContent: function(inCell){
var n = inCell.name || inCell.grid.getCellName(inCell);
if(inCell.index != inCell.grid.getSortIndex()){
return n;
}
return [ '', inCell.grid.sortInfo > 0 ? '▼' : '▲', '
', n, '
' ].join('');
},
resize: function(){
this.adaptHeight();
this.adaptWidth();
},
hasScrollbar: function(){
return (this.scrollboxNode.clientHeight != this.scrollboxNode.offsetHeight); // Boolean
},
adaptHeight: function(){
if(!this.grid.autoHeight){
var h = this.domNode.clientHeight;
if(!this.hasScrollbar()){ // no scrollbar is rendered
h -= dojox.grid.getScrollbarWidth();
}
dojox.grid.setStyleHeightPx(this.scrollboxNode, h);
}
},
adaptWidth: function(){
if(this.flexCells){
// the view content width
this.contentWidth = this.getContentWidth();
this.headerContentNode.firstChild.style.width = this.contentWidth;
}
// FIXME: it should be easier to get w from this.scrollboxNode.clientWidth,
// but clientWidth seemingly does not include scrollbar width in some cases
var w = this.scrollboxNode.offsetWidth - this.getScrollbarWidth();
w = Math.max(w, this.getColumnsWidth()) + 'px';
with(this.contentNode){
style.width = '';
offsetWidth;
style.width = w;
}
},
setSize: function(w, h){
with(this.domNode.style){
if(w){
width = w;
}
height = (h >= 0 ? h + 'px' : '');
}
with(this.headerNode.style){
if(w){
width = w;
}
}
},
renderRow: function(inRowIndex, inHeightPx){
var rowNode = this.createRowNode(inRowIndex);
this.buildRow(inRowIndex, rowNode, inHeightPx);
this.grid.edit.restore(this, inRowIndex);
return rowNode;
},
createRowNode: function(inRowIndex){
var node = document.createElement("div");
node.className = this.classTag + '-row';
node[dojox.grid.gridViewTag] = this.id;
node[dojox.grid.rowIndexTag] = inRowIndex;
this.rowNodes[inRowIndex] = node;
return node;
},
buildRow: function(inRowIndex, inRowNode){
this.buildRowContent(inRowIndex, inRowNode);
this.styleRow(inRowIndex, inRowNode);
},
buildRowContent: function(inRowIndex, inRowNode){
inRowNode.innerHTML = this.content.generateHtml(inRowIndex, inRowIndex);
if(this.flexCells){
// FIXME: accessing firstChild here breaks encapsulation
inRowNode.firstChild.style.width = this.contentWidth;
}
},
rowRemoved:function(inRowIndex){
this.grid.edit.save(this, inRowIndex);
delete this.rowNodes[inRowIndex];
},
getRowNode: function(inRowIndex){
return this.rowNodes[inRowIndex];
},
getCellNode: function(inRowIndex, inCellIndex){
var row = this.getRowNode(inRowIndex);
if(row){
return this.content.getCellNode(row, inCellIndex);
}
},
// styling
styleRow: function(inRowIndex, inRowNode){
inRowNode._style = dojox.grid.getStyleText(inRowNode);
this.styleRowNode(inRowIndex, inRowNode);
},
styleRowNode: function(inRowIndex, inRowNode){
if(inRowNode){
this.doStyleRowNode(inRowIndex, inRowNode);
}
},
doStyleRowNode: function(inRowIndex, inRowNode){
this.grid.styleRowNode(inRowIndex, inRowNode);
},
// updating
updateRow: function(inRowIndex, inHeightPx, inPageNode){
var rowNode = this.getRowNode(inRowIndex);
if(rowNode){
rowNode.style.height = '';
this.buildRow(inRowIndex, rowNode);
}
return rowNode;
},
updateRowStyles: function(inRowIndex){
this.styleRowNode(inRowIndex, this.getRowNode(inRowIndex));
},
// scrolling
lastTop: 0,
firstScroll:0,
doscroll: function(inEvent){
//var s = dojo.marginBox(this.headerContentNode.firstChild);
var isLtr = dojo._isBodyLtr();
if(this.firstScroll < 2){
if((!isLtr && this.firstScroll == 1) || (isLtr && this.firstScroll == 0)){
var s = dojo.marginBox(this.headerNodeContainer);
if(dojo.isIE){
this.headerNodeContainer.style.width = s.w + this.getScrollbarWidth() + 'px';
}else if(dojo.isMoz){
//TODO currently only for FF, not sure for safari and opera
this.headerNodeContainer.style.width = s.w - this.getScrollbarWidth() + 'px';
//this.headerNodeContainer.style.width = s.w + 'px';
//set scroll to right in FF
if(isLtr){
this.scrollboxNode.scrollLeft = this.scrollboxNode.scrollWidth - this.scrollboxNode.clientWidth;
}else{
this.scrollboxNode.scrollLeft = this.scrollboxNode.clientWidth - this.scrollboxNode.scrollWidth;
}
}
}
this.firstScroll++;
}
this.headerNode.scrollLeft = this.scrollboxNode.scrollLeft;
// 'lastTop' is a semaphore to prevent feedback-loop with setScrollTop below
var top = this.scrollboxNode.scrollTop;
if(top != this.lastTop){
this.grid.scrollTo(top);
}
},
setScrollTop: function(inTop){
// 'lastTop' is a semaphore to prevent feedback-loop with doScroll above
this.lastTop = inTop;
this.scrollboxNode.scrollTop = inTop;
return this.scrollboxNode.scrollTop;";s:7:"returns";s:22:"Integer|String|Boolean";s:7:"summary";s:0:"";}s:29:"dojox.GridView.doContentEvent";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:72:" if(this.content.decorateEvent(e)){
this.grid.onContentEvent(e);
}";s:7:"summary";s:0:"";}s:28:"dojox.GridView.doHeaderEvent";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:70:" if(this.header.decorateEvent(e)){
this.grid.onHeaderEvent(e);
}";s:7:"summary";s:0:"";}s:35:"dojox.GridView.dispatchContentEvent";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:39:" return this.content.dispatchEvent(e);";s:7:"summary";s:0:"";}s:34:"dojox.GridView.dispatchHeaderEvent";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:38:" return this.header.dispatchEvent(e);";s:7:"summary";s:0:"";}s:26:"dojox.GridView.setColWidth";a:5:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"inIndex";a:1:{s:4:"type";s:0:"";}s:7:"inWidth";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:50:" this.grid.setCellWidth(inIndex, inWidth + 'px');";s:7:"summary";s:0:"";}s:21:"dojox.GridView.update";a:4:{s:9:"prototype";s:14:"dojox.GridView";s:4:"type";s:8:"Function";s:6:"source";s:167:" var left = this.scrollboxNode.scrollLeft;
this.content.update();
this.grid.update();
this.scrollboxNode.scrollLeft = left;
this.headerNode.scrollLeft = left;";s:7:"summary";s:0:"";}s:23:"dojox.GridView.rowNodes";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:22:"dojox.GridView.content";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:21:"dojox.GridView.header";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:46:"dojox.GridView.headerNodeContainer.style.width";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:24:"dojox.GridView.structure";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:26:"dojox.GridView.onBeforeRow";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:23:"dojox.GridView.noscroll";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:43:"dojox.GridView.scrollboxNode.style.overflow";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:24:"dojox.GridView.flexCells";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:41:"dojox.GridView.scrollboxNode.style.height";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:42:"dojox.GridView.headerContentNode.innerHTML";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:27:"dojox.GridView.contentWidth";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:55:"dojox.GridView.headerContentNode.firstChild.style.width";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:39:"dojox.GridView.scrollboxNode.scrollLeft";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:36:"dojox.GridView.headerNode.scrollLeft";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:38:"dojox.GridView.scrollboxNode.scrollTop";a:2:{s:8:"instance";s:14:"dojox.GridView";s:7:"summary";s:0:"";}s:28:"dojox.grid.compat._grid.view";a:3:{s:4:"type";s:6:"Object";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:23:"dojox.grid.compat._grid";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:17:"dojox.grid.compat";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.grid";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}