a:33:{s:9:"#provides";s:29:"dojox.grid.compat._grid.views";s:9:"#resource";s:26:"grid/compat/_grid/views.js";s:16:"dojox.grid.views";a:6:{s:4:"type";s:8:"Function";s:7:"summary";s:86:"A collection of grid views. Owned by grid and used internally for managing grid views.";s:11:"description";s:159:"Grid creates views automatically based on grid's layout structure. Users should typically not need to access individual views or the views collection directly.";s:10:"parameters";a:1:{s:6:"inGrid";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:21:" this.grid = inGrid;";s:9:"classlike";b:1;}s:29:"dojox.grid.views.defaultWidth";a:2:{s:9:"prototype";s:16:"dojox.grid.views";s:7:"summary";s:0:"";}s:22:"dojox.grid.views.views";a:3:{s:9:"prototype";s:16:"dojox.grid.views";s:8:"instance";s:16:"dojox.grid.views";s:7:"summary";s:0:"";}s:23:"dojox.grid.views.resize";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:24:" this.onEach("resize");";s:7:"summary";s:0:"";}s:23:"dojox.grid.views.render";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:24:" this.onEach("render");";s:7:"summary";s:0:"";}s:24:"dojox.grid.views.addView";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"inView";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:60:" inView.idx = this.views.length; this.views.push(inView);";s:7:"summary";s:0:"";}s:29:"dojox.grid.views.destroyViews";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:75:" for (var i=0, v; v=this.views[i]; i++) v.destroy(); this.views = [];";s:7:"summary";s:0:"";}s:32:"dojox.grid.views.getContentNodes";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:108:" var nodes = []; for(var i=0, v; v=this.views[i]; i++){ nodes.push(v.contentNode); } return nodes;";s:7:"summary";s:0:"";}s:24:"dojox.grid.views.forEach";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inCallback";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:65:" for(var i=0, v; v=this.views[i]; i++){ inCallback(v, i); }";s:7:"summary";s:0:"";}s:23:"dojox.grid.views.onEach";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:8:"inMethod";a:1:{s:4:"type";s:0:"";}s:6:"inArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:130:" inArgs = inArgs || []; for(var i=0, v; v=this.views[i]; i++){ if(inMethod in v){ v[inMethod].apply(v, inArgs); } }";s:7:"summary";s:0:"";}s:42:"dojox.grid.views.normalizeHeaderNodeHeight";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:193:" var rowNodes = []; for(var i=0, v; (v=this.views[i]); i++){ if(v.headerContentNode.firstChild){ rowNodes.push(v.headerContentNode) }; } this.normalizeRowNodeHeights(rowNodes);";s:7:"summary";s:0:"";}s:40:"dojox.grid.views.normalizeRowNodeHeights";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowNodes";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:531:" var h = 0; for(var i=0, n, o; (n=inRowNodes[i]); i++){ h = Math.max(h, (n.firstChild.clientHeight)||(n.firstChild.offsetHeight)); } h = (h >= 0 ? h : 0); // var hpx = h + 'px'; for(var i=0, n; (n=inRowNodes[i]); i++){ if(n.firstChild.clientHeight!=h){ n.firstChild.style.height = hpx; } } // //console.log('normalizeRowNodeHeights ', h); // // querying the height here seems to help scroller measure the page on IE if(inRowNodes&&inRowNodes[0]){ inRowNodes[0].parentNode.offsetHeight; }";s:7:"summary";s:0:"";}s:38:"dojox.grid.views.resetHeaderNodeHeight";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:122:" for(var i=0, v, n; (v=this.views[i]); i++){ n = v.headerContentNode.firstChild; if(n) n.style.height = ""; }";s:7:"summary";s:0:"";}s:31:"dojox.grid.views.renormalizeRow";a:5:{s:9:"prototype";s:16:"dojox.grid.views";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:198:" var rowNodes = []; for(var i=0, v, n; (v=this.views[i])&&(n=v.getRowNode(inRowIndex)); i++){ n.firstChild.style.height = ''; rowNodes.push(n); } this.normalizeRowNodeHeights(rowNodes);";s:7:"summary";s:0:"";}s:29:"dojox.grid.views.getViewWidth";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"inIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:61:" return this.views[inIndex].getWidth() || this.defaultWidth;";s:7:"summary";s:0:"";}s:30:"dojox.grid.views.measureHeader";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:3071:"dojo.provide("dojox.grid.compat._grid.views"); dojo.declare('dojox.grid.views', null, { // summary: // A collection of grid views. Owned by grid and used internally for managing grid views. // description: // Grid creates views automatically based on grid's layout structure. // Users should typically not need to access individual views or the views collection directly. constructor: function(inGrid){ this.grid = inGrid; }, defaultWidth: 200, views: [], // operations resize: function(){ this.onEach("resize"); }, render: function(){ this.onEach("render"); }, // views addView: function(inView){ inView.idx = this.views.length; this.views.push(inView); }, destroyViews: function(){ for (var i=0, v; v=this.views[i]; i++) v.destroy(); this.views = []; }, getContentNodes: function(){ var nodes = []; for(var i=0, v; v=this.views[i]; i++){ nodes.push(v.contentNode); } return nodes; }, forEach: function(inCallback){ for(var i=0, v; v=this.views[i]; i++){ inCallback(v, i); } }, onEach: function(inMethod, inArgs){ inArgs = inArgs || []; for(var i=0, v; v=this.views[i]; i++){ if(inMethod in v){ v[inMethod].apply(v, inArgs); } } }, // layout normalizeHeaderNodeHeight: function(){ var rowNodes = []; for(var i=0, v; (v=this.views[i]); i++){ if(v.headerContentNode.firstChild){ rowNodes.push(v.headerContentNode) }; } this.normalizeRowNodeHeights(rowNodes); }, normalizeRowNodeHeights: function(inRowNodes){ var h = 0; for(var i=0, n, o; (n=inRowNodes[i]); i++){ h = Math.max(h, (n.firstChild.clientHeight)||(n.firstChild.offsetHeight)); } h = (h >= 0 ? h : 0); // var hpx = h + 'px'; for(var i=0, n; (n=inRowNodes[i]); i++){ if(n.firstChild.clientHeight!=h){ n.firstChild.style.height = hpx; } } // //console.log('normalizeRowNodeHeights ', h); // // querying the height here seems to help scroller measure the page on IE if(inRowNodes&&inRowNodes[0]){ inRowNodes[0].parentNode.offsetHeight; } }, resetHeaderNodeHeight: function(){ for(var i=0, v, n; (v=this.views[i]); i++){ n = v.headerContentNode.firstChild; if(n) n.style.height = ""; } }, renormalizeRow: function(inRowIndex){ var rowNodes = []; for(var i=0, v, n; (v=this.views[i])&&(n=v.getRowNode(inRowIndex)); i++){ n.firstChild.style.height = ''; rowNodes.push(n); } this.normalizeRowNodeHeights(rowNodes); }, getViewWidth: function(inIndex){ return this.views[inIndex].getWidth() || this.defaultWidth; }, // must be called after view widths are properly set or height can be miscalculated // if there are flex columns measureHeader: function(){ // need to reset view header heights so they are properly measured. this.resetHeaderNodeHeight(); this.forEach(function(inView){ inView.headerContentNode.style.height = ''; }); var h = 0; // calculate maximum view header height this.forEach(function(inView){ h = Math.max(inView.headerNode.offsetHeight, h); }); return h;";s:7:"summary";s:0:"";}s:31:"dojox.grid.views.measureContent";a:4:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:6:"source";s:113:" var h = 0; this.forEach(function(inView) { h = Math.max(inView.domNode.offsetHeight, h); }); return h;";s:7:"summary";s:0:"";}s:27:"dojox.grid.views.findClient";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"inAutoWidth";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3696:"dojo.provide("dojox.grid.compat._grid.views"); dojo.declare('dojox.grid.views', null, { // summary: // A collection of grid views. Owned by grid and used internally for managing grid views. // description: // Grid creates views automatically based on grid's layout structure. // Users should typically not need to access individual views or the views collection directly. constructor: function(inGrid){ this.grid = inGrid; }, defaultWidth: 200, views: [], // operations resize: function(){ this.onEach("resize"); }, render: function(){ this.onEach("render"); }, // views addView: function(inView){ inView.idx = this.views.length; this.views.push(inView); }, destroyViews: function(){ for (var i=0, v; v=this.views[i]; i++) v.destroy(); this.views = []; }, getContentNodes: function(){ var nodes = []; for(var i=0, v; v=this.views[i]; i++){ nodes.push(v.contentNode); } return nodes; }, forEach: function(inCallback){ for(var i=0, v; v=this.views[i]; i++){ inCallback(v, i); } }, onEach: function(inMethod, inArgs){ inArgs = inArgs || []; for(var i=0, v; v=this.views[i]; i++){ if(inMethod in v){ v[inMethod].apply(v, inArgs); } } }, // layout normalizeHeaderNodeHeight: function(){ var rowNodes = []; for(var i=0, v; (v=this.views[i]); i++){ if(v.headerContentNode.firstChild){ rowNodes.push(v.headerContentNode) }; } this.normalizeRowNodeHeights(rowNodes); }, normalizeRowNodeHeights: function(inRowNodes){ var h = 0; for(var i=0, n, o; (n=inRowNodes[i]); i++){ h = Math.max(h, (n.firstChild.clientHeight)||(n.firstChild.offsetHeight)); } h = (h >= 0 ? h : 0); // var hpx = h + 'px'; for(var i=0, n; (n=inRowNodes[i]); i++){ if(n.firstChild.clientHeight!=h){ n.firstChild.style.height = hpx; } } // //console.log('normalizeRowNodeHeights ', h); // // querying the height here seems to help scroller measure the page on IE if(inRowNodes&&inRowNodes[0]){ inRowNodes[0].parentNode.offsetHeight; } }, resetHeaderNodeHeight: function(){ for(var i=0, v, n; (v=this.views[i]); i++){ n = v.headerContentNode.firstChild; if(n) n.style.height = ""; } }, renormalizeRow: function(inRowIndex){ var rowNodes = []; for(var i=0, v, n; (v=this.views[i])&&(n=v.getRowNode(inRowIndex)); i++){ n.firstChild.style.height = ''; rowNodes.push(n); } this.normalizeRowNodeHeights(rowNodes); }, getViewWidth: function(inIndex){ return this.views[inIndex].getWidth() || this.defaultWidth; }, // must be called after view widths are properly set or height can be miscalculated // if there are flex columns measureHeader: function(){ // need to reset view header heights so they are properly measured. this.resetHeaderNodeHeight(); this.forEach(function(inView){ inView.headerContentNode.style.height = ''; }); var h = 0; // calculate maximum view header height this.forEach(function(inView){ h = Math.max(inView.headerNode.offsetHeight, h); }); return h; }, measureContent: function(){ var h = 0; this.forEach(function(inView) { h = Math.max(inView.domNode.offsetHeight, h); }); return h; }, findClient: function(inAutoWidth){ // try to use user defined client var c = this.grid.elasticView || -1; // attempt to find implicit client if(c < 0){ for(var i=1, v; (v=this.views[i]); i++){ if(v.viewWidth){ for(i=1; (v=this.views[i]); i++){ if(!v.viewWidth){ c = i; break; } } break; } } } // client is in the middle by default if(c < 0){ c = Math.floor(this.views.length / 2); } return c;";s:7:"summary";s:0:"";}s:24:"dojox.grid.views.arrange";a:5:{s:9:"prototype";s:16:"dojox.grid.views";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"l";a:1:{s:4:"type";s:0:"";}s:1:"w";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1454:" var i, v, vw, len = this.views.length; // find the client var c = (w <= 0 ? len : this.findClient()); // layout views var setPosition = function(v, l){ with(v.domNode.style){ if(!dojo._isBodyLtr()){ right = l + 'px'; }else{ left = l + 'px'; } top = 0 + 'px'; } with(v.headerNode.style){ if(!dojo._isBodyLtr()){ right = l + 'px'; }else{ left = l + 'px'; } top = 0; } } // for views left of the client //BiDi TODO: The left and right should not appear in BIDI environment. Should be replaced with //leading and tailing concept. for(i=0; (v=this.views[i])&&(i