You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(34) |
Sep
(302) |
Oct
(13) |
Nov
(35) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(56) |
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thyamad c. <th...@us...> - 2006-01-27 10:29:44
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2439/ext Modified Files: packages.js Log Message: Commiting file additions and modification from SVN revision 2724 to 2725... Changes made by vinicius on 2006-01-27 12:35:51 +0100 (Fri, 27 Jan 2006) corresponding to SVN revision 2725 with message: tested & committed thydropdown component Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** packages.js 26 Jan 2006 16:25:36 -0000 1.14 --- packages.js 27 Jan 2006 10:29:35 -0000 1.15 *************** *** 113,117 **** //l.add('thyapi.thywidgets.thyRichTextEdit', 'thyrichtextedit.js', ['thyLabelPanel', 'FCKeditor']); l.add('thyapi.thywidgets.thyFormPanel', 'thyformpanel.js', ['thyPanel','thyDataSource']); ! l.add('thyapi.thywidgets.thyWindow', 'thywindow.js', ['thyBorderPanel','thyButton','thyDragEvent','dynapi.functions.String']); l.add('thyapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); l.add('thyapi.thywidgets.thyFormDialog', 'thyformdialog.js', ['thyDialogWindow','thyDataSource']); --- 113,124 ---- //l.add('thyapi.thywidgets.thyRichTextEdit', 'thyrichtextedit.js', ['thyLabelPanel', 'FCKeditor']); l.add('thyapi.thywidgets.thyFormPanel', 'thyformpanel.js', ['thyPanel','thyDataSource']); ! if (dynapi.ua.ie) ! { ! l.add('thyapi.thywidgets.thyWindow', 'thywindow_ie.js', ['thyBorderPanel','thyButton','thyDragEvent','dynapi.functions.String']); ! } ! else ! { ! l.add('thyapi.thywidgets.thyWindow', 'thywindow.js', ['thyBorderPanel','thyButton','thyDragEvent','dynapi.functions.String']); ! } l.add('thyapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); l.add('thyapi.thywidgets.thyFormDialog', 'thyformdialog.js', ['thyDialogWindow','thyDataSource']); |
From: Thyamad c. <th...@us...> - 2006-01-27 10:29:44
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2439 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2724 to 2725... Changes made by vinicius on 2006-01-27 12:35:51 +0100 (Fri, 27 Jan 2006) corresponding to SVN revision 2725 with message: tested & committed thydropdown component Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** .sync_svn2cvs 27 Jan 2006 09:32:59 -0000 1.63 --- .sync_svn2cvs 27 Jan 2006 10:29:35 -0000 1.64 *************** *** 1 **** ! 2724 \ No newline at end of file --- 1 ---- ! 2725 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-27 09:33:09
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18600 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2723 to 2724... Changes made by frank on 2006-01-27 11:39:16 +0100 (Fri, 27 Jan 2006) corresponding to SVN revision 2724 with message: small css corrections.... Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** .sync_svn2cvs 26 Jan 2006 17:58:31 -0000 1.62 --- .sync_svn2cvs 27 Jan 2006 09:32:59 -0000 1.63 *************** *** 1 **** ! 2723 \ No newline at end of file --- 1 ---- ! 2724 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-27 09:33:08
|
Update of /cvsroot/thyapi/thyapi/thythemes/concisus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18600/thythemes/concisus Modified Files: 41thywindow.css 42thydialogwindow.css Log Message: Commiting file additions and modification from SVN revision 2723 to 2724... Changes made by frank on 2006-01-27 11:39:16 +0100 (Fri, 27 Jan 2006) corresponding to SVN revision 2724 with message: small css corrections.... Index: 41thywindow.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thythemes/concisus/41thywindow.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 41thywindow.css 25 Nov 2005 00:22:57 -0000 1.4 --- 41thywindow.css 27 Jan 2006 09:32:59 -0000 1.5 *************** *** 37,83 **** } - .thyWindow_borders - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_hBorders - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_vBorders - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_topBorder - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_leftBorder - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_rightBorder - { - /* Inherited from thyBorderPanel */ - } - - .thyWindow_bottomBorder - { - /* Inherited from thyBorderPanel */ - } - .thyWindow_title { color: #FFF; font-style: none; ! font-weight: bold; font-size: 10pt; text-align: left; ! height: 18px; padding-left: 10px; --- 37,48 ---- } .thyWindow_title { color: #FFF; font-style: none; ! font-weight: bold; font-size: 10pt; text-align: left; ! height: 18px; padding-left: 10px; Index: 42thydialogwindow.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thythemes/concisus/42thydialogwindow.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 42thydialogwindow.css 25 Nov 2005 00:22:57 -0000 1.4 --- 42thydialogwindow.css 27 Jan 2006 09:32:59 -0000 1.5 *************** *** 4,68 **** } - .thyDialogWindow_ie - { - } - - .thyDialogWindow_window - { - } - - .thyDialogWindow_contents - { - } - - .thyDialogWindow_ondrag - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_borders - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_hBorders - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_vBorders - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_topBorder - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_leftBorder - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_rightBorder - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_bottomBorder - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_title - { - /* Inherited from thyWindow */ - } - - .thyDialogWindow_btnClose - { - /* Inherited from thyWindow */ - } .thyDialogWindow_button --- 4,7 ---- |
From: Thyamad c. <th...@us...> - 2006-01-26 17:58:44
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7257 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2722 to 2723... Changes made by frank on 2006-01-26 20:04:45 +0100 (Thu, 26 Jan 2006) corresponding to SVN revision 2723 with message: I converted the thywindow from thyborderpanel to thypanel.. for this I was forced to add background and border information in css Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** .sync_svn2cvs 26 Jan 2006 16:25:36 -0000 1.61 --- .sync_svn2cvs 26 Jan 2006 17:58:31 -0000 1.62 *************** *** 1 **** ! 2721 \ No newline at end of file --- 1 ---- ! 2723 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-26 17:58:41
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7257/thywidgets Modified Files: thywindow.js Log Message: Commiting file additions and modification from SVN revision 2722 to 2723... Changes made by frank on 2006-01-26 20:04:45 +0100 (Thu, 26 Jan 2006) corresponding to SVN revision 2723 with message: I converted the thywindow from thyborderpanel to thypanel.. for this I was forced to add background and border information in css Index: thywindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** thywindow.js 16 Jan 2006 03:36:40 -0000 1.8 --- thywindow.js 26 Jan 2006 17:58:32 -0000 1.9 *************** *** 19,23 **** * Class: thyWindow * ! * This class implements the infamous Window widget. As it is derivate * from thyBorderPanel, it has borders and all the CSS classes that widget * has. --- 19,23 ---- * Class: thyWindow * ! * This class implements the infamous Window widget. As it is derivate * from thyBorderPanel, it has borders and all the CSS classes that widget * has. *************** *** 44,48 **** function thyWindow(name,title,html) { ! this.thyBorderPanel = thyBorderPanel; this.thyBorderPanel(name); --- 44,49 ---- function thyWindow(name,title,html) { ! this.thyBorderPanel = thyPanel; ! // this.thyBorderPanel = thyBorderPanel; this.thyBorderPanel(name); *************** *** 62,69 **** this.content.cssExtraClasses = this.cssExtraClasses; this.titleLayer.cssExtraClasses = this.cssExtraClasses; ! // Turn Window into Draggable element this.winDragBorder.setAnchor({ ! topA: this.id, leftA: this.id }); --- 63,70 ---- this.content.cssExtraClasses = this.cssExtraClasses; this.titleLayer.cssExtraClasses = this.cssExtraClasses; ! // Turn Window into Draggable element this.winDragBorder.setAnchor({ ! topA: this.id, leftA: this.id }); *************** *** 131,135 **** if (data['title']) this.setTitle(data['title']); } ! /** * Method: setTitle --- 132,136 ---- if (data['title']) this.setTitle(data['title']); } ! /** * Method: setTitle *************** *** 141,154 **** { this.titleLayer.setHTML(''); ! this.setSize('',''); this.setDisplay(true); ! var w = this.titleLayer.getWidth(); ! this.titleLayer.setHTML(title); var length = title.length; ! if (w >= this.titleLayer.getWidth()) { --- 142,155 ---- { this.titleLayer.setHTML(''); ! this.setSize('',''); this.setDisplay(true); ! var w = this.titleLayer.getWidth(); ! this.titleLayer.setHTML(title); var length = title.length; ! if (w >= this.titleLayer.getWidth()) { *************** *** 162,169 **** this.titleLayer.setHTML(dynapi.functions.limitString(title,length)); } ! this.titleLayer.setHTML(dynapi.functions.limitString(title,length-3)); } ! if (!this.openned) { --- 163,170 ---- this.titleLayer.setHTML(dynapi.functions.limitString(title,length)); } ! this.titleLayer.setHTML(dynapi.functions.limitString(title,length-3)); } ! if (!this.openned) { *************** *** 204,208 **** }; ! if (!this._created) { this.onCreate(position); --- 205,209 ---- }; ! if (!this._created) { this.onCreate(position); *************** *** 212,216 **** position(); } ! this.setZIndex({topmost: true}); this.titleLayer.setZIndex({above: this}); --- 213,217 ---- position(); } ! this.setZIndex({topmost: true}); this.titleLayer.setZIndex({above: this}); *************** *** 237,241 **** this.invokeEvent('close', new DynEvent('close',this)); } ! p._thyBordePanelSetName = p.setName; /** --- 238,242 ---- this.invokeEvent('close', new DynEvent('close',this)); } ! p._thyBordePanelSetName = p.setName; /** *************** *** 253,257 **** { if (name == null || this.name == name) return; ! this._thyBorderPanelSetName(name); if (this.titleLayer) this.titleLayer.setName(name+'_title'); --- 254,258 ---- { if (name == null || this.name == name) return; ! this._thyBorderPanelSetName(name); if (this.titleLayer) this.titleLayer.setName(name+'_title'); *************** *** 283,287 **** if (this.winDragBorder) this.winDragBorder.setCSSClass(type); } ! p._thyBorderPanelAddChild = p.addChild; /** --- 284,288 ---- if (this.winDragBorder) this.winDragBorder.setCSSClass(type); } ! p._thyBorderPanelAddChild = p.addChild; /** *************** *** 307,311 **** this.content.removeChild(c); } ! /** * Method: getInnerHTML --- 308,312 ---- this.content.removeChild(c); } ! /** * Method: getInnerHTML *************** *** 374,378 **** else this.stick(); } ! /*************************************************************************\ * Private Methods * --- 375,379 ---- else this.stick(); } ! /*************************************************************************\ * Private Methods * *************** *** 397,401 **** var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; ! var w = dynapi.document.getWidth(); var h = dynapi.document.getHeight(); --- 398,402 ---- var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; ! var w = dynapi.document.getWidth(); var h = dynapi.document.getHeight(); *************** *** 411,415 **** var i; ! for (i in positions_x) { --- 412,416 ---- var i; ! for (i in positions_x) { *************** *** 433,437 **** positions_y[thyWin.name] = new Object(); } ! positions_x[thyWin.name][x] = x; positions_y[thyWin.name][y] = y; --- 434,438 ---- positions_y[thyWin.name] = new Object(); } ! positions_x[thyWin.name][x] = x; positions_y[thyWin.name][y] = y; *************** *** 458,462 **** delete positions_x[thyWin.name]; } ! if (positions_y[thyWin.name]) { --- 459,463 ---- delete positions_x[thyWin.name]; } ! if (positions_y[thyWin.name]) { *************** *** 477,481 **** this._thyBorderPanel_destroy(); } ! p._thyBorderPanel_addCSSClass = p._addCSSClass; /** --- 478,482 ---- this._thyBorderPanel_destroy(); } ! p._thyBorderPanel_addCSSClass = p._addCSSClass; /** *************** *** 493,497 **** { this._thyBorderPanel_addCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._addCSSClass(cssClass+'_title'); --- 494,498 ---- { this._thyBorderPanel_addCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._addCSSClass(cssClass+'_title'); *************** *** 502,506 **** } } ! p._thyBorderPanel_removeCSSClass = p._removeCSSClass; /** --- 503,507 ---- } } ! p._thyBorderPanel_removeCSSClass = p._removeCSSClass; /** *************** *** 518,522 **** { this._thyBorderPanel_removeCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._removeCSSClass(cssClass+'_title'); --- 519,523 ---- { this._thyBorderPanel_removeCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._removeCSSClass(cssClass+'_title'); |
From: Thyamad c. <th...@us...> - 2006-01-26 16:25:49
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4677/thywidgets Modified Files: thyeditbox.js thylistbox.js Added Files: thydropdownbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2720 to 2721... Changes made by vinicius on 2006-01-26 18:31:37 +0100 (Thu, 26 Jan 2006) corresponding to SVN revision 2721 with message: Index: thyeditbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thyeditbox.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thyeditbox.js 10 Jan 2006 19:07:06 -0000 1.7 --- thyeditbox.js 26 Jan 2006 16:25:36 -0000 1.8 *************** *** 3,7 **** * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira, Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * --- 3,7 ---- * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * *************** *** 93,97 **** 'height: 100%;'+ 'left: 0px;'+ ! 'right: 0px'+ 'background: inherit;'+ 'background-color: inherit;'+ --- 93,97 ---- 'height: 100%;'+ 'left: 0px;'+ ! 'right: 0px;'+ 'background: inherit;'+ 'background-color: inherit;'+ Index: thylistbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thylistbox.js 22 Dec 2005 03:39:38 -0000 1.7 --- thylistbox.js 26 Jan 2006 16:25:36 -0000 1.8 *************** *** 126,129 **** --- 126,130 ---- * will be set to null * + * viniciuscb: why null???? */ p._thyGridAppendRow = p.appendRow; --- NEW FILE: thydropdownbox_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Drop-Down Combo Box Element * * http://www.thyamad.com * * * * Copyright (C) 2005 - Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyDropDownBox * * This is the Drop Down Combo Box Element. It provides a <thyGridCell>, * a <thyButton> and a <thyListBox> working together to provide a * Drop-Down Combo Box Widget. * * CSS Classes: * * - <thyPanel> classes * - <thyLabelPanel> classes * - <thyEditBox> classes * * .thyDropDownBox - The class of main element, derived from <thyEditBox> * .thyDropDownBox_button - The <thyButton> element class * .thyDropDownBox_listBox - The <thyListBox> element class * * .<object name> - The class of main element, derived from <thyEditBox> * .<object name>_edit - The <thyEditBox> element class * .<object name>_button - The <thyButton> element class * .<object name>_listBox - The <thyListBox> element class * * Events: * * onselect - When user selects an option * onchange - When there's any change in value (by reset and populate considered) * * See Also: * * - <thyEditBox> * - <thyButton> * - <thyListBox> * - <thyLabelPanel> * - <thyPanel> * */ function thyDropDownBox(name,label) { this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); // Atributes //These selected* arguments are only used when this element has not been created this.selectedIndex = null; this.selectedValue = null; this.selectedContent = null; this.defaultValue = null; this.lastSelected = null; this.popcontents = [ ]; this.addCSSClass('thyDropDownBox'); this.onPreCreate(this.preInitThyDropDownBox); this.onCreate(this.initThyDropDownBox); /* Essa classe deve ter os eventos onselect e onchange */ } p = dynapi.setPrototype('thyDropDownBox', 'thyLabelPanel'); /** * Method: initThyDropDownBox * * Initialization Method * */ p.initThyDropDownBox = function() { this.contents.elm.childNodes[0]._dynobj = this; } /** * Method: preInitThyDropDownBox * * Initialization method executed right before element creation * */ p.preInitThyDropDownBox = function() { this.contents.setRelativeness(false); this.setHTML(['<select ', 'class="thyEditBox_input '+this.name+'_input" ', 'style="', 'width: 100%;', 'height: 100%;', 'left: 0px;', 'right: 0px;', 'background: inherit;', 'background-color: inherit;', 'text-align: inherit;', 'color: inherit;', 'border: 0px;', 'z-index: inherit" ', (this.readOnly ? 'readonly ': ''), (this.disabled ? 'disabled ': ''), '>', this._getHTMLContents(), '</select>' ].join('') ); } /** * Method: setDefaultValue * * Sets the default value when widget is reset * * Parameters: * * value - The default value * */ p.setDefaultValue = function (value) { this.defaultValue = value; } /** * Method: getSelectedIndex * * Returns the index of the selected option * */ p.getSelectedIndex = function () { if (!this._created) return this.selectedIndex; return this.contents.elm.childNodes[0].selectedIndex; } /** * Method: getSelectedValue * * Returns the value of the selected option * Vinicius: refazer esta */ p.getSelectedValue = function () { if (!this._created) return this.selectedValue; return this.contents.elm.childNodes[0].value; } /** * Method: getSelectedContent * * Returns the content of the selected option * */ p.getSelectedContent = function () { if (!this._created) return this.selectedContent; var sel = this.contents.elm.childNodes[0]; if (sel[sel.selectedIndex]) { return sel[sel.selectedIndex].text; } } /** * Method: getSelected * * Returns a <thyCollection> with the index, the value and the content * of the selected option * */ p.getSelected = function () { var col = new thyCollection(); if (!this._created) { col.add(this.selectedIndex,'index'); col.add(this.selectedValue,'value'); col.add(this.selectedContent,'content'); return col; } col.add(this.getSelectedIndex(),'index'); col.add(this.getSelectedValue(),'value'); col.add(this.getSelectedContent(),'content'); return col; } /** * Method: getLastSelectedIndex * * Returns the index of the last selected option * */ p.getLastSelectedIndex = function () { return this.lastSelected[0]; } /** * Method: getLastSelectedValue * * Returns the value of the last selected option * */ p.getLastSelectedValue = function () { return this.lastSelected[1]; } /** * Method: getLastSelectedContent * * Returns the content of the selected option * */ p.getLastSelectedContent = function () { return this.lastSelected[2]; } /** * Method: getLastSelected * * Returns a <thyCollection> with the index, the value and the content * of the last selected option * */ p.getLastSelected = function () { var col = new thyCollection(); col.add(this.lastSelected[0],'index'); col.add(this.lastSelected[1],'value'); col.add(this.lastSelected[2],'content'); } /** * Method: getContentByValue * * Returns the associated content with the specified value * * Parameter: * * value - The value associated with the needed content * */ p.getContentByValue = function (value) { var sel_opts = this.contents.elm.childNodes[0].options; for (var i in options) { if (options[i].value == value) { return options[i].text; } } } /** * Method: setContentByValue * * Changes the content associated with the specified value * * Parameters: * * value - The value associated with the needed content * content - The new content * */ p.setContentByValue = function(value,content) { var sel_opts = this.contents.elm.childNodes[0].options; for (var i in options) { if (options[i].value == value) { options[i].text = content; return; } } } p._thyLabelPanelAddChild = p.addChild; /** * Method: addChild * * Overloaded method that prevents the insertion of children in <thyDropDownBox> * */ p.addChild = function () { throw({result: 'No meaning on adding child to thyDropDownBox', location:'thyDropDownBox.addChild'}); } p._thyLabelPanelRemoveChild = p.removeChild; /** * Method: removeChild * * Overloaded method that prevents the removal of children of <thyDropDownBox> * */ p.removeChild = function () { throw({result: 'No meaning on adding child to thyDropDownBox', location:'thyDropDownBox.addChild'}); } p._thyLabelPanelSetName = p.setName; /** * Method: setName * * Overwritten method that sets the name of main, button and listbox * and refreshes CSS Classes * * Parameter: * * name - The new widget name * */ p.setName = function (name) { if (name == null || this.name == name) return; var old_name = this.name; this._thyLabelPanelSetName(name); this.contents.elm.childNodes[0].className += (this.name + '_input'); } /** * Method: hideOption * * Makes an option invisible to the user * * Parameters: One of the two, indexed in an object: * * value - The value of the option to become invisible * index - The index of the option to become invisible * */ p.hideOption = function(params) { /* TODO implement this in IE */ } /** * Method: showOption * * Makes an option visible to the user * * Parameters: One of the two, indexed in an object * * value - The value of the option to become visible * index - The index of the option to become visible * */ p.showOption = function(params) { /* TODO implement this in IE */ } /*************************************************************************\ * Group: Private Methods * \*************************************************************************/ p._thyLabelPanel_destroy = p._destroy; /** * Method: _destroy * * Overloaded method that removes dropList from memory * */ p._destroy = function () { /* This avoids memory leak in IE */ this.contents.elm.childNodes[0]._dynobj = null; this._thyLabelPanel_destroy(); } /** * Method: _cleanUp * * Cleans up all values from the component * */ p._cleanUp = function () { var sel = this.contents.elm.childNodes[0]; while (sel.firstChild) { sel.removeChild(sel.firstChild); } } /** * Method: _reset * * Resets dropList to defaultValue * */ p._reset = function () { this.contents.elm.childNodes[0].value = this.defaultValue; } /** * Method: _populateContents * * Sets the contents of the <thyDropDownBox>. This is the same populate as * <thyListBox>::populate, so pass correct formated data. * * Parameter: * * data - The <thyDropDownBox> possible values * */ p._populateContents = function (data) { /* VINICIUS: mudar isto */ //Esse aqui fica dentro do _updateDOMElement //var oldSelected = this.dropSelected; if (typeof(data) == 'number') { data = {index: data}; } if (typeof(data) == 'object') { this.selectedIndex = data.index; this.selectedValue = data.value; if (data[0]) { delete data.index; delete data.value; //transforming contents in array var contents = [], i; for (i in data) { if (data[i].length < 2) { //This is according to original specifications var dat = [null, data[0]]; contents.push(dat); } else { contents.push(data[i]); } } this.popcontents = contents; } this._updateDOMElement(); } //Fica dentro do _updateDOMElement /* if (this.dropSelected != oldSelected) { this.lastSelected = oldSelected; this.invokeEvent('change', new DynEvent('change', this)); }*/ } /** * Method: _sweepOutContents * * Gets the value that was selected by the user. * */ p._sweepOutContents = function () { return this.getSelected().sweepOut(); } p._thyLabelPanel_addCSSClass = p._addCSSClass; /** * Method: _addCSSClass * * Overwritten method that adds the class to main, button and listbox * * Parameter: * * cssClass - The cssClass to be added * */ p._addCSSClass = function (cssClass) { this._thyLabelPanel_addCSSClass(cssClass); /* VINICIUS: mudar isto */ /* if (this.dropButton) { this.dropEdit._addCSSClass(cssClass+'_edit'); this.dropButton._addCSSClass(cssClass+'_button'); this.dropList._addCSSClass(cssClass+'_listBox'); }*/ } p._thyLabelPanel_removeCSSClass = p._removeCSSClass; /** * Method: _removeCSSClass * * Overwritten method that removes the specified CSS Class from main, * button and listbox * * Parameter: * * cssClass - The cssClass to be removed * */ p._removeCSSClass = function (cssClass) { this._thyLabelPanel_removeCSSClass(cssClass); /* VINICIUS: mudar isto */ /* if (this.dropButton) { this.dropEdit._removeCSSClass(cssClass+'_edit'); this.dropButton._removeCSSClass(cssClass+'_button'); this.dropList._removeCSSClass(cssClass+'_list'); }*/ } /** * Method: _getHTMLContents * * This class is used in the creation of the current component */ p._getHTMLContents = function() { var selected = false, str = [ ], contents = this.popcontents, i, j = 0; for (i in contents) { if (j == this.selectedIndex || contents[i][1] == this.selectedValue) { str.push('<option value="'+contents[i][0]+'" SELECTED>'+contents[i][1]+'</option>'); } else { str.push('<option value="'+contents[i][0]+'">'+contents[i][1]+'</option>'); } j++; } return str.join(''); } /** * Method: _updateDOMElement * * Updates the DOM Element * * Actually, it erases all the select's contents and puts some new contents */ p._updateDOMElement = function() { var cont = this.popcontents; if (!this._created) { //This sets the selectedValue if only selectedIndex was specified and vice-versa if (this.selectedIndex) { this.selectedValue = cont[this.selectedIndex][0]; this.selectedContent = cont[this.selectedIndex][1]; } else if (this.selectedValue) { for (var i in cont) { if (cont[i][0] == this.selectedValue) { this.selectedIndex = i; this.selectedContent = cont[i][1]; break; } } } return; } this._cleanUp(); var sel = this.contents.elm.childNodes[0], j = 0; for (var i in cont) { var opt = this.parent.doc.createElement('option'); opt.value = cont[i][0]; opt.text = cont[i][1]; sel.options.add(opt); if (j == this.selectedIndex || cont[i][0] == this.selectedValue) sel.selectedIndex = j; j++; } //ver se teve changes e chamar o metodo onchange } /*************************************************************************\ * Group: Events Methods * \*************************************************************************/ /** VINICIUS: assignar os eventos desse objeto ao dropdown */ /****************************************************************************\ * Group: Misc Operations * \****************************************************************************/ |
From: Thyamad c. <th...@us...> - 2006-01-26 16:25:47
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4677/ext Modified Files: packages.js Log Message: Commiting file additions and modification from SVN revision 2720 to 2721... Changes made by vinicius on 2006-01-26 18:31:37 +0100 (Thu, 26 Jan 2006) corresponding to SVN revision 2721 with message: Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** packages.js 23 Jan 2006 03:35:31 -0000 1.13 --- packages.js 26 Jan 2006 16:25:36 -0000 1.14 *************** *** 133,137 **** l.add('thyapi.thywidgets.thyListBox', 'thylistbox.js', ['thyGrid']); ! l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox.js', ['thyListBox','thyEditBox','thyButton']); l.add('thyapi.thywidgets.thyAbout', 'thyabout.js', ['thyWindow','thyPanel']); --- 133,144 ---- l.add('thyapi.thywidgets.thyListBox', 'thylistbox.js', ['thyGrid']); ! if (dynapi.ua.ie) ! { ! l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox_ie.js', ['thyLabelPanel']); ! } ! else ! { ! l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox.js', ['thyListBox','thyEditBox','thyButton']); ! } l.add('thyapi.thywidgets.thyAbout', 'thyabout.js', ['thyWindow','thyPanel']); |
From: Thyamad c. <th...@us...> - 2006-01-26 16:25:44
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4677 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2720 to 2721... Changes made by vinicius on 2006-01-26 18:31:37 +0100 (Thu, 26 Jan 2006) corresponding to SVN revision 2721 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** .sync_svn2cvs 23 Jan 2006 03:35:30 -0000 1.60 --- .sync_svn2cvs 26 Jan 2006 16:25:36 -0000 1.61 *************** *** 1 **** ! 2701 \ No newline at end of file --- 1 ---- ! 2721 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-23 03:35:41
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31976/thywidgets Added Files: thygrid_ie.js thygridcell_ie.js thygridcontents_ie.js thygridrow_ie.js Log Message: Commiting file additions and modification from SVN revision 2700 to 2701... Changes made by vinicius on 2006-01-23 05:39:18 +0100 (Mon, 23 Jan 2006) corresponding to SVN revision 2701 with message: --- NEW FILE: thygridcontents_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Contents Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridContents * * This is the Grid Contents class. It is a <thyPanel> that creates a TABLE * element and overload some of it methods to guarantee that the TABLE will * be constructed correctly * * CSS Classes: * * - .thyGridContents * * - .<object name> * * See Also: * * - <thyGrid> * * - <thyPanel> * */ function thyGridContents(name) { this.thyPanel = thyPanel; this.thyPanel(name); } p = dynapi.setPrototype('thyGridContents','thyPanel'); /** * Method: getOuterHTML * * Overwritten method that draws TABLE element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<table id="'+this.id+'"', (this.disabled ? 'disabled' : ''), (this.readOnly?'readonly':''), 'cellpadding="0"', 'cellspacing="0"', 'border="0"', 'width="100%"', 'style="', 'width:100%;', '"><tbody>', this.getInnerHTML(), //(this.contentRelative ? '</div></div>' : '</div>') '</tbody></table>' ].join(''); //alert(html); return html; } /** * Method: invokeEvent * * Overloaded method that calls the invokeEvent of <thyGrid> instead * of this. * */ p.invokeEvent = function (eventName, eventObj) { if (!this.parent || !this.parent.parent) return; this.parent.parent.invokeEvent(eventName, eventObj); } --- NEW FILE: thygridcell_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Cell Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridCell * * This is the basic Cell element. It should provides all functionalities * that a Table Cell element should have. * * CSS Classes: * * - .thyGridCell_edit - when in simple edit mode * - .thyGridCell_editFull - when in full edit mode * - .thyGridCell_selected - when selected * - .thyGridCell_header - when type is header * - .thyGridCell_header_selected - when type is header and it is selected * * - .<object name>_edit - when in simple edit mode * - .<object name>_editFull - when in full edit mode * - .<object name>_selected - when selected * - .<object name>_header - when type is header * - .<object name>_header_selected - when type is header and it is selected * * Package: ThyAPI * * Namespace: ThyWidgets * * See Also: * - <thyGrid> * - <thyPanel> * */ function thyGridCell(name, html) { this.thyPanel = thyPanel; this.thyPanel(name,null); // Atributes this.cellMode = 0; this.cellType = 0; this.cellSelected = false; this.setRelativeness(false); this.cssClasses = { 'default': ['default'], selected : ['default', 'selected'], header : ['header'], header_selected : ['header', 'header_selected'] }; this.addCSSClass('thyGridCell'); var self = this; this.addEventListener({ onclick: function(e){ if (e.getOrigin() == self.cellContents) self._selectEvent() }}); } p = dynapi.setPrototype('thyGridCell', 'thyPanel'); /** * Method: populate * * Sets the contents of the cell. * * Parameter: * * data - The contents of the Cell, that can be: * * - A non-object data (will be included as HTML to the contents of the cell) * - A <thyPanel> or derivate class object that will be added as child. * - A <thyCollection> of <thyPanel> or derivate classe objects, that will * be added sequentially as children. * */ p.populate = function (data) { if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') { if(data.isFromClass('thyPanel')) { this._destroyAllChildren(); this.addChild(data); } else if (data.isFromClass('thyCollection')) { try { this._destroyAllChildren(); var i,nData = data.getElementsCount(); for (i=0; i<nData; i++) { this.addChild(data.getElementById(i)); } } catch(e) { return; } } } else { try { this.setHTML(data); } catch(e) { return; } } } /** * Method: sweepOut * * Gets the contents of the cell. * * If the contents of the cell is simply HTML, it is returned, otherwise * in case the cell has children, their sweepOut() returned values are * grouped in a <thyCollection> and returned. * */ p.sweepOut = function () { if (!this.children.length) return this.getHTML(); try { var i,contents = new thyCollection(); for (i=0; i<this.children.length; i++) { contents.add(this.children[i].sweepOut(), this.children[i].name); } return contents; } catch(e) { return; } } p._thyPanelAddChild = p.addChild; /** * Method: addChild * * Adds a widget inside the cell * */ p.addChild = function (child) { if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); } p._thyPanelSetHTML = p.setHTML; /** * Method: setHTML * * Overloaded method that sets HTML of Contents, never putting empty HTML * inside box (otherwise it would not be visible). * * Parameter: * * html - The HTML code to be inserted * */ p.setHTML = function (html) { if (!html && typeof(html) != 'number') html = ' '; this._thyPanelSetHTML(html); } p._thyPanelGetHTML = p.getHTML; /** * Method: getHTML * * Overloaded method that returns the HTML of Contents and not the HTML * of cell. Besides that, it garantees that the return is not ' ', which * is set as HTML when setHTML receives a null parameter. * */ p.getHTML = function () { var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); if (html == ' ' || html == ' ') { return ''; } if (typeof(html) == 'string') { return html.replace(rSpace, ' '); } if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { return html.sweepOut(); } return html; } /** * Method: setMode * * Sets the onclick exchange mode of the grid. This can be: * * - r (Read Only) * - rws (Simple Read/Write) * - rwf (Full Read/Write) * * Parameters: * * mode - The mode * * - *Note* - The only supported mode now is Read Only * */ p.setMode = function(mode) { if (this.cellType == 1) return; if (this.readOnly) return; switch (mode) { case 'r' : mode = 0; break; case 'rws': mode = 1; break; case 'rwf': mode = 2; break; default: return; } this.cellMode = mode; this._processMode(); } /** * Method: setType * * Change this object type to one of: * * - Normal * - Header * * Parameters: * * type - The type. 'n' for Normal, 'h' for header * */ p.setType = function(type) { switch (type) { case 'n': type = 0; break; case 'h': type = 1; break; default : return; } this.cellType = type; this._processType(); } /** * Method: setSelected * * Sets the selected state of this Cell * * Parameters: * * state - true/false * */ p.setSelected = function(state) { state = (state) ? true : false; if (this.cellSelected == state) return; this.cellSelected = state; this._processType(); } /** * Method: switchSelectedState * * Switches the actual selected state, turning the cell into selected if it is * not and vice-versa * */ p.switchSelectedState = function() { this.setSelected(!this.cellSelected); } /** * Method: isSelected * * Returns the selected state of this Cell * * Returns: * * Boolean */ p.isSelected = function() { return this.cellSelected; } /** * Method: getOuterHTML * * Overwritten method that draws TD element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<td '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', ((this.x!=null)? ' left: '+((typeof(this.x)=='string')?this.x+';':this.x+'px;') : ''), ((this.y!=null)? ' top: '+((typeof(this.y)=='string')?this.y+';':this.y+'px;') : ''), ((this.w)? ' width:'+((typeof(this.w)=='string')?this.w+';':(this.w+fixBw)+'px;'):''), ((this.h)? ' height:'+((typeof(this.h)=='string')?this.h+';':(this.h+fixBh)+'px;'):''), ((this.z)? ' z-index: '+this.z+';':''), ((this._cursor!=null)? ' cursor:'+this._cursor+';':''), ((this.visible==false)? ' visibility:hidden;': ''), ((this.display) ? ' display: '+this.display+';' : ''), this._cssBorder, ((this._overflow)? this._cssOverflow : ''), ((this.x != null || this.y != null) ? this._cssPosition+';' : ''), (this._float ? this._cssFloat : ''), '">', this.getInnerHTML(), '</td>' ].join(''); //alert(html); return html; } /*************************************************************************\ * Private Methods * \*************************************************************************/ p._create = function () { if (this.parent && !this.elm) { var elm = this._createDOMElement(); DynLayer._assignElement(this,elm); DynElement._flagCreate(this); } } // FIXME: this should be on browser specific methods! p._createDOMElement = function () { if (this.parent) { var elm, parentElm; parentElm = this.parent.elm; if (!this.elm) { elm = this.parent.doc.createElement('td'); elm._className = this._cssClass; elm.id = this.id; var css = elm.style; if (this.w) css.width = this.w; if (this.h) css.height = this.h; if (this.bgColor != null) css.backgroundColor = this.bgColor; if (this.z) css.zIndex = this.z; if (this._cursor != null) css.cursor = this._cursor; if (this._overflow) css.overflow = this._overflow; css.visibility=(this.visible==false)? 'hidden':''; if(this.display) css.display = this.display; if(this.disabled) elm.disabled = true; elm.innerText = this.getInnerHTML(); } else { elm = this.elm; } parentElm.appendChild(elm); return elm; } } /** * Method: _processMode * * Process the modifications needed to achieve the selected mode. * */ p._processMode = function() { switch (this.cellMode) { case 0: this.setHTML(this.cellEditBox.sweepOut()); return; case 1: this.cellEditBox.populate(this.getHTML()); this.cellEditBox.setDisplay(true); this.cellEditBox.focus(); } return; } /** * Method: _processType * * Process the modifications needed to achieve the type mode. */ p._processType = function() { switch (this.cellType) { case 0: this.setCSSClass(this.cellSelected ? 'selected' : 'default'); return; case 1: this.setCSSClass(this.cellSelected ? 'header_selected' : 'header'); return; } } /** * Method: _selectEvent * * Method that handles onclick events * */ p._selectEvent = function() { this.setSelected(!this.cellSelected); } --- NEW FILE: thygrid_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Element, with optimizations * * to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** [...965 lines suppressed...] * */ p._sweepOutContents = function () { var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; for (i=0; i<nRows; i++) { data.rows[i] = this.getRow(i).getIndexedElements(); } data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); return data; } /****************************************************************************\ * Events * \****************************************************************************/ --- NEW FILE: thygridrow_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Row Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridRow * * This is the Grid Row class. It is just a <thyPanel> with a * <thyVisualCollection> of <thyGridCell> elements. * * CSS Classes: * * - .thyGridRow * * - .<object name> * * See Also: * * - <thyGrid> * * - <thyPanel> * */ function thyGridRow(name, index) { this.thyPanel = thyPanel; this.thyPanel(name); // Attributes \\ this.cells = new thyVisualCollection(this.name+'_cells', this); this.selected = false; this.selCellSelRow = false; this.cellCSSClasses = new thyCollection(); this.cellIndexedCSSClasses = new thyCollection(); this.rowIndex = index || 0; this.setRelativeness(false); this.cells.setDefaultName('Cell'+index); this.insertCell(this.rowIndex == -1 ? '' : this.rowIndex, -1, 'h'); this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); } p = dynapi.setPrototype('thyGridRow', 'thyPanel'); /** * Method: initThyGridRow * * Initialization Method. Inserts the Row header Cell * */ p.initThyGridRow = function () { } /** * Method: addCellCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p.addCellCSSClass = function (cssClass) { this._addCellCSSClass(cssClass); this._updateAllClasses(); } /** * Method: addCellIndexedCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p.addCellIndexedCSSClass = function (cssClass) { this._addCellIndexedCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeCellCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p.removeCellCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeCellIndexedCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p.removeCellIndexedCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeAllCellClasses * * Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses * */ p.removeAllCellClasses = function () { this._removeAllClasses(); this._removeAllCellClasses(); this._updateAllClasses(); } /** * Method: setIndex * * Sets the Index of this Row * * Parameter: * * index - The new Row index * */ p.setIndex = function (index) { if (index == null || this.rowIndex == index) return; this.rowIndex = index; this.cells.setDefaultName('Cell'+index); this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); } /** * Method: getIndex * * Returns the index of this Row * */ p.getIndex = function () { return this.rowIndex; } /** * Method: insertCell * * Inserts a Cell into the specified column * * Parameters: * * content - The cell content * column - The column index * type - The cell type (n - normal, h - header) * */ p.insertCell = function (content, column, type) { var col; if (content == null) content = ''; if (column == null || typeof(column) != 'number') col = this.cells.getElementsCount()-1; else col = column; var cell = this._createCell(col, type); cell.populate(content); this.cells.add(cell, cell.name); this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); return col+1; } /** * Method: getCell * * Returns the contents of the Cell that resides on the specified * column * * Parameter: * * column - The column index * */ p.getCell = function (column) { if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); return cell ? cell.sweepOut() : ''; } /** * Method: getCellElement * * Returns the <thyGridCell> element that resides on the specified position * * If what you want is just the cell contents, please use <thyGridRow>::getCell * * This method should *ONLY* be used if developer wants to manipulate cell * properties! Be warned that messing with wrong property may break encapsulation * and thus produce undesired effects on <thyGridRow> * * Parameter: * * column - The column index * */ p.getCellElement = function (column) { if (column == null || typeof(column) != 'number') return; var col = column+1; return this.cells.getElementByIndex(col); } /** * Method: getSelectedCells * * Returns a <thyCollection> with the contents of the Selected Cells * */ p.getSelectedCells = function () { var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); for (i=1; i<nCells; i++) { cell = this.cells.getElementByIndex(i); if (cell.isSelected()) cells.add(cell.sweepOut()); } return cells; } /** * Method: getCellsCount * * Returns the number of cells this row has * */ p.getCellsCount = function () { return this.cells.getElementsCount()-1; } /** * Method: removeCell * * Removes the Cell on the specified column * * Parameter: * * column - The column index * * Returns: * * The Cell contents * */ p.removeCell = function (column) { if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); this.cells.remove(cell, cell.name, column); this._updateNames(); this._updateAllClasses(); return cell.sweepOut(); } /** * Method: moveCell * * Changes the position of a Cell to a new place * * Parameters: * * orig - The original column * dest - The destination column * */ p.moveCell = function (orig, dest) { if (orig == null || typeof(orig) != 'number' || dest == null || typeof(dest) != 'number') throw({result: 'Invalid Indexes', location: 'thyGridRow.moveCell'}); orig++; dest++; var cell = this.cells.getElementByIndex(orig); if (!cell) return; var nClasses = this.cellIndexedCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell.removeCSSClass(this.cellIndexedCSSClasses.getElementByIndex(i)+orig); } if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); this._updateAllClasses(); } /** * Method: isSelected * * Used to check if the cell is selected or not * * Returns: * * Boolean - True if selected, False if not selected * */ p.isSelected = function () { return this.selected; } /** * Method: selectOnly * * Selects the whole row, BUT DO NOT CALL event 'onselectrow' * */ p.selectOnly = function () { if (this.isSelected()) { return; } this.selected = true; var i,cell,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); cell.setSelected(true); } } /** * Method: select * * Selects the whole Row, that means, all Cells and calls * event handler 'onselectrow' and 'onselectrow<n>' where <n> * is the row index. * */ p.select = function () { if (this.isSelected()) { return; } this.selectOnly(); if (this.parent) { var eventName = this.getIndex() == -1 ? 'selectheaderrow' : 'selectrow'; this.parent.invokeEvent(eventName, new DynEvent(eventName, this)); this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } } /** * Method: unselectOnly * * Unselects the whole row, BUT DO NOT CALL event 'onunselectrow' * */ p.unselectOnly = function () { if (!this.isSelected()) { return; } this.selected = false; var i,cell,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); cell.setSelected(false); } } /** * Method: unselect * * Unselectes the whole Row, that means, all Cells and calls * event handler 'onselectrow' and 'onselectrow<n>' where <n> * is the row index. * */ p.unselect = function () { if (!this.isSelected()) { return; } this.unselectOnly(); if (this.parent) { var eventName = this.getIndex() == -1 ? 'unselectheaderrow' : 'unselectrow'; this.parent.invokeEvent(eventName, new DynEvent(eventName, this)); this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } } /** * Method: switchSelectedState * * Changes the selected state to its oposit state * */ p.switchSelectedState = function () { this.selected ? this.unselect() : this.select(); } /** * Method: setSelectCellSelectRow * * Selects all cells if any cell is selected * * */ p.setSelectCellSelectRow = function () { this.selCellSelRow = true; } /** * Method: unsetSelectCellSelectRow * * Selects all cells only if clicking on row header * */ p.unsetSelectCellSelectRow = function () { this.selCellSelRow = false; } /** * Method: getOuterHTML * * Overwritten method that draws TR element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', ((this.x!=null)? ' left: '+((typeof(this.x)=='string')?this.x+';':this.x+'px;') : ''), ((this.y!=null)? ' top: '+((typeof(this.y)=='string')?this.y+';':this.y+'px;') : ''), ((this.w)? ' width:'+((typeof(this.w)=='string')?this.w+';':(this.w+fixBw)+'px;'):''), ((this.h)? ' height:'+((typeof(this.h)=='string')?this.h+';':(this.h+fixBh)+'px;'):''), ((this.z)? ' z-index: '+this.z+';':''), ((this._cursor!=null)? ' cursor:'+this._cursor+';':''), ((this.visible==false)? ' visibility:hidden;': ''), ((this.display) ? ' display: '+this.display+';' : ''), this._cssBorder, ((this._overflow)? this._cssOverflow : ''), ((this.x != null || this.y != null) ? this._cssPosition+';' : ''), (this._float ? this._cssFloat : ''), '">', this.getInnerHTML(), '</tr>' ].join(''); //alert(html); return html; } /*************************************************************************\ * Group: Private Methods * \*************************************************************************/ /** * Method: _create * * Overloaded method that creates the TR element and inserts it into parent * */ p._create = function () { if (this.parent && !this.elm) { var elm, parentElm; // Parent MUST be thyGridContents \\ if (typeof(this.parent.isFromClass) != 'function' || !this.parent.isFromClass('thyGridContents')) { throw({result: 'thyGridRow MUST be child of thyGridContents', location: 'thyGridRow._create'}); } elm = this._createDOMElement(); this.elm = elm; this.doc = this.parent.doc; this._created = true; for (var i=0; i<this.children.length; i++) this.children[i]._createDOMElement(); DynLayer._assignElement(this,elm); DynElement._flagCreate(this); } } p._createDOMElement = function () { if (this.parent && !this.elm) { var elm, parentElm; parentElm = this.parent._getDOMChildrenHolder(); elm = this.parent.doc.createElement('tr'); elm._className = this._cssClass; elm.id = this.id; var css = elm.style; if (this.w) css.width = this.w; if (this.h) css.height = this.h; if (this.bgColor != null) css.backgroundColor = this.bgColor; if (this.z) css.zIndex = this.z; if (this._cursor != null) css.cursor = this._cursor; if (this._overflow) css.overflow = this._overflow; css.visibility=(this.visible==false)? 'hidden':''; if(this.display) css.display = this.display; if(this.disabled) elm.disabled = true; parentElm.appendChild(elm); return elm; } } /** * Method: _addCellCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p._addCellCSSClass = function (cssClass) { this.cellCSSClasses.add(cssClass, cssClass); } /** * Method: _addCellIndexedCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p._addCellIndexedCSSClass = function (cssClass) { this.cellIndexedCSSClasses.add(cssClass, cssClass); } /** * Method: _removeCellCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p._removeCellCSSClass = function (cssClass) { this.cellCSSClasses.remove(cssClass, cssClass); } /** * Method: _removeCellIndexedCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p._removeCellIndexedCSSClass = function (cssClass) { this.cellIndexedCSSClasses.remove(cssClass, cssClass); } /** * Method: removeAllCellClasses * * Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses * */ p._removeAllCellClasses = function () { this.cellCSSClasses.cleanUp(); this.cellIndexedCSSClasses.cleanUp(); } /** * Method: _createCell * * Creates a Cell and sets all CSS Classes that has been passed to * <thyGridRow> * * Parameters: * * colIndex - The column index of this cell * type - The Cell type. Can be 'n' for normal or 'h' for header * */ p._createCell = function (colIndex, type) { if (!type) type = 'n'; var cell = new thyGridCell('Cell'+this.rowIndex+colIndex); cell.setType(type); var self = this; if (type == 'n') { cell.addEventListener({ onclick: function(e) { if (self.selCellSelRow) self.switchSelectedState(); }}); } else { cell.addEventListener({ onclick: function(e) { self.switchSelectedState(); }}); } return cell; } /** * Method: _updateNames * * Updates the names of all Cells to reflect their real positions and * also updates all CSS indexed classes * */ p._updateNames = function () { var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cellPos = ''+this.rowIndex+(i-1); cell = this.cells.getElementByIndex(i); this.cells.changeElementName({elm: cell, name: 'Cell'+cellPos, index: i}); cell.setName('Cell'+cellPos); } } /** * Method: _updateClasses * * Updates the classes of the specified cell * * Parameter: * * cell - The specific cell * cellIdx - The index of the cell */ p._updateClasses = function (cell, cellIdx) { var i,nClasses = this.cellCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell._addCSSClass(this.cellCSSClasses.getElementByIndex(i)); } nClasses = this.cellIndexedCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell._addCSSClass(this.cellIndexedCSSClasses.getElementByIndex(i)+(cellIdx-1)); } cell.setCSSClass(cell.cssActualSelection); } /** * Method: _updateAllClasses * * Updates the classes of every cell * */ p._updateAllClasses = function () { var i,cell,nClasses,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); this._updateClasses(cell,i); } } /** * Method: _removeAllClasses * * Removes the classes of every cell * */ p._removeAllClasses = function () { } |
From: Thyamad c. <th...@us...> - 2006-01-23 03:35:39
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31976/ext Modified Files: packages.js Log Message: Commiting file additions and modification from SVN revision 2700 to 2701... Changes made by vinicius on 2006-01-23 05:39:18 +0100 (Mon, 23 Jan 2006) corresponding to SVN revision 2701 with message: Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** packages.js 21 Nov 2005 13:54:09 -0000 1.12 --- packages.js 23 Jan 2006 03:35:31 -0000 1.13 *************** *** 116,123 **** l.add('thyapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); l.add('thyapi.thywidgets.thyFormDialog', 'thyformdialog.js', ['thyDialogWindow','thyDataSource']); ! l.add('thyapi.thywidgets.thyGridCell', 'thygridcell.js', ['thyPanel','thyEditBox', 'thyCollection']); ! l.add('thyapi.thywidgets.thyGridRow', 'thygridrow.js', ['thyGridCell', 'thyVisualCollection']) ! l.add('thyapi.thywidgets.thyGridContents', 'thygridcontents.js', ['thyPanel']); ! l.add('thyapi.thywidgets.thyGrid', 'thygrid.js', ['thyGridContents','thyLabelPanel','thyGridCell','thyGridRow','thyVisualCollection']); l.add('thyapi.thywidgets.thyListBox', 'thylistbox.js', ['thyGrid']); l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox.js', ['thyListBox','thyEditBox','thyButton']); --- 116,135 ---- l.add('thyapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); l.add('thyapi.thywidgets.thyFormDialog', 'thyformdialog.js', ['thyDialogWindow','thyDataSource']); ! ! if (dynapi.ua.ie) ! { ! l.add('thyapi.thywidgets.thyGridCell', 'thygridcell_ie.js', ['thyPanel','thyEditBox', 'thyCollection']); ! l.add('thyapi.thywidgets.thyGridRow', 'thygridrow_ie.js', ['thyGridCell', 'thyVisualCollection']) ! l.add('thyapi.thywidgets.thyGridContents', 'thygridcontents_ie.js', ['thyPanel']); ! l.add('thyapi.thywidgets.thyGrid', 'thygrid_ie.js', ['thyGridContents','thyLabelPanel','thyGridCell','thyGridRow','thyVisualCollection']); ! } ! else ! { ! l.add('thyapi.thywidgets.thyGridCell', 'thygridcell.js', ['thyPanel','thyEditBox', 'thyCollection']); ! l.add('thyapi.thywidgets.thyGridRow', 'thygridrow.js', ['thyGridCell', 'thyVisualCollection']) ! l.add('thyapi.thywidgets.thyGridContents', 'thygridcontents.js', ['thyPanel']); ! l.add('thyapi.thywidgets.thyGrid', 'thygrid.js', ['thyGridContents','thyLabelPanel','thyGridCell','thyGridRow','thyVisualCollection']); ! } ! l.add('thyapi.thywidgets.thyListBox', 'thylistbox.js', ['thyGrid']); l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox.js', ['thyListBox','thyEditBox','thyButton']); |
From: Thyamad c. <th...@us...> - 2006-01-23 03:35:38
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31976 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2700 to 2701... Changes made by vinicius on 2006-01-23 05:39:18 +0100 (Mon, 23 Jan 2006) corresponding to SVN revision 2701 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** .sync_svn2cvs 23 Jan 2006 03:34:49 -0000 1.59 --- .sync_svn2cvs 23 Jan 2006 03:35:30 -0000 1.60 *************** *** 1,6 **** ! 2701 ! a:2:{s:5:"added";a:4:{i:0;s:24:"thywidgets/thygrid_ie.js";i:1;s:27:"thywidgets/thygridrow_ie.js";i:2;s:28:"thywidgets/thygridcell_ie.js";i:3;s:32:"thywidgets/thygridcontents_ie.js";}s:8:"messages";s:125:"Changes made by vinicius on 2006-01-23 05:39:18 +0100 (Mon, 23 Jan 2006) corresponding to SVN revision 2701 with message: ! ! ! ! ";} \ No newline at end of file --- 1 ---- ! 2701 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-23 03:34:59
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31689/thywidgets Removed Files: thygrid-ie.js thygridcell-ie.js thygridcontents-ie.js thygridrow-ie.js Log Message: Commiting file removals... --- thygrid-ie.js DELETED --- --- thygridrow-ie.js DELETED --- --- thygridcell-ie.js DELETED --- --- thygridcontents-ie.js DELETED --- |
From: Thyamad c. <th...@us...> - 2006-01-23 03:34:58
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31689 Modified Files: .sync_svn2cvs Log Message: Commiting file removals... Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** .sync_svn2cvs 21 Jan 2006 16:39:52 -0000 1.58 --- .sync_svn2cvs 23 Jan 2006 03:34:49 -0000 1.59 *************** *** 1 **** ! 2686 \ No newline at end of file --- 1,6 ---- ! 2701 ! a:2:{s:5:"added";a:4:{i:0;s:24:"thywidgets/thygrid_ie.js";i:1;s:27:"thywidgets/thygridrow_ie.js";i:2;s:28:"thywidgets/thygridcell_ie.js";i:3;s:32:"thywidgets/thygridcontents_ie.js";}s:8:"messages";s:125:"Changes made by vinicius on 2006-01-23 05:39:18 +0100 (Mon, 23 Jan 2006) corresponding to SVN revision 2701 with message: ! ! ! ! ";} \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-21 16:40:05
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2685 to 2686... Changes made by vinicius on 2006-01-21 18:44:00 +0100 (Sat, 21 Jan 2006) corresponding to SVN revision 2686 with message: Included Internet Explorer optimized files Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** .sync_svn2cvs 20 Jan 2006 01:37:38 -0000 1.57 --- .sync_svn2cvs 21 Jan 2006 16:39:52 -0000 1.58 *************** *** 1 **** ! 2661 \ No newline at end of file --- 1 ---- ! 2686 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-21 16:40:05
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/thywidgets Added Files: thygrid-ie.js thygridcell-ie.js thygridcontents-ie.js thygridrow-ie.js Log Message: Commiting file additions and modification from SVN revision 2685 to 2686... Changes made by vinicius on 2006-01-21 18:44:00 +0100 (Sat, 21 Jan 2006) corresponding to SVN revision 2686 with message: Included Internet Explorer optimized files --- NEW FILE: thygrid-ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Element, with optimizations * * to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** [...965 lines suppressed...] * */ p._sweepOutContents = function () { var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; for (i=0; i<nRows; i++) { data.rows[i] = this.getRow(i).getIndexedElements(); } data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); return data; } /****************************************************************************\ * Events * \****************************************************************************/ --- NEW FILE: thygridrow-ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Row Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridRow * * This is the Grid Row class. It is just a <thyPanel> with a * <thyVisualCollection> of <thyGridCell> elements. * * CSS Classes: * * - .thyGridRow * * - .<object name> * * See Also: * * - <thyGrid> * * - <thyPanel> * */ function thyGridRow(name, index) { this.thyPanel = thyPanel; this.thyPanel(name); // Attributes \\ this.cells = new thyVisualCollection(this.name+'_cells', this); this.selected = false; this.selCellSelRow = false; this.cellCSSClasses = new thyCollection(); this.cellIndexedCSSClasses = new thyCollection(); this.rowIndex = index || 0; this.setRelativeness(false); this.cells.setDefaultName('Cell'+index); this.insertCell(this.rowIndex == -1 ? '' : this.rowIndex, -1, 'h'); this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); } p = dynapi.setPrototype('thyGridRow', 'thyPanel'); /** * Method: initThyGridRow * * Initialization Method. Inserts the Row header Cell * */ p.initThyGridRow = function () { } /** * Method: addCellCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p.addCellCSSClass = function (cssClass) { this._addCellCSSClass(cssClass); this._updateAllClasses(); } /** * Method: addCellIndexedCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p.addCellIndexedCSSClass = function (cssClass) { this._addCellIndexedCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeCellCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p.removeCellCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeCellIndexedCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p.removeCellIndexedCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); this._updateAllClasses(); } /** * Method: removeAllCellClasses * * Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses * */ p.removeAllCellClasses = function () { this._removeAllClasses(); this._removeAllCellClasses(); this._updateAllClasses(); } /** * Method: setIndex * * Sets the Index of this Row * * Parameter: * * index - The new Row index * */ p.setIndex = function (index) { if (index == null || this.rowIndex == index) return; this.rowIndex = index; this.cells.setDefaultName('Cell'+index); this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); } /** * Method: getIndex * * Returns the index of this Row * */ p.getIndex = function () { return this.rowIndex; } /** * Method: insertCell * * Inserts a Cell into the specified column * * Parameters: * * content - The cell content * column - The column index * type - The cell type (n - normal, h - header) * */ p.insertCell = function (content, column, type) { var col; if (content == null) content = ''; if (column == null || typeof(column) != 'number') col = this.cells.getElementsCount()-1; else col = column; var cell = this._createCell(col, type); cell.populate(content); this.cells.add(cell, cell.name); this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); return col+1; } /** * Method: getCell * * Returns the contents of the Cell that resides on the specified * column * * Parameter: * * column - The column index * */ p.getCell = function (column) { if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); return cell ? cell.sweepOut() : ''; } /** * Method: getCellElement * * Returns the <thyGridCell> element that resides on the specified position * * If what you want is just the cell contents, please use <thyGridRow>::getCell * * This method should *ONLY* be used if developer wants to manipulate cell * properties! Be warned that messing with wrong property may break encapsulation * and thus produce undesired effects on <thyGridRow> * * Parameter: * * column - The column index * */ p.getCellElement = function (column) { if (column == null || typeof(column) != 'number') return; var col = column+1; return this.cells.getElementByIndex(col); } /** * Method: getSelectedCells * * Returns a <thyCollection> with the contents of the Selected Cells * */ p.getSelectedCells = function () { var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); for (i=1; i<nCells; i++) { cell = this.cells.getElementByIndex(i); if (cell.isSelected()) cells.add(cell.sweepOut()); } return cells; } /** * Method: getCellsCount * * Returns the number of cells this row has * */ p.getCellsCount = function () { return this.cells.getElementsCount()-1; } /** * Method: removeCell * * Removes the Cell on the specified column * * Parameter: * * column - The column index * * Returns: * * The Cell contents * */ p.removeCell = function (column) { if (column == null || typeof(column) != 'number') column = 0; column++; var cell = this.cells.getElementByIndex(column); this.cells.remove(cell, cell.name, column); this._updateNames(); this._updateAllClasses(); return cell.sweepOut(); } /** * Method: moveCell * * Changes the position of a Cell to a new place * * Parameters: * * orig - The original column * dest - The destination column * */ p.moveCell = function (orig, dest) { if (orig == null || typeof(orig) != 'number' || dest == null || typeof(dest) != 'number') throw({result: 'Invalid Indexes', location: 'thyGridRow.moveCell'}); orig++; dest++; var cell = this.cells.getElementByIndex(orig); if (!cell) return; var nClasses = this.cellIndexedCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell.removeCSSClass(this.cellIndexedCSSClasses.getElementByIndex(i)+orig); } if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); this._updateAllClasses(); } /** * Method: isSelected * * Used to check if the cell is selected or not * * Returns: * * Boolean - True if selected, False if not selected * */ p.isSelected = function () { return this.selected; } /** * Method: selectOnly * * Selects the whole row, BUT DO NOT CALL event 'onselectrow' * */ p.selectOnly = function () { if (this.isSelected()) { return; } this.selected = true; var i,cell,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); cell.setSelected(true); } } /** * Method: select * * Selects the whole Row, that means, all Cells and calls * event handler 'onselectrow' and 'onselectrow<n>' where <n> * is the row index. * */ p.select = function () { if (this.isSelected()) { return; } this.selectOnly(); if (this.parent) { var eventName = this.getIndex() == -1 ? 'selectheaderrow' : 'selectrow'; this.parent.invokeEvent(eventName, new DynEvent(eventName, this)); this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } } /** * Method: unselectOnly * * Unselects the whole row, BUT DO NOT CALL event 'onunselectrow' * */ p.unselectOnly = function () { if (!this.isSelected()) { return; } this.selected = false; var i,cell,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); cell.setSelected(false); } } /** * Method: unselect * * Unselectes the whole Row, that means, all Cells and calls * event handler 'onselectrow' and 'onselectrow<n>' where <n> * is the row index. * */ p.unselect = function () { if (!this.isSelected()) { return; } this.unselectOnly(); if (this.parent) { var eventName = this.getIndex() == -1 ? 'unselectheaderrow' : 'unselectrow'; this.parent.invokeEvent(eventName, new DynEvent(eventName, this)); this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } } /** * Method: switchSelectedState * * Changes the selected state to its oposit state * */ p.switchSelectedState = function () { this.selected ? this.unselect() : this.select(); } /** * Method: setSelectCellSelectRow * * Selects all cells if any cell is selected * * */ p.setSelectCellSelectRow = function () { this.selCellSelRow = true; } /** * Method: unsetSelectCellSelectRow * * Selects all cells only if clicking on row header * */ p.unsetSelectCellSelectRow = function () { this.selCellSelRow = false; } /** * Method: getOuterHTML * * Overwritten method that draws TR element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', ((this.x!=null)? ' left: '+((typeof(this.x)=='string')?this.x+';':this.x+'px;') : ''), ((this.y!=null)? ' top: '+((typeof(this.y)=='string')?this.y+';':this.y+'px;') : ''), ((this.w)? ' width:'+((typeof(this.w)=='string')?this.w+';':(this.w+fixBw)+'px;'):''), ((this.h)? ' height:'+((typeof(this.h)=='string')?this.h+';':(this.h+fixBh)+'px;'):''), ((this.z)? ' z-index: '+this.z+';':''), ((this._cursor!=null)? ' cursor:'+this._cursor+';':''), ((this.visible==false)? ' visibility:hidden;': ''), ((this.display) ? ' display: '+this.display+';' : ''), this._cssBorder, ((this._overflow)? this._cssOverflow : ''), ((this.x != null || this.y != null) ? this._cssPosition+';' : ''), (this._float ? this._cssFloat : ''), '">', this.getInnerHTML(), '</tr>' ].join(''); //alert(html); return html; } /*************************************************************************\ * Group: Private Methods * \*************************************************************************/ /** * Method: _create * * Overloaded method that creates the TR element and inserts it into parent * */ p._create = function () { if (this.parent && !this.elm) { var elm, parentElm; // Parent MUST be thyGridContents \\ if (typeof(this.parent.isFromClass) != 'function' || !this.parent.isFromClass('thyGridContents')) { throw({result: 'thyGridRow MUST be child of thyGridContents', location: 'thyGridRow._create'}); } elm = this._createDOMElement(); this.elm = elm; this.doc = this.parent.doc; this._created = true; for (var i=0; i<this.children.length; i++) this.children[i]._createDOMElement(); DynLayer._assignElement(this,elm); DynElement._flagCreate(this); } } p._createDOMElement = function () { if (this.parent && !this.elm) { var elm, parentElm; parentElm = this.parent._getDOMChildrenHolder(); elm = this.parent.doc.createElement('tr'); elm._className = this._cssClass; elm.id = this.id; var css = elm.style; if (this.w) css.width = this.w; if (this.h) css.height = this.h; if (this.bgColor != null) css.backgroundColor = this.bgColor; if (this.z) css.zIndex = this.z; if (this._cursor != null) css.cursor = this._cursor; if (this._overflow) css.overflow = this._overflow; css.visibility=(this.visible==false)? 'hidden':''; if(this.display) css.display = this.display; if(this.disabled) elm.disabled = true; parentElm.appendChild(elm); return elm; } } /** * Method: _addCellCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p._addCellCSSClass = function (cssClass) { this.cellCSSClasses.add(cssClass, cssClass); } /** * Method: _addCellIndexedCSSClass * * Append a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p._addCellIndexedCSSClass = function (cssClass) { this.cellIndexedCSSClasses.add(cssClass, cssClass); } /** * Method: _removeCellCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow> * * Parameter: * * cssClass - The CSS class * */ p._removeCellCSSClass = function (cssClass) { this.cellCSSClasses.remove(cssClass, cssClass); } /** * Method: _removeCellIndexedCSSClass * * Remove a CSS class to the list of classes that will be added to * all Cells created/manipulated by <thyGridRow>. This classes will * be appended with the Cell column index * * Parameter: * * cssClass - The CSS class * */ p._removeCellIndexedCSSClass = function (cssClass) { this.cellIndexedCSSClasses.remove(cssClass, cssClass); } /** * Method: removeAllCellClasses * * Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses * */ p._removeAllCellClasses = function () { this.cellCSSClasses.cleanUp(); this.cellIndexedCSSClasses.cleanUp(); } /** * Method: _createCell * * Creates a Cell and sets all CSS Classes that has been passed to * <thyGridRow> * * Parameters: * * colIndex - The column index of this cell * type - The Cell type. Can be 'n' for normal or 'h' for header * */ p._createCell = function (colIndex, type) { if (!type) type = 'n'; var cell = new thyGridCell('Cell'+this.rowIndex+colIndex); cell.setType(type); var self = this; if (type == 'n') { cell.addEventListener({ onclick: function(e) { if (self.selCellSelRow) self.switchSelectedState(); }}); } else { cell.addEventListener({ onclick: function(e) { self.switchSelectedState(); }}); } return cell; } /** * Method: _updateNames * * Updates the names of all Cells to reflect their real positions and * also updates all CSS indexed classes * */ p._updateNames = function () { var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cellPos = ''+this.rowIndex+(i-1); cell = this.cells.getElementByIndex(i); this.cells.changeElementName({elm: cell, name: 'Cell'+cellPos, index: i}); cell.setName('Cell'+cellPos); } } /** * Method: _updateClasses * * Updates the classes of the specified cell * * Parameter: * * cell - The specific cell * cellIdx - The index of the cell */ p._updateClasses = function (cell, cellIdx) { var i,nClasses = this.cellCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell._addCSSClass(this.cellCSSClasses.getElementByIndex(i)); } nClasses = this.cellIndexedCSSClasses.getElementsCount(); for (i=0; i<nClasses; i++) { cell._addCSSClass(this.cellIndexedCSSClasses.getElementByIndex(i)+(cellIdx-1)); } cell.setCSSClass(cell.cssActualSelection); } /** * Method: _updateAllClasses * * Updates the classes of every cell * */ p._updateAllClasses = function () { var i,cell,nClasses,nCells = this.cells.getElementsCount(); for (i=0; i<nCells; i++) { cell = this.cells.getElementByIndex(i); this._updateClasses(cell,i); } } /** * Method: _removeAllClasses * * Removes the classes of every cell * */ p._removeAllClasses = function () { } --- NEW FILE: thygridcell-ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Cell Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridCell * * This is the basic Cell element. It should provides all functionalities * that a Table Cell element should have. * * CSS Classes: * * - .thyGridCell_edit - when in simple edit mode * - .thyGridCell_editFull - when in full edit mode * - .thyGridCell_selected - when selected * - .thyGridCell_header - when type is header * - .thyGridCell_header_selected - when type is header and it is selected * * - .<object name>_edit - when in simple edit mode * - .<object name>_editFull - when in full edit mode * - .<object name>_selected - when selected * - .<object name>_header - when type is header * - .<object name>_header_selected - when type is header and it is selected * * Package: ThyAPI * * Namespace: ThyWidgets * * See Also: * - <thyGrid> * - <thyPanel> * */ function thyGridCell(name, html) { this.thyPanel = thyPanel; this.thyPanel(name,null); // Atributes this.cellMode = 0; this.cellType = 0; this.cellSelected = false; this.setRelativeness(false); this.cssClasses = { 'default': ['default'], selected : ['default', 'selected'], header : ['header'], header_selected : ['header', 'header_selected'] }; this.addCSSClass('thyGridCell'); var self = this; this.addEventListener({ onclick: function(e){ if (e.getOrigin() == self.cellContents) self._selectEvent() }}); } p = dynapi.setPrototype('thyGridCell', 'thyPanel'); /** * Method: populate * * Sets the contents of the cell. * * Parameter: * * data - The contents of the Cell, that can be: * * - A non-object data (will be included as HTML to the contents of the cell) * - A <thyPanel> or derivate class object that will be added as child. * - A <thyCollection> of <thyPanel> or derivate classe objects, that will * be added sequentially as children. * */ p.populate = function (data) { if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') { if(data.isFromClass('thyPanel')) { this._destroyAllChildren(); this.addChild(data); } else if (data.isFromClass('thyCollection')) { try { this._destroyAllChildren(); var i,nData = data.getElementsCount(); for (i=0; i<nData; i++) { this.addChild(data.getElementById(i)); } } catch(e) { return; } } } else { try { this.setHTML(data); } catch(e) { return; } } } /** * Method: sweepOut * * Gets the contents of the cell. * * If the contents of the cell is simply HTML, it is returned, otherwise * in case the cell has children, their sweepOut() returned values are * grouped in a <thyCollection> and returned. * */ p.sweepOut = function () { if (!this.children.length) return this.getHTML(); try { var i,contents = new thyCollection(); for (i=0; i<this.children.length; i++) { contents.add(this.children[i].sweepOut(), this.children[i].name); } return contents; } catch(e) { return; } } p._thyPanelAddChild = p.addChild; /** * Method: addChild * * Adds a widget inside the cell * */ p.addChild = function (child) { if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); } p._thyPanelSetHTML = p.setHTML; /** * Method: setHTML * * Overloaded method that sets HTML of Contents, never putting empty HTML * inside box (otherwise it would not be visible). * * Parameter: * * html - The HTML code to be inserted * */ p.setHTML = function (html) { var rSpace = new RegExp(' ', 'g'); if (!html && typeof(html) != 'number') html = ' '; else if (typeof(html) == 'string') html = html.replace(rSpace, ' '); this._thyPanelSetHTML(html); } p._thyPanelGetHTML = p.getHTML; /** * Method: getHTML * * Overloaded method that returns the HTML of Contents and not the HTML * of cell. Besides that, it garantees that the return is not ' ', which * is set as HTML when setHTML receives a null parameter. * */ p.getHTML = function () { var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); if (html == ' ' || html == ' ') { return ''; } if (typeof(html) == 'string') { return html.replace(rSpace, ' '); } if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { return html.sweepOut(); } return html; } /** * Method: setMode * * Sets the onclick exchange mode of the grid. This can be: * * - r (Read Only) * - rws (Simple Read/Write) * - rwf (Full Read/Write) * * Parameters: * * mode - The mode * * - *Note* - The only supported mode now is Read Only * */ p.setMode = function(mode) { if (this.cellType == 1) return; if (this.readOnly) return; switch (mode) { case 'r' : mode = 0; break; case 'rws': mode = 1; break; case 'rwf': mode = 2; break; default: return; } this.cellMode = mode; this._processMode(); } /** * Method: setType * * Change this object type to one of: * * - Normal * - Header * * Parameters: * * type - The type. 'n' for Normal, 'h' for header * */ p.setType = function(type) { switch (type) { case 'n': type = 0; break; case 'h': type = 1; break; default : return; } this.cellType = type; this._processType(); } /** * Method: setSelected * * Sets the selected state of this Cell * * Parameters: * * state - true/false * */ p.setSelected = function(state) { state = (state) ? true : false; if (this.cellSelected == state) return; this.cellSelected = state; this._processType(); } /** * Method: switchSelectedState * * Switches the actual selected state, turning the cell into selected if it is * not and vice-versa * */ p.switchSelectedState = function() { this.setSelected(!this.cellSelected); } /** * Method: isSelected * * Returns the selected state of this Cell * * Returns: * * Boolean */ p.isSelected = function() { return this.cellSelected; } /** * Method: getOuterHTML * * Overwritten method that draws TD element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<td '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', ((this.x!=null)? ' left: '+((typeof(this.x)=='string')?this.x+';':this.x+'px;') : ''), ((this.y!=null)? ' top: '+((typeof(this.y)=='string')?this.y+';':this.y+'px;') : ''), ((this.w)? ' width:'+((typeof(this.w)=='string')?this.w+';':(this.w+fixBw)+'px;'):''), ((this.h)? ' height:'+((typeof(this.h)=='string')?this.h+';':(this.h+fixBh)+'px;'):''), ((this.z)? ' z-index: '+this.z+';':''), ((this._cursor!=null)? ' cursor:'+this._cursor+';':''), ((this.visible==false)? ' visibility:hidden;': ''), ((this.display) ? ' display: '+this.display+';' : ''), this._cssBorder, ((this._overflow)? this._cssOverflow : ''), ((this.x != null || this.y != null) ? this._cssPosition+';' : ''), (this._float ? this._cssFloat : ''), '">', this.getInnerHTML(), '</td>' ].join(''); //alert(html); return html; } /*************************************************************************\ * Private Methods * \*************************************************************************/ p._create = function () { if (this.parent && !this.elm) { var elm = this._createDOMElement(); DynLayer._assignElement(this,elm); DynElement._flagCreate(this); } } // FIXME: this should be on browser specific methods! p._createDOMElement = function () { if (this.parent) { var elm, parentElm; parentElm = this.parent.elm; if (!this.elm) { elm = this.parent.doc.createElement('td'); elm._className = this._cssClass; elm.id = this.id; var css = elm.style; if (this.w) css.width = this.w; if (this.h) css.height = this.h; if (this.bgColor != null) css.backgroundColor = this.bgColor; if (this.z) css.zIndex = this.z; if (this._cursor != null) css.cursor = this._cursor; if (this._overflow) css.overflow = this._overflow; css.visibility=(this.visible==false)? 'hidden':''; if(this.display) css.display = this.display; if(this.disabled) elm.disabled = true; elm.innerHTML = this.getInnerHTML(); } else { elm = this.elm; } parentElm.appendChild(elm); return elm; } } /** * Method: _processMode * * Process the modifications needed to achieve the selected mode. * */ p._processMode = function() { switch (this.cellMode) { case 0: this.setHTML(this.cellEditBox.sweepOut()); return; case 1: this.cellEditBox.populate(this.getHTML()); this.cellEditBox.setDisplay(true); this.cellEditBox.focus(); } return; } /** * Method: _processType * * Process the modifications needed to achieve the type mode. */ p._processType = function() { switch (this.cellType) { case 0: this.setCSSClass(this.cellSelected ? 'selected' : 'default'); return; case 1: this.setCSSClass(this.cellSelected ? 'header_selected' : 'header'); return; } } /** * Method: _selectEvent * * Method that handles onclick events * */ p._selectEvent = function() { this.setSelected(!this.cellSelected); } --- NEW FILE: thygridcontents-ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Table Grid Contents Element, with * * optimizations to Internet Explorer - http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - The Thyamad Crew * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * \***************************************************************************/ /** * Class: thyGridContents * * This is the Grid Contents class. It is a <thyPanel> that creates a TABLE * element and overload some of it methods to guarantee that the TABLE will * be constructed correctly * * CSS Classes: * * - .thyGridContents * * - .<object name> * * See Also: * * - <thyGrid> * * - <thyPanel> * */ function thyGridContents(name) { this.thyPanel = thyPanel; this.thyPanel(name); } p = dynapi.setPrototype('thyGridContents','thyPanel'); /** * Method: getOuterHTML * * Overwritten method that draws TABLE element instead of DIV * */ p.getOuterHTML = function () { var html = [ '<table id="'+this.id+'"', (this.disabled ? 'disabled' : ''), (this.readOnly?'readonly':''), 'cellpadding="0"', 'cellspacing="0"', 'border="0"', 'width="100%"', 'style="', 'width:100%;', '"><tbody>', this.getInnerHTML(), //(this.contentRelative ? '</div></div>' : '</div>') '</tbody></table>' ].join(''); //alert(html); return html; } /** * Method: invokeEvent * * Overloaded method that calls the invokeEvent of <thyGrid> instead * of this. * */ p.invokeEvent = function (eventName, eventObj) { if (!this.parent || !this.parent.parent) return; this.parent.parent.invokeEvent(eventName, eventObj); } |
From: Thyamad c. <th...@us...> - 2006-01-20 01:37:49
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21903 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2660 to 2661... Changes made by vinicius on 2006-01-20 03:41:34 +0100 (Fri, 20 Jan 2006) corresponding to SVN revision 2661 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** .sync_svn2cvs 20 Jan 2006 01:26:12 -0000 1.56 --- .sync_svn2cvs 20 Jan 2006 01:37:38 -0000 1.57 *************** *** 1 **** ! 2660 \ No newline at end of file --- 1 ---- ! 2661 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-20 01:37:49
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21903/thywidgets Modified Files: thydropdownbox.js Log Message: Commiting file additions and modification from SVN revision 2660 to 2661... Changes made by vinicius on 2006-01-20 03:41:34 +0100 (Fri, 20 Jan 2006) corresponding to SVN revision 2661 with message: Index: thydropdownbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thydropdownbox.js 19 Jan 2006 12:01:14 -0000 1.4 --- thydropdownbox.js 20 Jan 2006 01:37:39 -0000 1.5 *************** *** 705,709 **** return function(e) { ! if (dynapi.document._opennedDropDownBoxes[self.name]) { self._hideListBox(); --- 705,709 ---- return function(e) { ! if (dynapi.document._opennedDropDownBoxes && dynapi.document._opennedDropDownBoxes[self.name]) { self._hideListBox(); |
From: Thyamad c. <th...@us...> - 2006-01-20 01:26:22
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18131/thywidgets Modified Files: thygrid.js thygridcell.js thygridcontents.js thygridrow.js Log Message: Commiting file additions and modification from SVN revision 2659 to 2660... Changes made by vinicius on 2006-01-20 03:29:57 +0100 (Fri, 20 Jan 2006) corresponding to SVN revision 2660 with message: Restored CSS modifications. Now will do these modifications and tests in thyapi-profile under branches/vinicius Index: thygridcell.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridcell.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thygridcell.js 17 Jan 2006 23:21:33 -0000 1.7 --- thygridcell.js 20 Jan 2006 01:26:12 -0000 1.8 *************** *** 48,52 **** function thyGridCell(name, html) { - //startTracing('thyGridCell','thyGridCell'); this.thyPanel = thyPanel; this.thyPanel(name,null); --- 48,51 ---- *************** *** 58,62 **** this.setRelativeness(false); ! /* this.cssClasses = { 'default': ['default'], --- 57,61 ---- this.setRelativeness(false); ! this.cssClasses = { 'default': ['default'], *************** *** 66,70 **** }; this.addCSSClass('thyGridCell'); - */ var self = this; --- 65,68 ---- *************** *** 73,77 **** self._selectEvent() }}); - //endTracing('thyGridCell','thyGridCell'); } --- 71,74 ---- *************** *** 95,99 **** p.populate = function (data) { - //startTracing('thyGridCell','populate'); if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') --- 92,95 ---- *************** *** 118,122 **** catch(e) { - //endTracing('thyGridCell','populate'); return; } --- 114,117 ---- *************** *** 131,139 **** catch(e) { - //endTracing('thyGridCell','populate'); return; } } - //endTracing('thyGridCell','populate'); } --- 126,132 ---- *************** *** 150,154 **** p.sweepOut = function () { - //startTracing('thyGridCell','sweepOut'); if (!this.children.length) return this.getHTML(); try --- 143,146 ---- *************** *** 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'); } --- 151,160 ---- *************** *** 179,186 **** p.addChild = function (child) { - //startTracing('thyGridCell','addChild'); if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); - //endTracing('thyGridCell','addChild'); } --- 168,173 ---- *************** *** 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'); } --- 186,193 ---- *************** *** 218,222 **** p.getHTML = function () { - //startTracing('thyGridCell','getHTML'); var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); --- 203,206 ---- *************** *** 224,228 **** if (html == ' ' || html == ' ') { - //endTracing('thyGridCell','getHTML'); return ''; } --- 208,211 ---- *************** *** 230,234 **** if (typeof(html) == 'string') { - //endTracing('thyGridCell','getHTML'); return html.replace(rSpace, ' '); } --- 213,216 ---- *************** *** 236,244 **** if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { - //endTracing('thyGridCell','getHTML'); return html.sweepOut(); } - //endTracing('thyGridCell','getHTML'); return html; } --- 218,224 ---- *************** *** 383,387 **** p._create = function () { - //startTracing('thyGridCell','_create'); if (this.parent && !this.elm) { --- 363,366 ---- *************** *** 390,394 **** DynElement._flagCreate(this); } - //endTracing('thyGridCell','_create'); } --- 369,372 ---- *************** *** 396,400 **** p._createDOMElement = function () { - //startTracing('thyGridCell','_createDOMElement'); if (this.parent) { --- 374,377 ---- *************** *** 427,431 **** parentElm.appendChild(elm); - //endTracing('thyGridCell','_createDOMElement'); return elm; } --- 404,407 ---- *************** *** 440,444 **** p._processMode = function() { - //startTracing('thyGridCell','_processMode'); switch (this.cellMode) { --- 416,419 ---- *************** *** 452,456 **** this.cellEditBox.focus(); } - //endTracing('thyGridCell','_processMode'); return; --- 427,430 ---- *************** *** 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'); } --- 438,451 ---- Index: thygridcontents.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridcontents.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thygridcontents.js 17 Jan 2006 23:21:33 -0000 1.4 --- thygridcontents.js 20 Jan 2006 01:26:12 -0000 1.5 *************** *** 39,46 **** function thyGridContents(name) { - //startTracing('thyGridContents','thyGridContents'); this.thyPanel = thyPanel; this.thyPanel(name); - //endTracing('thyGridContents','thyGridContents'); } --- 39,44 ---- *************** *** 55,59 **** p.getOuterHTML = function () { - //startTracing('thyGridContents','getOuterHTML'); var html = [ '<table id="'+this.id+'"', --- 53,56 ---- *************** *** 72,76 **** ].join(''); //alert(html); - //endTracing('thyGridContents','getOuterHTML'); return html; } --- 69,72 ---- Index: thygridrow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridrow.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thygridrow.js 17 Jan 2006 23:21:33 -0000 1.4 --- thygridrow.js 20 Jan 2006 01:26:12 -0000 1.5 *************** *** 38,42 **** function thyGridRow(name, index) { - //startTracing('thyGridRow','thyGridRow'); this.thyPanel = thyPanel; this.thyPanel(name); --- 38,41 ---- *************** *** 57,61 **** this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); - //endTracing('thyGridRow','thyGridRow'); } --- 56,59 ---- *************** *** 85,92 **** p.addCellCSSClass = function (cssClass) { - //startTracing('thyGridRow','addCellCSSClass'); this._addCellCSSClass(cssClass); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','addCellCSSClass'); } --- 83,88 ---- p.addCellCSSClass = function (cssClass) { this._addCellCSSClass(cssClass); ! this._updateAllClasses(); } *************** *** 105,112 **** p.addCellIndexedCSSClass = function (cssClass) { - //startTracing('thyGridRow','addCellIndexedCSSClass'); this._addCellIndexedCSSClass(cssClass); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','addCellIndexedCSSClass'); } --- 101,106 ---- p.addCellIndexedCSSClass = function (cssClass) { this._addCellIndexedCSSClass(cssClass); ! this._updateAllClasses(); } *************** *** 124,132 **** p.removeCellCSSClass = function (cssClass) { - //startTracing('thyGridRow','removeCellCSSClass'); this._removeAllClasses(); this._removeCellCSSClass(cssClass); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','removeCellCSSClass'); } --- 118,124 ---- p.removeCellCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellCSSClass(cssClass); ! this._updateAllClasses(); } *************** *** 145,153 **** p.removeCellIndexedCSSClass = function (cssClass) { - //startTracing('thyGridRow','removeCellIndexedCSSClass'); this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','removeCellIndexedCSSClass'); } --- 137,143 ---- p.removeCellIndexedCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); ! this._updateAllClasses(); } *************** *** 160,168 **** p.removeAllCellClasses = function () { - //startTracing('thyGridRow','removeAllCellClasses'); this._removeAllClasses(); this._removeAllCellClasses(); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','removeAllCellClasses'); } --- 150,156 ---- p.removeAllCellClasses = function () { this._removeAllClasses(); this._removeAllCellClasses(); ! this._updateAllClasses(); } *************** *** 180,184 **** p.setIndex = function (index) { - //startTracing('thyGridRow','setIndex'); if (index == null || this.rowIndex == index) return; this.rowIndex = index; --- 168,171 ---- *************** *** 186,190 **** this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); - //endTracing('thyGridRow','setIndex'); } --- 173,176 ---- *************** *** 214,218 **** p.insertCell = function (content, column, type) { - //startTracing('thyGridRow','insertCell'); var col; if (content == null) content = ''; --- 200,203 ---- *************** *** 223,231 **** cell.populate(content); this.cells.add(cell, cell.name); ! //this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); - //endTracing('thyGridRow','insertCell'); return col+1; } --- 208,215 ---- cell.populate(content); this.cells.add(cell, cell.name); ! this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); 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() : ''; } --- 228,235 ---- *************** *** 285,289 **** p.getSelectedCells = function () { - //startTracing('thyGridRow','getSelectedCells'); var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); --- 267,270 ---- *************** *** 295,299 **** } - //endTracing('thyGridRow','getSelectedCells'); return cells; } --- 276,279 ---- *************** *** 326,330 **** p.removeCell = function (column) { - //startTracing('thyGridRow','removeCell'); if (column == null || typeof(column) != 'number') column = 0; column++; --- 306,309 ---- *************** *** 333,339 **** this.cells.remove(cell, cell.name, column); this._updateNames(); ! //this._updateAllClasses(); - //endTracing('thyGridRow','removeCell'); return cell.sweepOut(); } --- 312,317 ---- this.cells.remove(cell, cell.name, column); this._updateNames(); ! this._updateAllClasses(); 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'}); --- 330,333 ---- *************** *** 369,374 **** if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); ! //this._updateAllClasses(); ! //endTracing('thyGridRow','moveCell'); } --- 346,350 ---- if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); ! this._updateAllClasses(); } *************** *** 396,403 **** p.selectOnly = function () { - //startTracing('thyGridRow','selectOnly'); if (this.isSelected()) { - //endTracing('thyGridRow','selectOnly'); return; } --- 372,377 ---- *************** *** 411,415 **** cell.setSelected(true); } - //endTracing('thyGridRow','selectOnly'); } --- 385,388 ---- *************** *** 424,431 **** p.select = function () { - //startTracing('thyGridRow','select'); if (this.isSelected()) { - //endTracing('thyGridRow','select'); return; } --- 397,402 ---- *************** *** 439,443 **** this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } - //endTracing('thyGridRow','select'); } --- 410,413 ---- *************** *** 450,457 **** p.unselectOnly = function () { - //startTracing('thyGridRow','unselectOnly'); if (!this.isSelected()) { - //endTracing('thyGridRow','unselectOnly'); return; } --- 420,425 ---- *************** *** 465,469 **** cell.setSelected(false); } - //endTracing('thyGridRow','unselectOnly'); } --- 433,436 ---- *************** *** 478,485 **** p.unselect = function () { - //startTracing('thyGridRow','unselect'); if (!this.isSelected()) { - //endTracing('thyGridRow','unselect'); return; } --- 445,450 ---- *************** *** 493,497 **** this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } - //endTracing('thyGridRow','unselect'); } --- 458,461 ---- *************** *** 538,542 **** p.getOuterHTML = function () { - //startTracing('thyGridRow','getOuterHTML'); var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', --- 502,505 ---- *************** *** 558,562 **** ].join(''); //alert(html); - //endTracing('thyGridRow','getOuterHTML'); return html; } --- 521,524 ---- *************** *** 574,578 **** p._create = function () { - //startTracing('thyGridRow','_create'); if (this.parent && !this.elm) { --- 536,539 ---- *************** *** 595,604 **** DynElement._flagCreate(this); } - //endTracing('thyGridRow','_create'); } p._createDOMElement = function () { - //startTracing('thyGridRow','_createDOMElement'); if (this.parent && !this.elm) { --- 556,563 ---- *************** *** 622,629 **** parentElm.appendChild(elm); - //endTracing('thyGridRow','_createDOMElement'); return elm; } - //endTracing('thyGridRow','_createDOMElement'); } --- 581,586 ---- *************** *** 720,724 **** p._createCell = function (colIndex, type) { - //startTracing('thyGridRow','_createCell'); if (!type) type = 'n'; --- 677,680 ---- *************** *** 741,745 **** }}); } - //endTracing('thyGridRow','_createCell'); return cell; --- 697,700 ---- *************** *** 755,759 **** p._updateNames = function () { - //startTracing('thyGridRow','_updateNames'); var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); --- 710,713 ---- *************** *** 765,769 **** cell.setName('Cell'+cellPos); } - //endTracing('thyGridRow','_updateNames'); } --- 719,722 ---- *************** *** 780,784 **** p._updateClasses = function (cell, cellIdx) { - //startTracing('thyGridRow','_updateClasses'); var i,nClasses = this.cellCSSClasses.getElementsCount(); --- 733,736 ---- *************** *** 795,799 **** cell.setCSSClass(cell.cssActualSelection); - //endTracing('thyGridRow','_updateClasses'); } --- 747,750 ---- *************** *** 806,810 **** p._updateAllClasses = function () { - //startTracing('thyGridRow','_updateAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); --- 757,760 ---- *************** *** 814,818 **** this._updateClasses(cell,i); } - //endTracing('thyGridRow','_updateAllClasses'); } --- 764,767 ---- *************** *** 825,849 **** p._removeAllClasses = function () { - //startTracing('thyGridRow','_removeAllClasses'); - var i,cell,nClasses,nCells = this.cells.getElementsCount(); - var j,nClasses = this.cellCSSClasses.getElementsCount(); - var nIClasses = this.cellIndexedCSSClasses.getElementsCount(); - - for (i=0; i<nCells; i++) - { - cell = this.cells.getElementByIndex(i); - - for (j=0; j<nClasses; j++) - { - cell._removeCSSClass(this.cellCSSClasses.getElementByIndex(j)); - } - - for (j=0; j<nIClasses; j++) - { - cell._removeCSSClass(this.cellIndexedCSSClasses.getElementByIndex(j)+(i-1)); - } - - cell.setCSSClass(cell.cssActualSelection); - } - //endTracing('thyGridRow','_removeAllClasses'); } --- 774,776 ---- Index: thygrid.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygrid.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** thygrid.js 17 Jan 2006 23:21:33 -0000 1.8 --- thygrid.js 20 Jan 2006 01:26:12 -0000 1.9 *************** *** 65,69 **** function thyGrid(name, label) { - //startTracing('thyGrid','thyGrid'); this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); --- 65,68 ---- *************** *** 83,87 **** this.contents.addChild(this.gridContents); - //endTracing('thyGrid','thyGrid'); } --- 82,85 ---- *************** *** 96,103 **** p.cleanUp = function () { - //startTracing('thyGrid','cleanUp'); this.removeAllRows(); this.removeAllColumns(); - //endTracing('thyGrid','cleanUp'); } --- 94,99 ---- *************** *** 110,116 **** p.reset = function () { - //startTracing('thyGrid','reset'); this.removeAllRows(); - //endTracing('thyGrid','reset'); } --- 106,110 ---- *************** *** 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'); } --- 131,136 ---- *************** *** 159,163 **** p.appendColumn = function (title, col) { - //startTracing('thyGrid','appendColumn'); if (title == null || typeof(title) == 'object') { --- 151,154 ---- *************** *** 186,190 **** this.appendRow(col) } - //endTracing('thyGrid','appendColumn'); return colIndex-1; --- 177,180 ---- *************** *** 220,224 **** p.getColumn = function (index) { - //startTracing('thyGrid','getColumn'); var i, nRows = this.rows.getElementsCount(); var cells = new thyCollection(); --- 210,213 ---- *************** *** 228,232 **** cells.add(this.rows.getElementByIndex(i).getCell(index)); } - //endTracing('thyGrid','getColumn'); return cells; --- 217,220 ---- *************** *** 254,261 **** p.getColumnsCount = function () { - //startTracing('thyGrid','getColumnsCount'); var row = this.rows.getElementByIndex(0); if (row) return row.getCellsCount(); - //endTracing('thyGrid','getColumnsCount'); return 0; } --- 242,247 ---- *************** *** 273,277 **** p.removeColumn = function (index) { - //startTracing('thyGrid','removeColumn'); if (!this.rows.getElementByIndex(0).getCellElement(index)) return; --- 259,262 ---- *************** *** 283,287 **** row.removeCell(index); } - //endTracing('thyGrid','removeColumn'); } --- 268,271 ---- *************** *** 295,301 **** p.removeAllColumns = function () { - //startTracing('thyGrid','removeAllColumns'); this.rows.cleanUp(); - //endTracing('thyGrid','removeAllColumns'); } --- 279,283 ---- *************** *** 317,321 **** p.searchColumn = function (str, col) { - //startTracing('thyGrid','searchColumn'); var i,content,cell,nRows = this.rows.getElementsCount(); --- 299,302 ---- *************** *** 325,329 **** if (cell.indexOf(str) != -1) return i-1; } - //endTracing('thyGrid','searchColumn'); } --- 306,309 ---- *************** *** 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'); } --- 325,330 ---- *************** *** 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'))) --- 341,344 ---- *************** *** 385,390 **** if (this.selCellSelRow) gRow.setSelectCellSelectRow(); ! //this._addRowClasses(gRow, nRows-1); ! //this._addRowCellsClasses(gRow); for (i=0; i<nHeaderCols; i++) --- 362,367 ---- if (this.selCellSelRow) gRow.setSelectCellSelectRow(); ! this._addRowClasses(gRow, nRows-1); ! this._addRowCellsClasses(gRow); for (i=0; i<nHeaderCols; i++) *************** *** 392,396 **** gRow.insertCell(row.getElementByIndex(i)); } - //endTracing('thyGrid','appendRow'); return nRows-1; --- 369,372 ---- *************** *** 410,414 **** p.moveRow = function (fromIndex, toIndex) { - //startTracing('thyGrid','moveRow'); fromIndex++; toIndex++; --- 386,389 ---- *************** *** 427,431 **** this._updateRowName(this.rows.getElementByIndex(i), i-1); } - //endTracing('thyGrid','moveRow'); } --- 402,405 ---- *************** *** 442,446 **** p.getRow = function (index) { - //startTracing('thyGrid','getRow'); var row = this.rows.getElementByIndex(index+1); if (!row) return new thyCollection(); --- 416,419 ---- *************** *** 453,457 **** cells.add(row.getCell(i)); } - //endTracing('thyGrid','getRow'); return cells; --- 426,429 ---- *************** *** 486,490 **** p.getSelectedRowsIndexes = function () { - //startTracing('thyGrid','getSelectedRowsIndexes'); var selRowsIndexes = new thyCollection(); var i,nRows = this.rows.getElementsCount(); --- 458,461 ---- *************** *** 494,498 **** if (this.rows.getElementByIndex(i).isSelected()) selRowsIndexes.add(i-1); } - //endTracing('thyGrid','getSelectedRowsIndexes'); return selRowsIndexes; --- 465,468 ---- *************** *** 508,512 **** p.getSelectedRows = function () { - //startTracing('thyGrid','getSelectedRows'); var rows = new thyCollection(); var i,j,nCells,cells,row,nRows = this.rows.getElementsCount(); --- 478,481 ---- *************** *** 517,521 **** if (row.isSelected()) rows.add(this.getRow(i-1)); } - //endTracing('thyGrid','getSelectedRows'); return rows; --- 486,489 ---- *************** *** 542,546 **** p.getAllRows = function () { - //startTracing('thyGrid','getAllRows'); var i,nRows = this.getRowsCount(); var allRows = new thyCollection(); --- 510,513 ---- *************** *** 550,554 **** allRows.add(this.getRow(i)); } - //endTracing('thyGrid','getAllRows'); return allRows; --- 517,520 ---- *************** *** 563,567 **** p.removeAllRows = function () { - //startTracing('thyGrid','removeAllRows'); var i,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) --- 529,532 ---- *************** *** 569,573 **** this.rows.removeByIndex(i); } - //endTracing('thyGrid','removeAllRows'); } --- 534,537 ---- *************** *** 580,584 **** p.removeSelectedRows = function () { - //startTracing('thyGrid','removeSelectedRows'); var i,lastRow,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) --- 544,547 ---- *************** *** 596,600 **** this._updateRowName(this.rows.getElementByIndex(i), i-1); } - //endTracing('thyGrid','removeSelectedRows'); } --- 559,562 ---- *************** *** 611,615 **** p.removeRow = function (index) { - //startTracing('thyGrid','removeRow'); var row,idx = index+1; this.rows.removeByIndex(idx); --- 573,576 ---- *************** *** 620,624 **** this._updateRowName(this.rows.getElementByIndex(i),i-1); } - //endTracing('thyGrid','removeRow'); } --- 581,584 ---- *************** *** 631,635 **** p.setSelectCellSelectRow = function () { - //startTracing('thyGrid','setSelectedCellSelectRow'); this.selCellSelRow = true; var i,nRows = this.rows.getElementsCount(); --- 591,594 ---- *************** *** 639,643 **** this.rows.getElementByIndex(i).setSelectCellSelectRow(); } - //endTracing('thyGrid','setSelectedCellSelectRow'); } --- 598,601 ---- *************** *** 783,787 **** p._addCSSClass = function (cssClass) { - //startTracing('thyGrid','_addCSSClass'); this._thyLabelPanel_addCSSClass(cssClass); if (!this.rows) return; --- 741,744 ---- *************** *** 795,799 **** this._addRowCellsClasses(row); } - //endTracing('thyGrid','_addCSSClass'); } --- 752,755 ---- *************** *** 811,815 **** p._removeCSSClass = function (cssClass) { - //startTracing('thyGrid','_removeCSSClass'); this._thyLabelPanel_removeCSSClass(cssClass); if (!this.rows) return; --- 767,770 ---- *************** *** 822,826 **** this._removeRowClasses(row, i-1); } - //endTracing('thyGrid','_removeCSSClass'); } --- 777,780 ---- *************** *** 838,842 **** p._addRowClasses = function (row, rowIndex) { - //startTracing('thyGrid','_addRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 792,795 ---- *************** *** 848,852 **** } row.setCSSClass(row.cssActualSelection); - //endTracing('thyGrid','_addRowClasses'); } --- 801,804 ---- *************** *** 865,869 **** p._addRowCellsClasses = function (row) { - //startTracing('thyGrid','_addRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 817,820 ---- *************** *** 876,882 **** row._addCellIndexedCSSClass(cssClass+'_col'); row._addCellIndexedCSSClass(this.name+'_col'); ! //row._updateAllClasses(); } - //endTracing('thyGrid','_addRowCellsClasses'); } --- 827,832 ---- row._addCellIndexedCSSClass(cssClass+'_col'); row._addCellIndexedCSSClass(this.name+'_col'); ! row._updateAllClasses(); } } *************** *** 894,898 **** p._removeRowClasses = function (row, rowIndex) { - //startTracing('thyGrid','_removeRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 844,847 ---- *************** *** 904,908 **** } row.setCSSClass(row.cssActualSelection); - //endTracing('thyGrid','_removeRowClasses'); } --- 853,856 ---- *************** *** 920,924 **** p._removeRowCellsClasses = function (row) { - //startTracing('thyGrid','_removeRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); --- 868,871 ---- *************** *** 932,938 **** row._removeCellIndexedCSSClass(cssClass+'_col'); row._removeCellIndexedCSSClass(this.name+'_col'); ! //row._updateAllClasses(); } - //endTracing('thyGrid','_removeRowCellsClasses'); } --- 879,884 ---- row._removeCellIndexedCSSClass(cssClass+'_col'); row._removeCellIndexedCSSClass(this.name+'_col'); ! row._updateAllClasses(); } } *************** *** 950,954 **** p._updateRowName = function (row, rowIndex) { - //startTracing('thyGrid','_updateRowName'); this._removeRowClasses(row, row.getIndex()); row.setName('Row'+rowIndex); --- 896,899 ---- *************** *** 956,960 **** this._addRowClasses(row, rowIndex); this.rows.changeElementName({elm: row, name: 'Row'+rowIndex}); - //endTracing('thyGrid','_updateRowName'); } --- 901,904 ---- *************** *** 975,979 **** p._populateContents = function (data) { - //startTracing('thyGrid','_populateContents'); var i, j, cells, cell, rowData; var selected = data.selectedRows; --- 919,922 ---- *************** *** 1034,1038 **** } } - //endTracing('thyGrid','_populateContents'); } --- 977,980 ---- *************** *** 1045,1049 **** p._sweepOutContents = function () { - //startTracing('thyGrid','_sweepOutContents'); var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; --- 987,990 ---- *************** *** 1055,1059 **** data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); - //endTracing('thyGrid','_sweepOutContents'); return data; --- 996,999 ---- |
From: Thyamad c. <th...@us...> - 2006-01-20 01:26:21
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18131 Modified Files: .sync_svn2cvs dynapi.js Log Message: Commiting file additions and modification from SVN revision 2659 to 2660... Changes made by vinicius on 2006-01-20 03:29:57 +0100 (Fri, 20 Jan 2006) corresponding to SVN revision 2660 with message: Restored CSS modifications. Now will do these modifications and tests in thyapi-profile under branches/vinicius Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** .sync_svn2cvs 19 Jan 2006 12:01:13 -0000 1.55 --- .sync_svn2cvs 20 Jan 2006 01:26:12 -0000 1.56 *************** *** 1 **** ! 2653 \ No newline at end of file --- 1 ---- ! 2660 \ No newline at end of file Index: dynapi.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/dynapi.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dynapi.js 17 Jan 2006 22:35:06 -0000 1.7 --- dynapi.js 20 Jan 2006 01:26:12 -0000 1.8 *************** *** 461,524 **** var DynAPI = dynapi; - var dyntracing = {}; - - function startTracing() { } - - function endTracing() { } - - function showTracing() { } - - /* - function startTracing(objname,funcname) - { - if (!dyntracing[objname]) - { - dyntracing[objname] = {}; - } - - if (!dyntracing[objname][funcname]) - { - dyntracing[objname][funcname] = { }; - } - var s = (new Date()).valueOf(); - dyntracing[objname][funcname].s = s; //start - } - - function endTracing(objname,funcname) - { - var e = (new Date()).valueOf(); - - if (!dyntracing[objname] || !dyntracing[objname][funcname] || !dyntracing[objname][funcname].s) - { - return; - } - - if (!dyntracing[objname][funcname].tt) - { - dyntracing[objname][funcname].tt = 0; //total time - dyntracing[objname][funcname].c = 0; //count - } - - dyntracing[objname][funcname].tt += (e - dyntracing[objname][funcname].s); - dyntracing[objname][funcname].c += 1; - dyntracing[objname][funcname].s = 0; - } - - function showTracing() - { - var i,j, out; - out = ''; - for (i in dyntracing) - { - out += "---------\n"; - out += "object: " + i + "\n"; - for (j in dyntracing[i]) - { - out += " f: " + j + "\n"; - out += " time: " + dyntracing[i][j].tt + " , count: " + dyntracing[i][j].c + " ratio: " + (dyntracing[i][j].tt/dyntracing[i][j].c) + "\n"; - } - } - return out; - } - */ - --- 461,462 ---- |
From: Thyamad c. <th...@us...> - 2006-01-19 12:01:25
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17944/thywidgets Modified Files: thydropdownbox.js Log Message: Commiting file additions and modification from SVN revision 2652 to 2653... Changes made by vinicius on 2006-01-19 14:04:44 +0100 (Thu, 19 Jan 2006) corresponding to SVN revision 2653 with message: Index: thydropdownbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thydropdownbox.js 11 Sep 2005 02:20:27 -0000 1.3 --- thydropdownbox.js 19 Jan 2006 12:01:14 -0000 1.4 *************** *** 83,88 **** }); ! //FIXME: This is not implemented yet. ! //this.dropEdit.setReadOnly(true); /*this.dropEdit.addEventListener({ onkeypress: this._eventSearchRow(), --- 83,91 ---- }); ! this.dropEdit.setReadOnly(true); ! this.dropEdit.addEventListener({ ! onclick: this._eventShowHideListBox() ! }); ! /*this.dropEdit.addEventListener({ onkeypress: this._eventSearchRow(), *************** *** 590,593 **** --- 593,597 ---- } + /** * Method: _hideListBox *************** *** 690,693 **** --- 694,718 ---- \*************************************************************************/ + /** + * Method: _eventShowHideListBox + * + * Hides the <thyListBox> element + * + */ + p._eventShowHideListBox = function () + { + var self = this; + return function(e) + { + if (dynapi.document._opennedDropDownBoxes[self.name]) + { + self._hideListBox(); + } + else + { + self._showListBox(); + } + } + } /** |
From: Thyamad c. <th...@us...> - 2006-01-19 12:01:25
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17944 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2652 to 2653... Changes made by vinicius on 2006-01-19 14:04:44 +0100 (Thu, 19 Jan 2006) corresponding to SVN revision 2653 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** .sync_svn2cvs 17 Jan 2006 23:21:32 -0000 1.54 --- .sync_svn2cvs 19 Jan 2006 12:01:13 -0000 1.55 *************** *** 1 **** ! 2648 \ No newline at end of file --- 1 ---- ! 2653 \ No newline at end of file |
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; |
From: Thyamad c. <th...@us...> - 2006-01-17 23:21:41
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10120 Modified Files: .sync_svn2cvs 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: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** .sync_svn2cvs 17 Jan 2006 22:35:06 -0000 1.53 --- .sync_svn2cvs 17 Jan 2006 23:21:32 -0000 1.54 *************** *** 1 **** ! 2647 \ No newline at end of file --- 1 ---- ! 2648 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-17 22:35:17
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25977/thywidgets Modified Files: thygrid.js thygridcell.js thygridcontents.js thygridrow.js Log Message: Commiting file additions and modification from SVN revision 2646 to 2647... Changes made by vinicius on 2006-01-18 00:37:38 +0100 (Wed, 18 Jan 2006) corresponding to SVN revision 2647 with message: disabled all css for thygrid Index: thygridcell.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygridcell.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thygridcell.js 1 Sep 2005 18:15:38 -0000 1.5 --- thygridcell.js 17 Jan 2006 22:35:06 -0000 1.6 *************** *** 48,51 **** --- 48,52 ---- function thyGridCell(name, html) { + startTracing('thyGridCell','thyGridCell'); this.thyPanel = thyPanel; this.thyPanel(name,null); *************** *** 57,60 **** --- 58,62 ---- this.setRelativeness(false); + /* this.cssClasses = { 'default': ['default'], *************** *** 64,67 **** --- 66,70 ---- }; this.addCSSClass('thyGridCell'); + */ var self = this; *************** *** 70,73 **** --- 73,77 ---- self._selectEvent() }}); + endTracing('thyGridCell','thyGridCell'); } *************** *** 91,94 **** --- 95,99 ---- p.populate = function (data) { + startTracing('thyGridCell','populate'); if (typeof(data) != 'object') this.setHTML(data); else if (typeof(data.isFromClass) == 'function') *************** *** 113,116 **** --- 118,122 ---- catch(e) { + endTracing('thyGridCell','populate'); return; } *************** *** 125,131 **** --- 131,139 ---- catch(e) { + endTracing('thyGridCell','populate'); return; } } + endTracing('thyGridCell','populate'); } *************** *** 142,145 **** --- 150,154 ---- p.sweepOut = function () { + startTracing('thyGridCell','sweepOut'); if (!this.children.length) return this.getHTML(); try *************** *** 150,159 **** --- 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'); } *************** *** 167,172 **** --- 179,186 ---- p.addChild = function (child) { + startTracing('thyGridCell','addChild'); if (this.children.length == 0) this._thyPanelSetHTML(''); this._thyPanelAddChild(child); + endTracing('thyGridCell','addChild'); } *************** *** 185,192 **** --- 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'); } *************** *** 202,205 **** --- 218,222 ---- p.getHTML = function () { + startTracing('thyGridCell','getHTML'); var rSpace = new RegExp(' [;]', 'g'); var html = this._thyPanelGetHTML(); *************** *** 207,210 **** --- 224,228 ---- if (html == ' ' || html == ' ') { + endTracing('thyGridCell','getHTML'); return ''; } *************** *** 212,215 **** --- 230,234 ---- if (typeof(html) == 'string') { + endTracing('thyGridCell','getHTML'); return html.replace(rSpace, ' '); } *************** *** 217,223 **** --- 236,244 ---- if (typeof(html) == 'object' && typeof(html.isFromClass) && html.isFromClass('thyPanel')) { + endTracing('thyGridCell','getHTML'); return html.sweepOut(); } + endTracing('thyGridCell','getHTML'); return html; } *************** *** 362,365 **** --- 383,387 ---- p._create = function () { + startTracing('thyGridCell','_create'); if (this.parent && !this.elm) { *************** *** 368,371 **** --- 390,394 ---- DynElement._flagCreate(this); } + endTracing('thyGridCell','_create'); } *************** *** 373,376 **** --- 396,400 ---- p._createDOMElement = function () { + startTracing('thyGridCell','_createDOMElement'); if (this.parent) { *************** *** 403,406 **** --- 427,431 ---- parentElm.appendChild(elm); + endTracing('thyGridCell','_createDOMElement'); return elm; } *************** *** 415,418 **** --- 440,444 ---- p._processMode = function() { + startTracing('thyGridCell','_processMode'); switch (this.cellMode) { *************** *** 426,429 **** --- 452,456 ---- this.cellEditBox.focus(); } + endTracing('thyGridCell','_processMode'); return; *************** *** 437,450 **** --- 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.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thygridcontents.js 6 Sep 2005 13:30:07 -0000 1.2 --- thygridcontents.js 17 Jan 2006 22:35:06 -0000 1.3 *************** *** 39,44 **** --- 39,46 ---- function thyGridContents(name) { + startTracing('thyGridContents','thyGridContents'); this.thyPanel = thyPanel; this.thyPanel(name); + endTracing('thyGridContents','thyGridContents'); } *************** *** 53,56 **** --- 55,59 ---- p.getOuterHTML = function () { + startTracing('thyGridContents','getOuterHTML'); var html = [ '<table id="'+this.id+'"', *************** *** 69,72 **** --- 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.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thygridrow.js 13 Oct 2005 18:17:26 -0000 1.2 --- thygridrow.js 17 Jan 2006 22:35:06 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- function thyGridRow(name, index) { + startTracing('thyGridRow','thyGridRow'); this.thyPanel = thyPanel; this.thyPanel(name); *************** *** 56,59 **** --- 57,61 ---- this.addCSSClass('thyGridRow'); //if (!this.thyGridRow) this.onPreCreate(this.initThyGridRow); + endTracing('thyGridRow','thyGridRow'); } *************** *** 83,88 **** p.addCellCSSClass = function (cssClass) { this._addCellCSSClass(cssClass); ! this._updateAllClasses(); } --- 85,92 ---- p.addCellCSSClass = function (cssClass) { + startTracing('thyGridRow','addCellCSSClass'); this._addCellCSSClass(cssClass); ! //this._updateAllClasses(); ! endTracing('thyGridRow','addCellCSSClass'); } *************** *** 101,106 **** p.addCellIndexedCSSClass = function (cssClass) { this._addCellIndexedCSSClass(cssClass); ! this._updateAllClasses(); } --- 105,112 ---- p.addCellIndexedCSSClass = function (cssClass) { + startTracing('thyGridRow','addCellIndexedCSSClass'); this._addCellIndexedCSSClass(cssClass); ! //this._updateAllClasses(); ! endTracing('thyGridRow','addCellIndexedCSSClass'); } *************** *** 118,124 **** p.removeCellCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellCSSClass(cssClass); ! this._updateAllClasses(); } --- 124,132 ---- p.removeCellCSSClass = function (cssClass) { + startTracing('thyGridRow','removeCellCSSClass'); this._removeAllClasses(); this._removeCellCSSClass(cssClass); ! //this._updateAllClasses(); ! endTracing('thyGridRow','removeCellCSSClass'); } *************** *** 137,143 **** p.removeCellIndexedCSSClass = function (cssClass) { this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); ! this._updateAllClasses(); } --- 145,153 ---- p.removeCellIndexedCSSClass = function (cssClass) { + startTracing('thyGridRow','removeCellIndexedCSSClass'); this._removeAllClasses(); this._removeCellIndexedCSSClass(cssClass); ! //this._updateAllClasses(); ! endTracing('thyGridRow','removeCellIndexedCSSClass'); } *************** *** 150,156 **** p.removeAllCellClasses = function () { this._removeAllClasses(); this._removeAllCellClasses(); ! this._updateAllClasses(); } --- 160,168 ---- p.removeAllCellClasses = function () { + startTracing('thyGridRow','removeAllCellClasses'); this._removeAllClasses(); this._removeAllCellClasses(); ! //this._updateAllClasses(); ! endTracing('thyGridRow','removeAllCellClasses'); } *************** *** 168,171 **** --- 180,184 ---- p.setIndex = function (index) { + startTracing('thyGridRow','setIndex'); if (index == null || this.rowIndex == index) return; this.rowIndex = index; *************** *** 173,176 **** --- 186,190 ---- this.cells.getElementByIndex(0).setHTML(this.rowIndex == -1 ? '' : this.rowIndex); this._updateNames(); + endTracing('thyGridRow','setIndex'); } *************** *** 200,203 **** --- 214,218 ---- p.insertCell = function (content, column, type) { + startTracing('thyGridRow','insertCell'); var col; if (content == null) content = ''; *************** *** 208,215 **** cell.populate(content); this.cells.add(cell, cell.name); ! this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); return col+1; } --- 223,231 ---- cell.populate(content); this.cells.add(cell, cell.name); ! //this._updateClasses(cell, col+1); if (column != null && column != (col-1)) this.moveCell(col-1, column); + endTracing('thyGridRow','insertCell'); return col+1; } *************** *** 228,235 **** --- 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() : ''; } *************** *** 267,270 **** --- 285,289 ---- p.getSelectedCells = function () { + startTracing('thyGridRow','getSelectedCells'); var cells = new thyCollection(); var i,cell,nCells = this.cells.getElementsCount(); *************** *** 276,279 **** --- 295,299 ---- } + endTracing('thyGridRow','getSelectedCells'); return cells; } *************** *** 306,309 **** --- 326,330 ---- p.removeCell = function (column) { + startTracing('thyGridRow','removeCell'); if (column == null || typeof(column) != 'number') column = 0; column++; *************** *** 312,317 **** this.cells.remove(cell, cell.name, column); this._updateNames(); ! this._updateAllClasses(); return cell.sweepOut(); } --- 333,339 ---- this.cells.remove(cell, cell.name, column); this._updateNames(); ! //this._updateAllClasses(); + endTracing('thyGridRow','removeCell'); return cell.sweepOut(); } *************** *** 330,333 **** --- 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'}); *************** *** 346,350 **** if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); ! this._updateAllClasses(); } --- 369,374 ---- if (this.cells.changeElementIndex({oldIndex: orig, index: dest}) == null) return; this._updateNames(); ! //this._updateAllClasses(); ! endTracing('thyGridRow','moveCell'); } *************** *** 372,377 **** --- 396,403 ---- p.selectOnly = function () { + startTracing('thyGridRow','selectOnly'); if (this.isSelected()) { + endTracing('thyGridRow','selectOnly'); return; } *************** *** 385,388 **** --- 411,415 ---- cell.setSelected(true); } + endTracing('thyGridRow','selectOnly'); } *************** *** 397,402 **** --- 424,431 ---- p.select = function () { + startTracing('thyGridRow','select'); if (this.isSelected()) { + endTracing('thyGridRow','select'); return; } *************** *** 410,413 **** --- 439,443 ---- this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName+this.rowIndex, this)); } + endTracing('thyGridRow','select'); } *************** *** 420,425 **** --- 450,457 ---- p.unselectOnly = function () { + startTracing('thyGridRow','unselectOnly'); if (!this.isSelected()) { + endTracing('thyGridRow','unselectOnly'); return; } *************** *** 433,436 **** --- 465,469 ---- cell.setSelected(false); } + endTracing('thyGridRow','unselectOnly'); } *************** *** 445,450 **** --- 478,485 ---- p.unselect = function () { + startTracing('thyGridRow','unselect'); if (!this.isSelected()) { + endTracing('thyGridRow','unselect'); return; } *************** *** 458,461 **** --- 493,497 ---- this.parent.invokeEvent(eventName+this.rowIndex, new DynEvent(eventName, this)); } + endTracing('thyGridRow','unselect'); } *************** *** 502,505 **** --- 538,542 ---- p.getOuterHTML = function () { + startTracing('thyGridRow','getOuterHTML'); var html = [ '<tr '+this._cssClass+' id="'+this.id+'" '+(this.disabled ? 'disabled' : '')+' '+(this.readOnly?'readonly':'')+' style="', *************** *** 521,524 **** --- 558,562 ---- ].join(''); //alert(html); + endTracing('thyGridRow','getOuterHTML'); return html; } *************** *** 536,539 **** --- 574,578 ---- p._create = function () { + startTracing('thyGridRow','_create'); if (this.parent && !this.elm) { *************** *** 556,563 **** --- 595,604 ---- DynElement._flagCreate(this); } + endTracing('thyGridRow','_create'); } p._createDOMElement = function () { + startTracing('thyGridRow','_createDOMElement'); if (this.parent && !this.elm) { *************** *** 581,586 **** --- 622,629 ---- parentElm.appendChild(elm); + endTracing('thyGridRow','_createDOMElement'); return elm; } + endTracing('thyGridRow','_createDOMElement'); } *************** *** 677,680 **** --- 720,724 ---- p._createCell = function (colIndex, type) { + startTracing('thyGridRow','_createCell'); if (!type) type = 'n'; *************** *** 697,700 **** --- 741,745 ---- }}); } + endTracing('thyGridRow','_createCell'); return cell; *************** *** 710,713 **** --- 755,759 ---- p._updateNames = function () { + startTracing('thyGridRow','_updateNames'); var i,name,cell,cellPos,nCells = this.cells.getElementsCount(); *************** *** 719,722 **** --- 765,769 ---- cell.setName('Cell'+cellPos); } + endTracing('thyGridRow','_updateNames'); } *************** *** 733,736 **** --- 780,784 ---- p._updateClasses = function (cell, cellIdx) { + startTracing('thyGridRow','_updateClasses'); var i,nClasses = this.cellCSSClasses.getElementsCount(); *************** *** 747,750 **** --- 795,799 ---- cell.setCSSClass(cell.cssActualSelection); + endTracing('thyGridRow','_updateClasses'); } *************** *** 757,760 **** --- 806,810 ---- p._updateAllClasses = function () { + startTracing('thyGridRow','_updateAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); *************** *** 764,767 **** --- 814,818 ---- this._updateClasses(cell,i); } + endTracing('thyGridRow','_updateAllClasses'); } *************** *** 774,777 **** --- 825,829 ---- p._removeAllClasses = function () { + startTracing('thyGridRow','_removeAllClasses'); var i,cell,nClasses,nCells = this.cells.getElementsCount(); var j,nClasses = this.cellCSSClasses.getElementsCount(); *************** *** 794,796 **** --- 846,849 ---- cell.setCSSClass(cell.cssActualSelection); } + endTracing('thyGridRow','_removeAllClasses'); } Index: thygrid.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygrid.js,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** thygrid.js 23 Dec 2005 13:38:15 -0000 1.6 --- thygrid.js 17 Jan 2006 22:35:06 -0000 1.7 *************** *** 65,68 **** --- 65,69 ---- function thyGrid(name, label) { + startTracing('thyGrid','thyGrid'); this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); *************** *** 82,85 **** --- 83,87 ---- this.contents.addChild(this.gridContents); + endTracing('thyGrid','thyGrid'); } *************** *** 94,99 **** --- 96,103 ---- p.cleanUp = function () { + startTracing('thyGrid','cleanUp'); this.removeAllRows(); this.removeAllColumns(); + endTracing('thyGrid','cleanUp'); } *************** *** 106,110 **** --- 110,116 ---- p.reset = function () { + startTracing('thyGrid','reset'); this.removeAllRows(); + endTracing('thyGrid','reset'); } *************** *** 131,136 **** --- 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'); } *************** *** 151,154 **** --- 159,163 ---- p.appendColumn = function (title, col) { + startTracing('thyGrid','appendColumn'); if (title == null || typeof(title) == 'object') { *************** *** 177,180 **** --- 186,190 ---- this.appendRow(col) } + endTracing('thyGrid','appendColumn'); return colIndex-1; *************** *** 210,213 **** --- 220,224 ---- p.getColumn = function (index) { + startTracing('thyGrid','getColumn'); var i, nRows = this.rows.getElementsCount(); var cells = new thyCollection(); *************** *** 217,220 **** --- 228,232 ---- cells.add(this.rows.getElementByIndex(i).getCell(index)); } + endTracing('thyGrid','getColumn'); return cells; *************** *** 242,247 **** --- 254,261 ---- p.getColumnsCount = function () { + startTracing('thyGrid','getColumnsCount'); var row = this.rows.getElementByIndex(0); if (row) return row.getCellsCount(); + endTracing('thyGrid','getColumnsCount'); return 0; } *************** *** 259,262 **** --- 273,277 ---- p.removeColumn = function (index) { + startTracing('thyGrid','removeColumn'); if (!this.rows.getElementByIndex(0).getCellElement(index)) return; *************** *** 268,271 **** --- 283,287 ---- row.removeCell(index); } + endTracing('thyGrid','removeColumn'); } *************** *** 279,283 **** --- 295,301 ---- p.removeAllColumns = function () { + startTracing('thyGrid','removeAllColumns'); this.rows.cleanUp(); + endTracing('thyGrid','removeAllColumns'); } *************** *** 299,302 **** --- 317,321 ---- p.searchColumn = function (str, col) { + startTracing('thyGrid','searchColumn'); var i,content,cell,nRows = this.rows.getElementsCount(); *************** *** 306,309 **** --- 325,329 ---- if (cell.indexOf(str) != -1) return i-1; } + endTracing('thyGrid','searchColumn'); } *************** *** 325,330 **** --- 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'); } *************** *** 341,344 **** --- 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'))) *************** *** 362,367 **** if (this.selCellSelRow) gRow.setSelectCellSelectRow(); ! this._addRowClasses(gRow, nRows-1); ! this._addRowCellsClasses(gRow); for (i=0; i<nHeaderCols; i++) --- 385,390 ---- if (this.selCellSelRow) gRow.setSelectCellSelectRow(); ! //this._addRowClasses(gRow, nRows-1); ! //this._addRowCellsClasses(gRow); for (i=0; i<nHeaderCols; i++) *************** *** 369,372 **** --- 392,396 ---- gRow.insertCell(row.getElementByIndex(i)); } + endTracing('thyGrid','appendRow'); return nRows-1; *************** *** 386,389 **** --- 410,414 ---- p.moveRow = function (fromIndex, toIndex) { + startTracing('thyGrid','moveRow'); fromIndex++; toIndex++; *************** *** 402,405 **** --- 427,431 ---- this._updateRowName(this.rows.getElementByIndex(i), i-1); } + endTracing('thyGrid','moveRow'); } *************** *** 416,419 **** --- 442,446 ---- p.getRow = function (index) { + startTracing('thyGrid','getRow'); var row = this.rows.getElementByIndex(index+1); if (!row) return new thyCollection(); *************** *** 426,429 **** --- 453,457 ---- cells.add(row.getCell(i)); } + endTracing('thyGrid','getRow'); return cells; *************** *** 458,461 **** --- 486,490 ---- p.getSelectedRowsIndexes = function () { + startTracing('thyGrid','getSelectedRowsIndexes'); var selRowsIndexes = new thyCollection(); var i,nRows = this.rows.getElementsCount(); *************** *** 465,468 **** --- 494,498 ---- if (this.rows.getElementByIndex(i).isSelected()) selRowsIndexes.add(i-1); } + endTracing('thyGrid','getSelectedRowsIndexes'); return selRowsIndexes; *************** *** 478,481 **** --- 508,512 ---- p.getSelectedRows = function () { + startTracing('thyGrid','getSelectedRows'); var rows = new thyCollection(); var i,j,nCells,cells,row,nRows = this.rows.getElementsCount(); *************** *** 486,489 **** --- 517,521 ---- if (row.isSelected()) rows.add(this.getRow(i-1)); } + endTracing('thyGrid','getSelectedRows'); return rows; *************** *** 510,513 **** --- 542,546 ---- p.getAllRows = function () { + startTracing('thyGrid','getAllRows'); var i,nRows = this.getRowsCount(); var allRows = new thyCollection(); *************** *** 517,520 **** --- 550,554 ---- allRows.add(this.getRow(i)); } + endTracing('thyGrid','getAllRows'); return allRows; *************** *** 529,532 **** --- 563,567 ---- p.removeAllRows = function () { + startTracing('thyGrid','removeAllRows'); var i,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) *************** *** 534,537 **** --- 569,573 ---- this.rows.removeByIndex(i); } + endTracing('thyGrid','removeAllRows'); } *************** *** 544,547 **** --- 580,584 ---- p.removeSelectedRows = function () { + startTracing('thyGrid','removeSelectedRows'); var i,lastRow,nRows = this.rows.getElementsCount(); for (i=nRows-1; i>0; i--) *************** *** 559,562 **** --- 596,600 ---- this._updateRowName(this.rows.getElementByIndex(i), i-1); } + endTracing('thyGrid','removeSelectedRows'); } *************** *** 573,576 **** --- 611,615 ---- p.removeRow = function (index) { + startTracing('thyGrid','removeRow'); var row,idx = index+1; this.rows.removeByIndex(idx); *************** *** 581,584 **** --- 620,624 ---- this._updateRowName(this.rows.getElementByIndex(i),i-1); } + endTracing('thyGrid','removeRow'); } *************** *** 591,594 **** --- 631,635 ---- p.setSelectCellSelectRow = function () { + startTracing('thyGrid','setSelectedCellSelectRow'); this.selCellSelRow = true; var i,nRows = this.rows.getElementsCount(); *************** *** 598,601 **** --- 639,643 ---- this.rows.getElementByIndex(i).setSelectCellSelectRow(); } + endTracing('thyGrid','setSelectedCellSelectRow'); } *************** *** 741,744 **** --- 783,787 ---- p._addCSSClass = function (cssClass) { + startTracing('thyGrid','_addCSSClass'); this._thyLabelPanel_addCSSClass(cssClass); if (!this.rows) return; *************** *** 752,755 **** --- 795,799 ---- this._addRowCellsClasses(row); } + endTracing('thyGrid','_addCSSClass'); } *************** *** 767,770 **** --- 811,815 ---- p._removeCSSClass = function (cssClass) { + startTracing('thyGrid','_removeCSSClass'); this._thyLabelPanel_removeCSSClass(cssClass); if (!this.rows) return; *************** *** 777,780 **** --- 822,826 ---- this._removeRowClasses(row, i-1); } + endTracing('thyGrid','_removeCSSClass'); } *************** *** 792,795 **** --- 838,842 ---- p._addRowClasses = function (row, rowIndex) { + startTracing('thyGrid','_addRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 801,804 **** --- 848,852 ---- } row.setCSSClass(row.cssActualSelection); + endTracing('thyGrid','_addRowClasses'); } *************** *** 817,820 **** --- 865,869 ---- p._addRowCellsClasses = function (row) { + startTracing('thyGrid','_addRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 827,832 **** row._addCellIndexedCSSClass(cssClass+'_col'); row._addCellIndexedCSSClass(this.name+'_col'); ! row._updateAllClasses(); } } --- 876,882 ---- row._addCellIndexedCSSClass(cssClass+'_col'); row._addCellIndexedCSSClass(this.name+'_col'); ! //row._updateAllClasses(); } + endTracing('thyGrid','_addRowCellsClasses'); } *************** *** 844,847 **** --- 894,898 ---- p._removeRowClasses = function (row, rowIndex) { + startTracing('thyGrid','_removeRowClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 853,856 **** --- 904,908 ---- } row.setCSSClass(row.cssActualSelection); + endTracing('thyGrid','_removeRowClasses'); } *************** *** 868,871 **** --- 920,924 ---- p._removeRowCellsClasses = function (row) { + startTracing('thyGrid','_removeRowCellsClasses'); var i, cssClass, nClasses = this.rowClasses.getElementsCount(); *************** *** 879,884 **** row._removeCellIndexedCSSClass(cssClass+'_col'); row._removeCellIndexedCSSClass(this.name+'_col'); ! row._updateAllClasses(); } } --- 932,938 ---- row._removeCellIndexedCSSClass(cssClass+'_col'); row._removeCellIndexedCSSClass(this.name+'_col'); ! //row._updateAllClasses(); } + endTracing('thyGrid','_removeRowCellsClasses'); } *************** *** 896,899 **** --- 950,954 ---- p._updateRowName = function (row, rowIndex) { + startTracing('thyGrid','_updateRowName'); this._removeRowClasses(row, row.getIndex()); row.setName('Row'+rowIndex); *************** *** 901,904 **** --- 956,960 ---- this._addRowClasses(row, rowIndex); this.rows.changeElementName({elm: row, name: 'Row'+rowIndex}); + endTracing('thyGrid','_updateRowName'); } *************** *** 919,922 **** --- 975,979 ---- p._populateContents = function (data) { + startTracing('thyGrid','_populateContents'); var i, j, cells, cell, rowData; var selected = data.selectedRows; *************** *** 977,980 **** --- 1034,1038 ---- } } + endTracing('thyGrid','_populateContents'); } *************** *** 987,990 **** --- 1045,1049 ---- p._sweepOutContents = function () { + startTracing('thyGrid','_sweepOutContents'); var i,nRows = this.getRowsCount(); data = {rows: [ ], selectedRows: {}}; *************** *** 996,999 **** --- 1055,1059 ---- data.selectedRows = this.getSelectedRowsIndexes().getIndexedElements(); + endTracing('thyGrid','_sweepOutContents'); return data; |