From: Thyamad c. <th...@us...> - 2006-02-15 09:12:59
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17397/thywidgets Modified Files: thydropdownbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2801 to 2802... Changes made by vinicius on 2006-02-15 11:26:38 +0100 (Wed, 15 Feb 2006) corresponding to SVN revision 2802 with message: Index: thydropdownbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox_ie.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thydropdownbox_ie.js 15 Feb 2006 07:31:26 -0000 1.5 --- thydropdownbox_ie.js 15 Feb 2006 09:12:51 -0000 1.6 *************** *** 62,66 **** //These selected* arguments are only used when this element has not been created ! this.selectedIndex = null; this.selectedValue = null; this.selectedContent = null; --- 62,66 ---- //These selected* arguments are only used when this element has not been created ! this.selectedIndex = 0; this.selectedValue = null; this.selectedContent = null; *************** *** 184,190 **** if (!this._created) return this.selectedContent; var sel = this.contents.elm.childNodes[0]; ! if (sel[sel.selectedIndex]) { ! return sel[sel.selectedIndex].text; } } --- 184,190 ---- if (!this._created) return this.selectedContent; var sel = this.contents.elm.childNodes[0]; ! if (sel.selectedIndex >= 0 && sel.options[sel.selectedIndex]) { ! return sel.options[sel.selectedIndex].text; } } *************** *** 269,272 **** --- 269,273 ---- col.add(this.lastSelected[1],'value'); col.add(this.lastSelected[2],'content'); + return col; } *************** *** 659,663 **** this._cleanUp(); var sel = this.contents.elm.childNodes[0], j = 0; ! for (var i in cont) { --- 660,664 ---- this._cleanUp(); var sel = this.contents.elm.childNodes[0], j = 0; ! for (var i in cont) { *************** *** 667,670 **** --- 668,673 ---- sel.options.add(opt); + if (j==0) sel.selectedIndex = 0; + if (j == this.selectedIndex || cont[i][0] == this.selectedValue) sel.selectedIndex = j; j++; |