From: Thyamad c. <th...@us...> - 2005-08-31 19:32:49
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23808/thywidgets Modified Files: thyeditbox.js thylistbox.js Log Message: Commiting file additions and modification from SVN revision 1870 to 1871... Changes made by vinicius on 2005-08-31 21:49:51 +0200 (Wed, 31 Aug 2005) corresponding to SVN revision 1871 with message: thyListBox - method setContentByValue created thyEditBox - method getValue created (it should be different of sweepOut, updated documentation thYDropDownBox - method setContentByValue created Index: thyeditbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thyeditbox.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thyeditbox.js 23 Aug 2005 13:14:05 -0000 1.2 --- thyeditbox.js 31 Aug 2005 19:32:37 -0000 1.3 *************** *** 3,7 **** * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * --- 3,7 ---- * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira, Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * *************** *** 31,34 **** --- 31,53 ---- * - .<object name>_contents * + * Events: + * + * All events of a "text" javascript object, that are: + * + * onclick - when the mouse button is clicked on an element; + * ondblclick - when the mouse button is double-clicked on an element; + * onmousedown - when the mouse button is pressed over an element; + * onmouseup - when the mouse button is released over an element; + * onmouseover - when the mouse is moved onto an element; + * onmousemove - when the mouse is moved while over an element; + * onmouseout - when the mouse is moved away from an element; + * onkeypress - when a key is pressed and released over an element; + * onkeydown - when a key is pressed down over an element; + * onkeyup - when a key is released over an element. + * onfocus - when the element receives focus; + * onblur - when the element loses focus; + * onselect - when text in an input of type text or password is selected; + * onchange - when the element loses focus and its value has changed since it received focus. + * */ function thyEditBox(name,label,value) *************** *** 157,160 **** --- 176,192 ---- } + /** + * Method: getValue + * + * Returns the value of the current element + * + */ + p.getValue = function () + { + if (!this._created) return this._value; + + return this.contents.elm.childNodes[0].value; + } + /*************************************************************************\ * Private Methods * *************** *** 232,235 **** --- 264,268 ---- * Returns the current value of this component * + * TODO: (viniciuscb) change this to contents */ p._sweepOutContents = function() Index: thylistbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thylistbox.js 23 Aug 2005 13:14:05 -0000 1.2 --- thylistbox.js 31 Aug 2005 19:32:37 -0000 1.3 *************** *** 3,7 **** * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * --- 3,7 ---- * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Raphael Derosso Pereira, Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * *************** *** 207,211 **** var nRows = this.getRowsCount(); ! for (i=0; i<nRows; i++) { if (this.getRowElement(i).getCellElement(0).sweepOut() == value) --- 207,211 ---- var nRows = this.getRowsCount(); ! for (var i=0; i<nRows; i++) { if (this.getRowElement(i).getCellElement(0).sweepOut() == value) *************** *** 215,218 **** --- 215,242 ---- /** + * Method: setContentByValue + * + * Changes the content associated with the specified value + * + * Parameters: + * + * value - The value that is associated with a content + * content - The new content + */ + p.setContentByValue = function (value,content) + { + var nRows = this.getRowsCount(); + + for (var i=0; i<nRows; i++) + { + if (this.getRowElement(i).getCellElement(0).sweepOut() == value) + { + this.getRowElement(i).getCellElement(1).populate(content); + return; + } + } + } + + /** * Method: search * |