|
From: Thyamad c. <th...@us...> - 2006-01-17 23:21:42
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10120/thywidgets Modified Files: thygrid.js thygridcell.js thygridcontents.js thygridrow.js Log Message: Commiting file additions and modification from SVN revision 2647 to 2648... Changes made by vinicius on 2006-01-18 01:24:36 +0100 (Wed, 18 Jan 2006) corresponding to SVN revision 2648 with message: optimized thygrid Index: thygridcell.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridcell.js,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** thygridcell.js 17 Jan 2006 22:35:06 -0000 1.6 --- thygridcell.js 17 Jan 2006 23:21:33 -0000 1.7 *************** *** 48,52 **** function thyGridCell(name, html) { ! startTracing('thyGridCell','thyGridCell'); this.thyPanel = thyPanel; this.thyPanel(name,null); --- 48,52 ---- function thyGridCell(name, html) { ! //startTracing('thyGridCell','thyGridCell'); this.thyPanel = thyPanel; this.thyPanel(name,null); *************** *** 73,77 **** self._selectEvent() }}); ! endTracing('thyGridCell','thyGridCell'); } --- 73,77 ---- self._selectEvent() }}); ! //endTracing('thyGridCell','thyGridCell'); } *************** *** 95,99 **** p.populate = function (data) { ! startTracing('thyGridCell','populate'); if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') --- 95,99 ---- p.populate = function (data) { ! //startTracing('thyGridCell','populate'); if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') *************** *** 118,122 **** catch(e) { ! endTracing('thyGridCell','populate'); return; } --- 118,122 ---- catch(e) { ! //endTracing('thyGridCell','populate'); return; } *************** *** 131,139 **** catch(e) { ! endTracing('thyGridCell','populate'); return; } } ! endTracing('thyGridCell','populate'); } --- 131,139 ---- catch(e) { ! //endTracing('thyGridCell','populate'); return; } } ! //endTracing('thyGridCell','populate'); } *************** *** 150,154 **** p.sweepOut = function () { ! startTracing('thyGridCell','sweepOut'); if (!this.children.length) return this.getHTML(); try --- 150,154 ---- p.sweepOut = function () { ! //startTracing('thyGridCell','sweepOut'); if (!this.children.length) return this.getHTML(); try *************** *** 159,171 **** contents.add(this.children[i].sweepOut(), this.children[i].name); } ! endTracing('thyGridCell','sweepOut'); return contents; } catch(e) { ! endTracing('thyGridCell','sweepOut'); return; } ! endTracing('thyGridCell','sweepOut'); } --- 159,171 ---- contents.add(this.children[i].sweepOut(), this.children[i].name); } ! //endTracing('thyGridCell','sweepOut'); return contents; } catch(e) { ! //endTracing('thyGridCell','sweepOut'); return; } ! //endTracing('thyGridCell','sweepOut'); } *************** *** 179,186 **** p.addChild = function (child) { ! startTracing('thyGridCell','addChild'); if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); ! endTracing('thyGridCell','addChild'); } --- 179,186 ---- p.addChild = function (child) { ! //startTracing('thyGridCell','addChild'); if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); ! //endTracing('thyGridCell','addChild'); } *************** *** 199,208 **** p.setHTML = function (html) { ! startTracing('thyGridCell','setHTML'); var rSpace = new RegExp(' ', 'g'); if (!html && typeof(html) != 'number') html = ' '; else if (typeof(html) == 'string') html = html.replace(rSpace, ' '); this._thyPanelSetHTML(html); ! endTracing('thyGridCell','setHTML'); } --- 199,208 ---- p.setHTML = function (html) { ! //startTracing('thyGridCell','setHTML'); var rSpace = new RegExp(' ', 'g'); if (!html && typeof(html) != 'number') html = ' '; else if (typeof(html) == 'string') html = html.replace(rSpace, ' '); this._thyPanelSetHTML(html); ! //endTracing('thyGridCell','setHTML'); } *************** *** 218,222 **** p.getHTML = function () { ! startTracing('thyGridCell','getHTML'); var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); --- 218,222 ---- p.getHTML = function () { ! //startTracing('thyGridCell','getHTML'); var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); *************** *** 224,228 **** if (html == ' ' || html == ' ') { ! endTracing('thyGridCell','getHTML'); return ''; } --- 224,228 ---- if (html == ' ' || html == ' ') { ! //endTracing('thyGridCell','getHTML'); return ''; } *************** *** 230,234 **** if (typeof(html) == 'string') { ! endTracing('thyGridCell','getHTML'); return html.replace(rSpace, ' '); } --- 230,234 ---- if (typeof(html) == 'string') { ! //endTracing('thyGridCell','getHTML'); return html.replace(rSpace, ' '); } *************** *** 236,244 **** if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { ! endTracing('thyGridCell','getHTML'); return html.sweepOut(); } ! endTracing('thyGridCell','getHTML'); return html; } --- 236,244 ---- if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { ! //endTracing('thyGridCell','getHTML'); return html.sweepOut(); } ! //endTracing('thyGridCell','getHTML'); return html; } *************** *** 383,387 **** p._create = function () { ! startTracing('thyGridCell','_create'); if (this.parent && !this.elm) { --- 383,387 ---- p._create = function () { ! //startTracing('thyGridCell','_create'); if (this.parent && !this.elm) { *************** *** 390,394 **** DynElement._flagCreate(this); } ! endTracing('thyGridCell','_create'); } --- 390,394 ---- DynElement._flagCreate(this); } ! //endTracing('thyGridCell','_create'); } *************** *** 396,400 **** p._createDOMElement = function () { ! startTracing('thyGridCell','_createDOMElement'); if (this.parent) { --- 396,400 ---- p._createDOMElement = function () { ! //startTracing('thyGridCell','_createDOMElement'); if (this.parent) { *************** *** 427,431 **** parentElm.appendChild(elm); ! endTracing('thyGridCell','_createDOMElement'); return elm; } --- 427,431 ---- parentElm.appendChild(elm); ! //endTracing('thyGridCell','_createDOMElement'); return elm; } *************** *** 440,444 **** p._processMode = function() { ! startTracing('thyGridCell','_processMode'); switch (this.cellMode) { --- 440,444 ---- p._processMode = function() { ! //startTracing('thyGridCell','_processMode'); switch (this.cellMode) { *************** *** 452,456 **** this.cellEditBox.focus(); } ! endTracing('thyGridCell','_processMode'); return; --- 452,456 ---- this.cellEditBox.focus(); } ! //endTracing('thyGridCell','_processMode'); return; *************** *** 464,481 **** p._processType = function() { ! startTracing('thyGridCell','_processType'); switch (this.cellType) { case 0: this.setCSSClass(this.cellSelected ? 'selected' : 'default'); ! endTracing('thyGridCell','_processType'); return; case 1: this.setCSSClass(this.cellSelected ? 'header_selected' : 'header'); ! endTracing('thyGridCell','_processType'); return; } ! endTracing('thyGridCell','_processType'); } --- 464,481 ---- p._processType = function() { ! //startTracing('thyGridCell','_processType'); switch (this.cellType) { case 0: this.setCSSClass(this.cellSelected ? 'selected' : 'default'); ! //endTracing('thyGridCell','_processType'); return; case 1: this.setCSSClass(this.cellSelected ? 'header_selected' : 'header'); ! //endTracing('thyGridCell','_processType'); return; } ! //endTracing('thyGridCell','_processType'); } Index: thygridcontents.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridcontents.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thygridcontents.js 17 Jan 2006 22:35:06 -0000 1.3 --- thygridcontents.js 17 Jan 2006 23:21:33 -0000 1.4 *************** *** 39,46 **** function thyGridContents(name) { ! startTracing('thyGridContents','thyGridContents'); this.thyPanel = thyPanel; this.thyPanel(name); ! endTracing('thyGridContents','thyGridContents'); } --- 39,46 ---- function thyGridContents(name) { ! //startTracing('thyGridContents','thyGridContents'); this.thyPanel = thyPanel; this.thyPanel(name); ! //endTracing('thyGridContents','thyGridContents'); } *************** *** 55,59 **** p.getOuterHTML = function () { ! startTracing('thyGridContents','getOuterHTML'); var html = [ '<table id="'+this.id+'"', --- 55,59 ---- p.getOuterHTML = function () { ! //startTracing('thyGridContents','getOuterHTML'); var html = [ '<table id="'+this.id+'"', *************** *** 72,76 **** ].join(''); //alert(html); ! endTracing('thyGridContents','getOuterHTML'); return html; } --- 72,76 ---- ].join(''); //alert(html); ! //endTracing('thyGridContents','getOuterHTML'); return html; } Index: thygridrow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridrow.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thygridrow.js 17 Jan 2006 22:35:06 -0000 1.3 --- thygridrow.js 17 Jan 2006 23:21:33 -0000 1.4 *************** *** 38,42 **** function thyGridRow(name, index) { ! startTracing('thyGridRow','thyGridRow'); this.thyPanel = thyPanel; this.thyPanel(name); --- 38,42 ---- function thyGridRow(name, index) { ! //startTracing('thyGridRow','thyGridRow'); this.thyPanel = thyPanel; this.thyPanel(name); *************** *** 57,61 **** this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); ! endTracing('thyGridRow','thyGridRow'); } --- 57,61 ---- this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); ! //endTracing('thyGridRow','thyGridRow'); } *************** *** 85,92 **** p.addCellCSSClass = function (cssClass) { ! startTracing('thyGridRow','addCellCSSClass'); this._addCellCSSClass(cssClass); //this._updateAllClasses(); ! endTracing('thyGridRow','addCellCSSClass'); } --- 85,92 ---- p.addCellCSSClass = function (cssClass) { ! //startTracing('thyGridRow','addCellCSSClass'); this._addCellCSSClass(cssClass); //this._updateAllClasses(); ! //endTracing('thyGridRow','addCellCSSClass'); } *************** *** 105,112 **** p.addCellIndexedCSSClass = function (cssClass) { ! startTracing('thyGridRow','addCellIndexedCSSClass'); this._addCellIndexedCSSClass(cssClass); //this._updateAllClasses(); ! endTracing('thyGridRow','addCellIndexedCSSClass'); } --- 105,112 ---- p.addCellIndexedCSSClass = function (cssClass) { ! //startTracing('thyGridRow','addCellIndexedCSSClass'); this._addCellIndexedCSSClass(cssClass); //this._updateAllClasses(); ! //endTracing('thyGridRow','addCellIndexedCSSClass'); } *************** *** 124,132 **** p.removeCellCSSClass = function (cssClass) { ! startTracing('thyGridRow','removeCellCSSClass'); this._removeAllClasses(); this._removeCellCSSClass(cssClass); //this._updateAllClasses(); ! endTracing('thyGridRow','removeCellCSSClass'); } --- 124,132 ---- p.removeCellCSSClass = function (cssClass) { ! //startTracing('thyGridRow','removeCellCSSClass'); this._removeAllClasses(); this._removeCellCSSClass(cssClass); //this._updateAllClasses(); ! //endTracing('thyGridRow','removeCellCSSClass'); } *************** *** 145,153 **** p.removeCellIndexedCSSClass = function (cssClass) { ! startTracing('thyGridRow','removeCellIndexedCSSClass'); this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); //this._updateAllClasses(); ! endTracing('thyGridRow','removeCellIndexedCSSClass'); } --- 145,153 ---- p.removeCellIndexedCSSClass = function (cssClass) { ! //startTracing('thyGridRow','removeCellIndexedCSSClass'); this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); //this._updateAllClasses(); ! //endTracing('thyGridRow','removeCellIndexedCSSClass'); } *************** *** 160,168 **** p.removeAllCellClasses = function () { ! startTracing('thyGridRow','removeAllCellClasses'); this._removeAllClasses(); this._removeAllCellClasses(); //this._updateAllClasses(); ! endTracing('thyGridRow','removeAllCellClasses'); } --- 160,168 ---- p.removeAllCellClasses = function () { ! //startTracing('thyGridRow','removeAllCellClasses'); this._removeAllClasses(); this._removeAllCellClasses(); //this._updateAllClasses(); ! //endTracing('thyGridRow','removeAllCellClasses'); } *************** *** 180,184 **** p.setIndex = function (index) { ! startTracing('thyGridRow','setIndex'); if (index == null || this.rowIndex == index) return; this.rowIndex = index; --- 180,184 ---- p.setIndex = function (index) { ! //startTracing('thyGridRow','setIndex'); if (index == null || this.rowIndex == index) return; this.rowIndex = index; *************** *** 186,190 **** this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); ! endTracing('thyGridRow','setIndex'); } --- 186,190 ---- this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); ! //endTracing('thyGridRow','setIndex'); } *************** *** 214,218 **** p.insertCell = function (content, column, type) { ! startTracing('thyGridRow','insertCell'); var col; if (content == null) content = ''; --- 214,218 ---- p.insertCell = function (content, column, type) { ! //startTracing('thyGridRow','insertCell'); var col; if (content == null) content = ''; *************** *** 227,231 **** if (column != null && column != (col-1)) this.moveCell(col-1, column); ! endTracing('thyGridRow','insertCell'); return col+1; } --- 227,231 ---- if (column != null && column != (col-1)) this.moveCell(col-1, column); ! //endTracing('thyGridRow','insertCell'); return col+1; } *************** *** 244,253 **** p.getCell = function (column) { ! startTracing('thyGridRow','getCell'); if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); ! endTracing('thyGridRow','getCell'); return cell ? cell.sweepOut() : ''; } --- 244,253 ---- p.getCell = function (column) { ! //startTracing('thyGridRow','getCell'); if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); ! //endTracing('thyGridRow','getCell'); return cell ? cell.sweepOut() : ''; } *************** *** 285,289 **** p.getSelectedCells = function () { ! startTracing('thyGridRow','getSelectedCells'); var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); --- 285,289 ---- p.getSelectedCells = function () { ! //startTracing('thyGridRow','getSelectedCells'); var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); *************** *** 295,299 **** } ! endTracing('thyGridRow','getSelectedCells'); return cells; } --- 295,299 ---- } ! //endTracing('thyGridRow','getSelectedCells'); return cells; } *************** *** 326,330 **** p.removeCell = function (column) { ! startTracing('thyGridRow','removeCell'); if (column == null || typeof(column) != 'number') column = 0; column++; --- 326,330 ---- p.removeCell = function (column) { ! //startTracing('thyGridRow','removeCell'); if (column == null || typeof(column) != 'number') column = 0; column++; *************** *** 335,339 **** //this._updateAllClasses(); ! endTracing('thyGridRow','removeCell'); return cell.sweepOut(); } --- 335,339 ---- //this._updateAllClasses(); ! //endTracing('thyGridRow','removeCell'); return cell.sweepOut(); } *************** *** 352,356 **** p.moveCell = function (orig, dest) { ! startTracing('thyGridRow','moveCell'); if (orig == null || typeof(orig) != 'number' || dest == null || typeof(dest) != 'number') throw({result: 'Invalid Indexes', location: 'thyGridRow.moveCell'}); --- 352,356 ---- p.moveCell = function (orig, dest) { ! //startTracing('thyGridRow','moveCell'); if (orig == null || typeof(orig) != 'number' || dest == null || typeof(dest) != 'number') throw({result: 'Invalid Indexes', location: 'thyGridRow.moveCell'}); *************** *** 370,374 **** this._updateNames(); //this._updateAllClasses(); ! endTracing('thyGridRow','moveCell'); } --- 370,374 ---- this._updateNames(); //this._updateAllClasses(); ! //endTracing('thyGridRow','moveCell'); } *************** *** 396,403 **** p.selectOnly = function () { ! startTracing('thyGridRow','selectOnly'); if (this.isSelected()) { ! endTracing('thyGridRow','selectOnly'); return; } --- 396,403 ---- p.selectOnly = function () { ! //startTracing('thyGridRow','selectOnly'); if (this.isSelected()) { ! //endTracing('thyGridRow','selectOnly'); return; } *************** *** 411,415 **** cell.setSelected(true); } ! endTracing('thyGridRow','selectOnly'); } --- 411,415 ---- cell.setSelected(true); } ! //endTracing('thyGridRow','selectOnly'); } *************** *** 424,431 **** p.select = function () { ! startTracing('thyGridRow','select'); if (this.isSelected()) { ! endTracing('thyGridRow','select'); return; } --- 424,431 ---- p.select = function () { ! //startTracing('thyGridRow','select'); if (this.isSelected()) { ! //endTracing('thyGridRow','select'); return; } *************** *** 439,443 **** this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } ! endTracing('thyGridRow','select'); } --- 439,443 ---- this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } ! //endTracing('thyGridRow','select'); } *************** *** 450,457 **** p.unselectOnly = function () { ! startTracing('thyGridRow','unselectOnly'); if (!this.isSelected()) { ! endTracing('thyGridRow','unselectOnly'); return; } --- 450,457 ---- p.unselectOnly = function () { ! //startTracing('thyGridRow','unselectOnly'); if (!this.isSelected()) { ! //endTracing('thyGridRow','unselectOnly'); return; } *************** *** 465,469 **** cell.setSelected(false); } ! endTracing('thyGridRow','unselectOnly'); } --- 465,469 ---- cell.setSelected(false); } ! //endTracing('thyGridRow','unselectOnly'); } *************** *** 478,485 **** p.unselect = function () { ! startTracing('thyGridRow','unselect'); if (!this.isSelected()) { ! endTracing('thyGridRow','unselect'); return; } --- 478,485 ---- p.unselect = function () { ! //startTracing('thyGridRow','unselect'); if (!this.isSelected()) { ! //endTracing('thyGridRow','unselect'); return; } *************** *** 493,497 **** this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } ! endTracing('thyGridRow','unselect'); } --- 493,497 ---- this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } ! //endTracing('thyGridRow','unselect'); } *************** *** 538,542 **** p.getOuterHTML = function () { ! startTracing('thyGridRow','getOuterHTML'); var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', --- 538,542 ---- p.getOuterHTML = function () { ! //startTracing('thyGridRow','getOuterHTML'); var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', *************** *** 558,562 **** ].join(''); //alert(html); ! endTracing('thyGridRow','getOuterHTML'); return html; } --- 558,562 ---- ].join(''); //alert(html); ! //endTracing('thyGridRow','getOuterHTML'); return html; } *************** *** 574,578 **** p._create = function () { ! startTracing('thyGridRow','_create'); if (this.parent && !this.elm) { --- 574,578 ---- p._create = function () { ! //startTracing('thyGridRow','_create'); if (this.parent && !this.elm) { *************** *** 595,604 **** DynElement._flagCreate(this); } ! endTracing('thyGridRow','_create'); } p._createDOMElement = function () { ! startTracing('thyGridRow','_createDOMElement'); if (this.parent && !this.elm) { --- 595,604 ---- DynElement._flagCreate(this); } ! //endTracing('thyGridRow','_create'); } p._createDOMElement = function () { ! //startTracing('thyGridRow','_createDOMElement'); if (this.parent && !this.elm) { *************** *** 622,629 **** parentElm.appendChild(elm); ! endTracing('thyGridRow','_createDOMElement'); return elm; } ! endTracing('thyGridRow','_createDOMElement'); } --- 622,629 ---- parentElm.appendChild(elm); ! //endTracing('thyGridRow','_createDOMElement'); return elm; } ! //endTracing('thyGridRow','_createDOMElement'); } *************** *** 720,724 **** p._createCell = function (colIndex, type) { ! startTracing('thyGridRow','_createCell'); if (!type) type = 'n'; --- 720,724 ---- p._createCell = function (colIndex, type) { ! //startTracing('thyGridRow','_createCell'); if (!type) type = 'n'; *************** *** 741,745 **** }}); } ! endTracing('thyGridRow','_createCell'); return cell; --- 741,745 ---- }}); } ! //endTracing('thyGridRow','_createCell'); return cell; *************** *** 755,759 **** p._updateNames = function () { ! startTracing('thyGridRow','_updateNames'); var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); --- 755,759 ---- p._updateNames = function () { ! //startTracing('thyGridRow','_updateNames'); var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); *************** *** 765,769 **** cell.setName('Cell'+cellPos); } ! endTracing('thyGridRow','_updateNames'); } --- 765,769 ---- cell.setName('Cell'+cellPos); } ! //endTracing('thyGridRow','_updateNames'); } *************** *** 780,784 **** p._updateClasses = function (cell, cellIdx) { ! startTracing('thyGridRow','_updateClasses'); var i,nClasses = this.cellCSSClasses.getElementsCount(); --- 780,784 ---- p._updateClasses = function (cell, cellIdx) { ! //startTracing('thyGridRow','_updateClasses'); var i,nClasses = this.cellCSSClasses.getElementsCount(); *************** *** 795,799 **** cell.setCSSClass(cell.cssActualSelection); ! endTracing('thyGridRow','_updateClasses'); } --- 795,799 ---- cell.setCSSClass(cell.cssActualSelection); ! //endTracing('thyGridRow','_updateClasses'); } *************** *** 806,810 **** p._updateAllClasses = function () { ! startTracing('thyGridRow','_updateAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); --- 806,810 ---- p._updateAllClasses = function () { ! //startTracing('thyGridRow','_updateAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); *************** *** 814,818 **** this._updateClasses(cell,i); } ! endTracing('thyGridRow','_updateAllClasses'); } --- 814,818 ---- this._updateClasses(cell,i); } ! //endTracing('thyGridRow','_updateAllClasses'); } *************** *** 825,829 **** p._removeAllClasses = function () { ! startTracing('thyGridRow','_removeAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); var j,nClasses = this.cellCSSClasses.getElementsCount(); --- 825,829 ---- p._removeAllClasses = function () { ! //startTracing('thyGridRow','_removeAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); var j,nClasses = this.cellCSSClasses.getElementsCount(); *************** *** 846,849 **** cell.setCSSClass(cell.cssActualSelection); } ! endTracing('thyGridRow','_removeAllClasses'); } --- 846,849 ---- cell.setCSSClass(cell.cssActualSelection); } ! //endTracing('thyGridRow','_removeAllClasses'); } Index: thygrid.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygrid.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thygrid.js 17 Jan 2006 22:35:06 -0000 1.7 --- thygrid.js 17 Jan 2006 23:21:33 -0000 1.8 *************** *** 65,69 **** function thyGrid(name, label) { ! startTracing('thyGrid','thyGrid'); this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); --- 65,69 ---- function thyGrid(name, label) { ! //startTracing('thyGrid','thyGrid'); this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); *************** *** 83,87 **** this.contents.addChild(this.gridContents); ! endTracing('thyGrid','thyGrid'); } --- 83,87 ---- this.contents.addChild(this.gridContents); ! //endTracing('thyGrid','thyGrid'); } *************** *** 96,103 **** p.cleanUp = function () { ! startTracing('thyGrid','cleanUp'); this.removeAllRows(); this.removeAllColumns(); ! endTracing('thyGrid','cleanUp'); } --- 96,103 ---- p.cleanUp = function () { ! //startTracing('thyGrid','cleanUp'); this.removeAllRows(); this.removeAllColumns(); ! //endTracing('thyGrid','cleanUp'); } *************** *** 110,116 **** p.reset = function () { ! startTracing('thyGrid','reset'); this.removeAllRows(); ! endTracing('thyGrid','reset'); } --- 110,116 ---- p.reset = function () { ! //startTracing('thyGrid','reset'); this.removeAllRows(); ! //endTracing('thyGrid','reset'); } *************** *** 137,144 **** p.insertColumn = function (title, col, index) { ! startTracing('thyGrid','insertColumn'); var colIndex = this.appendColumn(title, col); if (index != null) this.moveColumn(colIndex, index); ! endTracing('thyGrid','insertColumn'); } --- 137,144 ---- p.insertColumn = function (title, col, index) { ! //startTracing('thyGrid','insertColumn'); var colIndex = this.appendColumn(title, col); if (index != null) this.moveColumn(colIndex, index); ! //endTracing('thyGrid','insertColumn'); } *************** *** 159,163 **** p.appendColumn = function (title, col) { ! startTracing('thyGrid','appendColumn'); if (title == null || typeof(title) == 'object') { --- 159,163 ---- p.appendColumn = function (title, col) { ! //startTracing('thyGrid','appendColumn'); if (title == null || typeof(title) == 'object') { *************** *** 186,190 **** this.appendRow(col) } ! endTracing('thyGrid','appendColumn'); return colIndex-1; --- 186,190 ---- this.appendRow(col) } ! //endTracing('thyGrid','appendColumn'); return colIndex-1; *************** *** 220,224 **** p.getColumn = function (index) { ! startTracing('thyGrid','getColumn'); var i, nRows = this.rows.getElementsCount(); var cells = new thyCollection(); --- 220,224 ---- p.getColumn = function (index) { ! //startTracing('thyGrid','getColumn'); var i, nRows = this.rows.getElementsCount(); var cells = new thyCollection(); *************** *** 228,232 **** cells.add(this.rows.getElementByIndex(i).getCell(index)); } ! endTracing('thyGrid','getColumn'); return cells; --- 228,232 ---- cells.add(this.rows.getElementByIndex(i).getCell(index)); } ! //endTracing('thyGrid','getColumn'); return cells; *************** *** 254,261 **** p.getColumnsCount = function () { ! startTracing('thyGrid','getColumnsCount'); var row = this.rows.getElementByIndex(0); if (row) return row.getCellsCount(); ! endTracing('thyGrid','getColumnsCount'); return 0; } --- 254,261 ---- p.getColumnsCount = function () { ! //startTracing('thyGrid','getColumnsCount'); var row = this.rows.getElementByIndex(0); if (row) return row.getCellsCount(); ! //endTracing('thyGrid','getColumnsCount'); return 0; } *************** *** 273,277 **** p.removeColumn = function (index) { ! startTracing('thyGrid','removeColumn'); if (!this.rows.getElementByIndex(0).getCellElement(index)) return; --- 273,277 ---- p.removeColumn = function (index) { ! //startTracing('thyGrid','removeColumn'); if (!this.rows.getElementByIndex(0).getCellElement(index)) return; *************** *** 283,287 **** row.removeCell(index); } ! endTracing('thyGrid','removeColumn'); } --- 283,287 ---- row.removeCell(index); } ! //endTracing('thyGrid','removeColumn'); } *************** *** 295,301 **** p.removeAllColumns = function () { ! startTracing('thyGrid','removeAllColumns'); this.rows.cleanUp(); ! endTracing('thyGrid','removeAllColumns'); } --- 295,301 ---- p.removeAllColumns = function () { ! //startTracing('thyGrid','removeAllColumns'); this.rows.cleanUp(); ! //endTracing('thyGrid','removeAllColumns'); } *************** *** 317,321 **** p.searchColumn = function (str, col) { ! startTracing('thyGrid','searchColumn'); var i,content,cell,nRows = this.rows.getElementsCount(); --- 317,321 ---- p.searchColumn = function (str, col) { ! //startTracing('thyGrid','searchColumn'); var i,content,cell,nRows = this.rows.getElementsCount(); *************** *** 325,329 **** if (cell.indexOf(str) != -1) return i-1; } ! endTracing('thyGrid','searchColumn'); } --- 325,329 ---- if (cell.indexOf(str) != -1) return i-1; } ! //endTracing('thyGrid','searchColumn'); } *************** *** 345,352 **** p.insertRow = function (row, index) { ! startTracing('thyGrid','insertRow'); var rowIndex = this.appendRow(row); if (index != null) this.moveRow(rowIndex, index); ! endTracing('thyGrid','insertRow'); } --- 345,352 ---- p.insertRow = function (row, index) { ! //startTracing('thyGrid','insertRow'); var rowIndex = this.appendRow(row); if (index != null) this.moveRow(rowIndex, index); ! //endTracing('thyGrid','insertRow'); } *************** *** 363,367 **** p.appendRow = function (row) { ! startTracing('thyGrid','appendRow'); // Check if valid row if (!row || typeof(row) != 'object' || !(typeof(row.isFromClass) == 'function' && row.isFromClass('thyCollection'))) --- 363,367 ---- p.appendRow = function (row) { ! //startTracing('thyGrid','appendRow'); // Check if valid row if (!row || typeof(row) != 'object' || !(typeof(row.isFromClass) == 'function' && row.isFromClass('thyCollection'))) *************** *** 392,396 **** gRow.insertCell(row.getElementByIndex(i)); } ! endTracing('thyGrid','appendRow'); return nRows-1; --- 392,396 ---- gRow.insertCell(row.getElementByIndex(i)); } ! //endTracing('thyGrid','appendRow'); return nRows-1; *************** *** 410,414 **** p.moveRow = function (fromIndex, toIndex) { ! startTracing('thyGrid','moveRow'); fromIndex++; toIndex++; --- 410,414 ---- p.moveRow = function (fromIndex, toIndex) { ! //startTracing('thyGrid','moveRow'); fromIndex++; toIndex++; *************** *** 427,431 **** this._updateRowName(this.rows.getElementByIndex(i), i-1); } ! endTracing('thyGrid','moveRow'); } --- 427,431 ---- this._updateRowName(this.rows.getElementByIndex(i), i-1); } ! //endTracing('thyGrid','moveRow'); } *************** *** 442,446 **** p.getRow = function (index) { ! startTracing('thyGrid','getRow'); var row = this.rows.getElementByIndex(index+1); if (!row) return new thyCollection(); --- 442,446 ---- p.getRow = function (index) { ! //startTracing('thyGrid','getRow'); var row = this.rows.getElementByIndex(index+1); if (!row) return new thyCollection(); *************** *** 453,457 **** cells.add(row.getCell(i)); } ! endTracing('thyGrid','getRow'); return cells; --- 453,457 ---- cells.add(row.getCell(i)); } ! //endTracing('thyGrid','getRow'); return cells; *************** *** 486,490 **** p.getSelectedRowsIndexes = function () { ! startTracing('thyGrid','getSelectedRowsIndexes'); var selRowsIndexes = new thyCollection(); var i,nRows = this.rows.getElementsCount(); --- 486,490 ---- p.getSelectedRowsIndexes = function () { ! //startTracing('thyGrid','getSelectedRowsIndexes'); var selRowsIndexes = new thyCollection(); var i,nRows = this.rows.getElementsCount(); *************** *** 494,498 **** if (this.rows.getElementByIndex(i).isSelected()) selRowsIndexes.add(i-1); } ! endTracing('thyGrid','getSelectedRowsIndexes'); return selRowsIndexes; --- 494,498 ---- if (this.rows.getElementByIndex(i).isSelected()) selRowsIndexes.add(i-1); } ! //endTracing('thyGrid','getSelectedRowsIndexes'); return selRowsIndexes; *************** *** 508,512 **** p.getSelectedRows = function () { ! startTracing('thyGrid','getSelectedRows'); var rows = new thyCollection(); var i,j,nCells,cells,row,nRows = this.rows.getElementsCount(); --- 508,512 ---- p.getSelectedRows = function () { ! //startTracing('thyGrid','getSelectedRows'); var rows = new thyCollection(); var i,j,nCells,cells,row,nRows = this.rows.getElementsCount(); *************** *** 517,521 **** if (row.isSelected()) rows.add(this.getRow(i-1)); } ! endTracing('thyGrid','getSelectedRows'); return rows; --- 517,521 ---- if (row.isSelected()) rows.add(this.getRow(i-1)); } ! //endTracing('thyGrid','getSelectedRows'); return rows; *************** *** 542,546 **** p.getAllRows = function () { ! startTracing('thyGrid','getAllRows'); var i,nRows = this.getRowsCount(); var allRows = new thyCollection(); --- 542,546 ---- p.getAllRows = function () { ! //startTracing('thyGrid','getAllRows'); var i,nRows = this.getRowsCount(); var allRows = new thyCollection(); *************** *** 550,554 **** allRows.add(this.getRow(i)); } ! endTracing('thyGrid','getAllRows'); return allRows; --- 550,554 ---- allRows.add(this.getRow(i)); } ! //endTracing('thyGrid','getAllRows'); return allRows; *************** *** 563,567 **** p.removeAllRows = function () { ! startTracing('thyGrid','removeAllRows'); var i,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) --- 563,567 ---- p.removeAllRows = function () { ! //startTracing('thyGrid','removeAllRows'); var i,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) *************** *** 569,573 **** this.rows.removeByIndex(i); } ! endTracing('thyGrid','removeAllRows'); } --- 569,573 ---- this.rows.removeByIndex(i); } ! //endTracing('thyGrid','removeAllRows'); } *************** *** 580,584 **** p.removeSelectedRows = function () { ! startTracing('thyGrid','removeSelectedRows'); var i,lastRow,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) --- 580,584 ---- p.removeSelectedRows = function () { ! //startTracing('thyGrid','removeSelectedRows'); var i,lastRow,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) *************** *** 596,600 **** this._updateRowName(this.rows.getElementByIndex(i), i-1); } ! endTracing('thyGrid','removeSelectedRows'); } --- 596,600 ---- this._updateRowName(this.rows.getElementByIndex(i), i-1); } ! //endTracing('thyGrid','removeSelectedRows'); } *************** *** 611,615 **** p.removeRow = function (index) { ! startTracing('thyGrid','removeRow'); var row,idx = index+1; this.rows.removeByIndex(idx); --- 611,615 ---- p.removeRow = function (index) { ! //startTracing('thyGrid','removeRow'); var row,idx = index+1; this.rows.removeByIndex(idx); *************** *** 620,624 **** this._updateRowName(this.rows.getElementByIndex(i),i-1); } ! endTracing('thyGrid','removeRow'); } --- 620,624 ---- this._updateRowName(this.rows.getElementByIndex(i),i-1); } ! //endTracing('thyGrid','removeRow'); } *************** *** 631,635 **** p.setSelectCellSelectRow = function () { ! startTracing('thyGrid','setSelectedCellSelectRow'); this.selCellSelRow = true; var i,nRows = this.rows.getElementsCount(); --- 631,635 ---- p.setSelectCellSelectRow = function () { ! //startTracing('thyGrid','setSelectedCellSelectRow'); this.selCellSelRow = true; var i,nRows = this.rows.getElementsCount(); *************** *** 639,643 **** this.rows.getElementByIndex(i).setSelectCellSelectRow(); } ! endTracing('thyGrid','setSelectedCellSelectRow'); } --- 639,643 ---- this.rows.getElementByIndex(i).setSelectCellSelectRow(); } ! //endTracing('thyGrid','setSelectedCellSelectRow'); } *************** *** 783,787 **** p._addCSSClass = function (cssClass) { ! startTracing('thyGrid','_addCSSClass'); this._thyLabelPanel_addCSSClass(cssClass); if (!this.rows) return; --- 783,787 ---- p._addCSSClass = function (cssClass) { ! //startTracing('thyGrid','_addCSSClass'); this._thyLabelPanel_addCSSClass(cssClass); if (!this.rows) return; *************** *** 795,799 **** this._addRowCellsClasses(row); } ! endTracing('thyGrid','_addCSSClass'); } --- 795,799 ---- this._addRowCellsClasses(row); } ! //endTracing('thyGrid','_addCSSClass'); } *************** *** 811,815 **** p._removeCSSClass = function (cssClass) { ! startTracing('thyGrid','_removeCSSClass'); this._thyLabelPanel_removeCSSClass(cssClass); if (!this.rows) return; --- 811,815 ---- p._removeCSSClass = function (cssClass) { ! //startTracing('thyGrid','_removeCSSClass'); this._thyLabelPanel_removeCSSClass(cssClass); if (!this.rows) return; *************** *** 822,826 **** this._removeRowClasses(row, i-1); } ! endTracing('thyGrid','_removeCSSClass'); } --- 822,826 ---- this._removeRowClasses(row, i-1); } ! //endTracing('thyGrid','_removeCSSClass'); } *************** *** 838,842 **** p._addRowClasses = function (row, rowIndex) { ! startTracing('thyGrid','_addRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 838,842 ---- p._addRowClasses = function (row, rowIndex) { ! //startTracing('thyGrid','_addRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 848,852 **** } row.setCSSClass(row.cssActualSelection); ! endTracing('thyGrid','_addRowClasses'); } --- 848,852 ---- } row.setCSSClass(row.cssActualSelection); ! //endTracing('thyGrid','_addRowClasses'); } *************** *** 865,869 **** p._addRowCellsClasses = function (row) { ! startTracing('thyGrid','_addRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 865,869 ---- p._addRowCellsClasses = function (row) { ! //startTracing('thyGrid','_addRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 878,882 **** //row._updateAllClasses(); } ! endTracing('thyGrid','_addRowCellsClasses'); } --- 878,882 ---- //row._updateAllClasses(); } ! //endTracing('thyGrid','_addRowCellsClasses'); } *************** *** 894,898 **** p._removeRowClasses = function (row, rowIndex) { ! startTracing('thyGrid','_removeRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 894,898 ---- p._removeRowClasses = function (row, rowIndex) { ! //startTracing('thyGrid','_removeRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 904,908 **** } row.setCSSClass(row.cssActualSelection); ! endTracing('thyGrid','_removeRowClasses'); } --- 904,908 ---- } row.setCSSClass(row.cssActualSelection); ! //endTracing('thyGrid','_removeRowClasses'); } *************** *** 920,924 **** p._removeRowCellsClasses = function (row) { ! startTracing('thyGrid','_removeRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 920,924 ---- p._removeRowCellsClasses = function (row) { ! //startTracing('thyGrid','_removeRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 934,938 **** //row._updateAllClasses(); } ! endTracing('thyGrid','_removeRowCellsClasses'); } --- 934,938 ---- //row._updateAllClasses(); } ! //endTracing('thyGrid','_removeRowCellsClasses'); } *************** *** 950,954 **** p._updateRowName = function (row, rowIndex) { ! startTracing('thyGrid','_updateRowName'); this._removeRowClasses(row, row.getIndex()); row.setName('Row'+rowIndex); --- 950,954 ---- p._updateRowName = function (row, rowIndex) { ! //startTracing('thyGrid','_updateRowName'); this._removeRowClasses(row, row.getIndex()); row.setName('Row'+rowIndex); *************** *** 956,960 **** this._addRowClasses(row, rowIndex); this.rows.changeElementName({elm: row, name: 'Row'+rowIndex}); ! endTracing('thyGrid','_updateRowName'); } --- 956,960 ---- this._addRowClasses(row, rowIndex); this.rows.changeElementName({elm: row, name: 'Row'+rowIndex}); ! //endTracing('thyGrid','_updateRowName'); } *************** *** 975,979 **** p._populateContents = function (data) { ! startTracing('thyGrid','_populateContents'); var i, j, cells, cell, rowData; var selected = data.selectedRows; --- 975,979 ---- p._populateContents = function (data) { ! //startTracing('thyGrid','_populateContents'); var i, j, cells, cell, rowData; var selected = data.selectedRows; *************** *** 1034,1038 **** } } ! endTracing('thyGrid','_populateContents'); } --- 1034,1038 ---- } } ! //endTracing('thyGrid','_populateContents'); } *************** *** 1045,1049 **** p._sweepOutContents = function () { ! startTracing('thyGrid','_sweepOutContents'); var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; --- 1045,1049 ---- p._sweepOutContents = function () { ! //startTracing('thyGrid','_sweepOutContents'); var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; *************** *** 1055,1059 **** data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); ! endTracing('thyGrid','_sweepOutContents'); return data; --- 1055,1059 ---- data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); ! //endTracing('thyGrid','_sweepOutContents'); return data; |