From: Thyamad c. <th...@us...> - 2005-09-08 14:59:54
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12239/thywidgets Modified Files: thydropdownbox.js thygrid.js thylistbox.js Log Message: Commiting file additions and modification from SVN revision 1910 to 1911... Changes made by rpereira on 2005-09-08 17:13:52 +0200 (Thu, 08 Sep 2005) corresponding to SVN revision 1911 with message: Updated documentation Index: thydropdownbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thydropdownbox.js 1 Sep 2005 18:15:38 -0000 1.1 --- thydropdownbox.js 8 Sep 2005 14:59:41 -0000 1.2 *************** *** 346,349 **** --- 346,424 ---- } } + + /** + * 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 + * + * TODO: Rethink this: shouldn't this be a method implemented in parent + * (ListBox)? + */ + p.hideOption = function(params) + { + var index; + if (typeof(params) != 'object') + { + index = params; + } + else if (params['value']) + { + index = this.dropList.search(params['value']); + } + else + { + index = params['index']; + } + + var rowElement = this.dropList.getRowElement(index); + + if (rowElement) + { + rowElement.setDisplay('none'); + } + } + + + /** + * 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 + * + * TODO: Rethink this: shouldn't this be a method implemented in parent + * (ListBox)? + */ + p.showOption = function(params) + { + var index; + if (typeof(params) != 'object') + { + index = params; + } + else if (params['value']) + { + index = this.dropList.search(params['value']); + } + else + { + index = params['index']; + } + + var rowElement = this.dropList.getRowElement(index); + + if (rowElement) + { + rowElement.setDisplay('inline'); + } + } /*************************************************************************\ Index: thylistbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thylistbox.js 1 Sep 2005 18:15:38 -0000 1.5 --- thylistbox.js 8 Sep 2005 14:59:41 -0000 1.6 *************** *** 20,24 **** * Class: thyListBox * ! * This is the ListBox Element, derivate from thyGridPanel. * * The *thyListBox* permits the user to do all things a common ListBox --- 20,24 ---- * Class: thyListBox * ! * This is the ListBox Element, derivate from thyGrid. * * The *thyListBox* permits the user to do all things a common ListBox *************** *** 250,254 **** p.search = function (str) { ! return this.searchColumn(str,1); } --- 250,254 ---- p.search = function (str) { ! return this.searchColumn(str,0); } Index: thygrid.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygrid.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thygrid.js 1 Sep 2005 18:15:38 -0000 1.4 --- thygrid.js 8 Sep 2005 14:59:41 -0000 1.5 *************** *** 303,308 **** for (i=1; i<nRows; i++) { ! cell = this.rows.getElementByIndex(i).getCell(col); ! if (cell.indexOf(str) != null) return i-1; } } --- 303,308 ---- for (i=1; i<nRows; i++) { ! cell = this.rows.getElementByIndex(i).getCell(col).toString(); ! if (cell.indexOf(str) != -1) return i-1; } } |