a:22:{s:9:"#provides";s:18:"dojox.grid._Layout";s:9:"#resource";s:15:"grid/_Layout.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.grid.cells";}i:1;a:2:{i:0;s:6:"common";i:1;s:23:"dojox.grid._RowSelector";}}s:18:"dojox.grid._Layout";a:5:{s:4:"type";s:8:"Function";s:7:"summary";s:61:"Controls grid cell layout. Owned by grid and used internally.";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:24:"dojox.grid._Layout.cells";a:3:{s:9:"prototype";s:18:"dojox.grid._Layout";s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:28:"dojox.grid._Layout.structure";a:3:{s:9:"prototype";s:18:"dojox.grid._Layout";s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:31:"dojox.grid._Layout.defaultWidth";a:2:{s:9:"prototype";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:29:"dojox.grid._Layout.moveColumn";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:5:{s:15:"sourceViewIndex";a:1:{s:4:"type";s:0:"";}s:13:"destViewIndex";a:1:{s:4:"type";s:0:"";}s:9:"cellIndex";a:1:{s:4:"type";s:0:"";}s:11:"targetIndex";a:1:{s:4:"type";s:0:"";}s:6:"before";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1212:" var source_cells = this.structure[sourceViewIndex].cells[0]; var dest_cells = this.structure[destViewIndex].cells[0]; var cell = null; var cell_ri = 0; var target_ri = 0; for(var i=0, c; c=source_cells[i]; i++){ if(c.index == cellIndex){ cell_ri = i; break; } } cell = source_cells.splice(cell_ri, 1)[0]; cell.view = this.grid.views.views[destViewIndex]; for(i=0, c=null; c=dest_cells[i]; i++){ if(c.index == targetIndex){ target_ri = i; break; } } if(!before){ target_ri += 1; } dest_cells.splice(target_ri, 0, cell); var sortedCell = this.grid.getCell(this.grid.getSortIndex()); if(sortedCell){ sortedCell._currentlySorted = this.grid.getSortAsc(); } this.cells = []; var cellIndex = 0; for(var i=0, v; v=this.structure[i]; i++){ for(var j=0, cs; cs=v.cells[j]; j++){ for(var k=0, c; c=cs[k]; k++){ c.index = cellIndex; this.cells.push(c); if("_currentlySorted" in c){ var si = cellIndex + 1; si *= c._currentlySorted ? 1 : -1; this.grid.sortInfo = si; delete c._currentlySorted; } cellIndex++; } } } this.grid.setupHeaderMenu(); //this.grid.renderOnIdle();";s:7:"summary";s:0:"";}s:38:"dojox.grid._Layout.setColumnVisibility";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:11:"columnIndex";a:1:{s:4:"type";s:0:"";}s:7:"visible";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:293:" var cell = this.cells[columnIndex]; if(cell.hidden == visible){ cell.hidden = !visible; var v = cell.view, w = v.viewWidth; if(w && w != "auto"){ v._togglingColumn = dojo.marginBox(cell.getHeaderNode()).w || 0; } v.update(); return true; }else{ return false; }";s:7:"summary";s:0:"";}s:29:"dojox.grid._Layout.addCellDef";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:11:"inCellIndex";a:1:{s:4:"type";s:0:"";}s:5:"inDef";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:845:" var self = this; var getCellWidth = function(inDef){ var w = 0; if(inDef.colSpan > 1){ w = 0; }else{ w = inDef.width || self._defaultCellProps.width || self.defaultWidth; if(!isNaN(w)){ w = w + "em"; } } return w; }; var props = { grid: this.grid, subrow: inRowIndex, layoutIndex: inCellIndex, index: this.cells.length }; if(inDef && inDef instanceof dojox.grid.cells._Base){ var new_cell = dojo.clone(inDef); props.unitWidth = getCellWidth(new_cell._props); new_cell = dojo.mixin(new_cell, this._defaultCellProps, inDef._props, props); return new_cell; } var cell_type = inDef.type || this._defaultCellProps.type || dojox.grid.cells.Cell; props.unitWidth = getCellWidth(inDef); return new cell_type(dojo.mixin({}, this._defaultCellProps, inDef, props)); ";s:7:"summary";s:0:"";}s:28:"dojox.grid._Layout.addRowDef";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:5:"inDef";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:955:" var result = []; var relSum = 0, pctSum = 0, doRel = true; for(var i=0, def, cell; (def=inDef[i]); i++){ cell = this.addCellDef(inRowIndex, i, def); result.push(cell); this.cells.push(cell); // Check and calculate the sum of all relative widths if(doRel && cell.relWidth){ relSum += cell.relWidth; }else if(cell.width){ var w = cell.width; if(typeof w == "string" && w.slice(-1) == "%"){ pctSum += window.parseInt(w, 10); }else if(w == "auto"){ // relative widths doesn't play nice with auto - since we // don't have a way of knowing how much space the auto is // supposed to take up. doRel = false; } } } if(relSum && doRel){ // We have some kind of relWidths specified - so change them to % dojo.forEach(result, function(cell){ if(cell.relWidth){ cell.width = cell.unitWidth = ((cell.relWidth / relSum) * (100 - pctSum)) + "%"; } }); } return result;";s:7:"summary";s:0:"";}s:29:"dojox.grid._Layout.addRowsDef";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"inDef";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:257:" var result = []; if(dojo.isArray(inDef)){ if(dojo.isArray(inDef[0])){ for(var i=0, row; inDef && (row=inDef[i]); i++){ result.push(this.addRowDef(i, row)); } }else{ result.push(this.addRowDef(0, inDef)); } } return result; ";s:7:"summary";s:0:"";}s:29:"dojox.grid._Layout.addViewDef";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"inDef";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:207:" this._defaultCellProps = inDef.defaultCell || {}; if(inDef.width && inDef.width == "auto"){ delete inDef.width; } return dojo.mixin({}, inDef, {cells: this.addRowsDef(inDef.rows || inDef.cells)});";s:7:"summary";s:0:"";}s:31:"dojox.grid._Layout.setStructure";a:5:{s:9:"prototype";s:18:"dojox.grid._Layout";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:1531:" this.fieldIndex = 0; this.cells = []; var s = this.structure = []; if(this.grid.rowSelector){ var sel = { type: dojox._scopeName + ".grid._RowSelector" }; if(dojo.isString(this.grid.rowSelector)){ var width = this.grid.rowSelector; if(width == "false"){ sel = null; }else if(width != "true"){ sel['width'] = width; } }else{ if(!this.grid.rowSelector){ sel = null; } } if(sel){ s.push(this.addViewDef(sel)); } } var isCell = function(def){ return ("name" in def || "field" in def || "get" in def); }; var isRowDef = function(def){ if(dojo.isArray(def)){ if(dojo.isArray(def[0]) || isCell(def[0])){ return true; } } return false; }; var isView = function(def){ return (def != null && dojo.isObject(def) && ("cells" in def || "rows" in def || ("type" in def && !isCell(def)))); }; if(dojo.isArray(inStructure)){ var hasViews = false; for(var i=0, st; (st=inStructure[i]); i++){ if(isView(st)){ hasViews = true; break; } } if(!hasViews){ s.push(this.addViewDef({ cells: inStructure })); }else{ for(var i=0, st; (st=inStructure[i]); i++){ if(isRowDef(st)){ s.push(this.addViewDef({ cells: st })); }else if(isView(st)){ s.push(this.addViewDef(st)); } } } }else if(isView(inStructure)){ // it's a view object s.push(this.addViewDef(inStructure)); } this.cellCount = this.cells.length; this.grid.setupHeaderMenu();";s:7:"summary";s:0:"";}s:32:"dojox.grid._Layout.grid.sortInfo";a:2:{s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:36:"dojox.grid._Layout._defaultCellProps";a:3:{s:8:"instance";s:18:"dojox.grid._Layout";s:7:"private";b:1;s:7:"summary";s:0:"";}s:29:"dojox.grid._Layout.fieldIndex";a:2:{s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:28:"dojox.grid._Layout.cellCount";a:2:{s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:23:"dojox.grid._Layout.grid";a:2:{s:8:"instance";s:18:"dojox.grid._Layout";s:7:"summary";s:0:"";}s:8:"new_cell";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:3:{i:0;s:22:"this._defaultCellProps";i:1;s:12:"inDef._props";i:2;s:5:"props";}}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:"";}}