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-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++; |
From: Thyamad c. <th...@us...> - 2006-02-15 09:12:58
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17397 Modified Files: .sync_svn2cvs 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: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** .sync_svn2cvs 15 Feb 2006 07:31:25 -0000 1.73 --- .sync_svn2cvs 15 Feb 2006 09:12:51 -0000 1.74 *************** *** 1 **** ! 2798 \ No newline at end of file --- 1 ---- ! 2802 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-02-15 07:31:35
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17768 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2797 to 2798... Changes made by vinicius on 2006-02-15 09:45:10 +0100 (Wed, 15 Feb 2006) corresponding to SVN revision 2798 with message: Corrections in the thydropdownbox, to handle correctly invoked events Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** .sync_svn2cvs 13 Feb 2006 20:21:10 -0000 1.72 --- .sync_svn2cvs 15 Feb 2006 07:31:25 -0000 1.73 *************** *** 1 **** ! 2796 \ No newline at end of file --- 1 ---- ! 2798 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-02-15 07:31:35
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17768/thywidgets Modified Files: thydropdownbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2797 to 2798... Changes made by vinicius on 2006-02-15 09:45:10 +0100 (Wed, 15 Feb 2006) corresponding to SVN revision 2798 with message: Corrections in the thydropdownbox, to handle correctly invoked events Index: thydropdownbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox_ie.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thydropdownbox_ie.js 2 Feb 2006 21:50:25 -0000 1.4 --- thydropdownbox_ie.js 15 Feb 2006 07:31:26 -0000 1.5 *************** *** 67,71 **** this.defaultValue = null; ! this.lastSelected = null; this.popcontents = [ ]; --- 67,71 ---- this.defaultValue = null; ! this.lastSelected = [0,null,null]; this.popcontents = [ ]; *************** *** 79,82 **** --- 79,84 ---- }); + this.hidden = { }; + /* Essa classe deve ter os eventos onselect e onchange *************** *** 94,98 **** --- 96,105 ---- p.initThyDropDownBox = function() { + var self = this; this.contents.elm.childNodes[0]._dynobj = this; + this.contents.elm.childNodes[0].onchange = function(){ + self.invokeEvent('select', new DynEvent('select', self)); + self.invokeEvent('change', new DynEvent('change', self)); + } } *************** *** 217,221 **** p.getLastSelectedIndex = function () { ! return this.lastSelected[0]; } --- 224,232 ---- p.getLastSelectedIndex = function () { ! if (this.lastSelected[0]) ! { ! return this.lastSelected[0]; ! } ! return this.getSelectedIndex();; } *************** *** 228,232 **** p.getLastSelectedValue = function () { ! return this.lastSelected[1]; } --- 239,246 ---- p.getLastSelectedValue = function () { ! if (this.lastSelected[1]) ! { ! return this.lastSelected[1]; ! } } *************** *** 364,368 **** p.hideOption = function(params) { ! /* TODO implement this in IE */ } --- 378,398 ---- p.hideOption = function(params) { ! var options = this.contents.elm.childNodes[0].options, i; ! if (params.value) ! { ! for (i=0; i<options.length;) ! { ! if (options[i].value == params.value) ! { ! this.hidden[params.value] = options[i]; ! options[i] = null; ! return; ! } ! else ! { ! i++; ! } ! } ! } } *************** *** 381,385 **** p.showOption = function(params) { ! /* TODO implement this in IE */ } --- 411,420 ---- p.showOption = function(params) { ! var options = this.contents.elm.childNodes[0].options, i; ! if (params.value && this.hidden[params.value]) ! { ! options.add(this.hidden[params.value]); ! delete this.hidden[params.value]; ! } } *************** *** 498,512 **** this.popcontents = contents; } this._updateDOMElement(); } - //Fica dentro do _updateDOMElement - /* - if (this.dropSelected != oldSelected) - { - this.lastSelected = oldSelected; - this.invokeEvent('change', new DynEvent('change', this)); - }*/ } --- 533,541 ---- this.popcontents = contents; } + this.hidden = { }; this._updateDOMElement(); } } *************** *** 603,606 **** --- 632,636 ---- p._updateDOMElement = function() { + var oldSelected = [this.selectedIndex,this.selectedValue,this.selectedContent ]; var cont = this.popcontents; if (!this._created) *************** *** 641,645 **** } ! //ver se teve changes e chamar o metodo onchange } --- 671,679 ---- } ! if (this.selectedIndex != oldSelected[0]) ! { ! this.lastSelected = oldSelected; ! this.invokeEvent('change', new DynEvent('change', this)); ! } } *************** *** 648,653 **** \*************************************************************************/ - /** VINICIUS: assignar os eventos desse objeto ao dropdown */ - p._dropDownParentChange = function() { --- 682,685 ---- |
From: Thyamad c. <th...@us...> - 2006-02-13 20:21:18
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10668 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2795 to 2796... Changes made by vinicius on 2006-02-13 22:34:15 +0100 (Mon, 13 Feb 2006) corresponding to SVN revision 2796 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** .sync_svn2cvs 11 Feb 2006 19:47:15 -0000 1.71 --- .sync_svn2cvs 13 Feb 2006 20:21:10 -0000 1.72 *************** *** 1 **** ! 2789 \ No newline at end of file --- 1 ---- ! 2796 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-02-13 20:21:18
|
Update of /cvsroot/thyapi/thyapi/thyfunctions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10668/thyfunctions Modified Files: thyajaxcontent.js Log Message: Commiting file additions and modification from SVN revision 2795 to 2796... Changes made by vinicius on 2006-02-13 22:34:15 +0100 (Mon, 13 Feb 2006) corresponding to SVN revision 2796 with message: Index: thyajaxcontent.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyfunctions/thyajaxcontent.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thyajaxcontent.js 15 Jan 2006 21:54:22 -0000 1.3 --- thyajaxcontent.js 13 Feb 2006 20:21:10 -0000 1.4 *************** *** 81,101 **** if (data.status == 'ok') { ! if (data.beforeload) { ! eval(data.beforeload); ! } ! if (self.append) ! { ! self.DOMElement.innerHTML += data.data; ! } ! else ! { ! self.DOMElement.innerHTML = data.data; } ! ! if (data.afterload) { ! eval(data.afterload); } } --- 81,108 ---- if (data.status == 'ok') { ! try { ! if (data.beforeload) ! { ! eval(data.beforeload); ! } ! if (self.append) ! { ! self.DOMElement.innerHTML += data.data; ! } ! else ! { ! self.DOMElement.innerHTML = data.data; ! } ! ! if (data.afterload) ! { ! eval(data.afterload); ! } } ! catch(e) { ! alert(e.message); } } |
From: Thyamad c. <th...@us...> - 2006-02-11 19:47:24
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8300 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2787 to 2789... Changes made by vinicius on 2006-02-11 21:59:26 +0100 (Sat, 11 Feb 2006) corresponding to SVN revision 2788 with message: PUT OUT "X" OF THYWINDOW IN IE WHILE ITS PROBLEM IS NOT SOLVED Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** .sync_svn2cvs 10 Feb 2006 02:09:15 -0000 1.70 --- .sync_svn2cvs 11 Feb 2006 19:47:15 -0000 1.71 *************** *** 1 **** ! 2787 \ No newline at end of file --- 1 ---- ! 2789 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-02-11 19:47:23
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8300/thywidgets Modified Files: thywindow_ie.js Log Message: Commiting file additions and modification from SVN revision 2787 to 2789... Changes made by vinicius on 2006-02-11 21:59:26 +0100 (Sat, 11 Feb 2006) corresponding to SVN revision 2788 with message: PUT OUT "X" OF THYWINDOW IN IE WHILE ITS PROBLEM IS NOT SOLVED Index: thywindow_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow_ie.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thywindow_ie.js 10 Feb 2006 02:09:15 -0000 1.3 --- thywindow_ie.js 11 Feb 2006 19:47:15 -0000 1.4 *************** *** 100,109 **** // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; ! this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; ! this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); ! this._thyBorderPanelAddChild(this.btnStick); ! this._thyBorderPanelAddChild(this.btnClose); this._thyBorderPanelAddChild(this.content); //this.setVisible(false); --- 100,109 ---- // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; ! /*this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);};*/ ! /*this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; */ this._thyBorderPanelAddChild(this.titleLayer); ! /*this._thyBorderPanelAddChild(this.btnStick); ! this._thyBorderPanelAddChild(this.btnClose);*/ this._thyBorderPanelAddChild(this.content); //this.setVisible(false); |
From: Thyamad c. <th...@us...> - 2006-02-10 02:09:23
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9925/thywidgets Modified Files: thywindow.js thywindow_ie.js Log Message: Commiting file additions and modification from SVN revision 2786 to 2787... Changes made by vinicius on 2006-02-10 04:20:59 +0100 (Fri, 10 Feb 2006) corresponding to SVN revision 2787 with message: window modified Index: thywindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow.js,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** thywindow.js 29 Jan 2006 23:11:23 -0000 1.10 --- thywindow.js 10 Feb 2006 02:09:15 -0000 1.11 *************** *** 90,95 **** // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; - this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; - this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); --- 90,93 ---- Index: thywindow_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow_ie.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thywindow_ie.js 29 Jan 2006 23:11:23 -0000 1.2 --- thywindow_ie.js 10 Feb 2006 02:09:15 -0000 1.3 *************** *** 101,105 **** this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; ! this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); --- 101,105 ---- this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; ! this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); |
From: Thyamad c. <th...@us...> - 2006-02-10 02:09:23
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9925 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2786 to 2787... Changes made by vinicius on 2006-02-10 04:20:59 +0100 (Fri, 10 Feb 2006) corresponding to SVN revision 2787 with message: window modified Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** .sync_svn2cvs 2 Feb 2006 21:50:24 -0000 1.69 --- .sync_svn2cvs 10 Feb 2006 02:09:15 -0000 1.70 *************** *** 1 **** ! 2771 \ No newline at end of file --- 1 ---- ! 2787 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-02-02 21:50:33
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3219/thywidgets Modified Files: thydropdownbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2770 to 2771... Changes made by vinicius on 2006-02-02 23:59:34 +0100 (Thu, 02 Feb 2006) corresponding to SVN revision 2771 with message: Index: thydropdownbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox_ie.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thydropdownbox_ie.js 28 Jan 2006 13:38:10 -0000 1.3 --- thydropdownbox_ie.js 2 Feb 2006 21:50:25 -0000 1.4 *************** *** 269,279 **** 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; } } --- 269,279 ---- p.getContentByValue = function (value) { ! var sel_opts = this.contents.elm.childNodes[0].options, i; ! for (i = 0; i<sel_opts.length; i++) { ! if (sel_opts[i].value == value) { ! return sel_opts[i].text; } } *************** *** 293,303 **** 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; } --- 293,303 ---- p.setContentByValue = function(value,content) { ! var sel_opts = this.contents.elm.childNodes[0].options, i; ! for (i = 0; i<sel_opts.length; i++) { ! if (sel_opts[i].value == value) { ! sel_opts[i].text = content; return; } |
From: Thyamad c. <th...@us...> - 2006-02-02 21:50:33
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3219 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2770 to 2771... Changes made by vinicius on 2006-02-02 23:59:34 +0100 (Thu, 02 Feb 2006) corresponding to SVN revision 2771 with message: Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** .sync_svn2cvs 29 Jan 2006 23:11:22 -0000 1.68 --- .sync_svn2cvs 2 Feb 2006 21:50:24 -0000 1.69 *************** *** 1 **** ! 2737 \ No newline at end of file --- 1 ---- ! 2771 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-29 23:11:33
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28909/thywidgets Modified Files: thydialogwindow.js thywindow.js thywindow_ie.js Log Message: Commiting file additions and modification from SVN revision 2736 to 2737... Changes made by frank on 2006-01-30 01:18:38 +0100 (Mon, 30 Jan 2006) corresponding to SVN revision 2737 with message: vinicius corrections Index: thywindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** thywindow.js 26 Jan 2006 17:58:32 -0000 1.9 --- thywindow.js 29 Jan 2006 23:11:23 -0000 1.10 *************** *** 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,49 **** function thyWindow(name,title,html) { ! this.thyBorderPanel = thyPanel; ! // this.thyBorderPanel = thyBorderPanel; this.thyBorderPanel(name); --- 44,48 ---- function thyWindow(name,title,html) { ! this.thyBorderPanel = thyBorderPanel; this.thyBorderPanel(name); *************** *** 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 }); --- 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 }); *************** *** 91,94 **** --- 90,95 ---- // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; + this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; + this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); *************** *** 132,136 **** if (data['title']) this.setTitle(data['title']); } ! /** * Method: setTitle --- 133,137 ---- if (data['title']) this.setTitle(data['title']); } ! /** * Method: setTitle *************** *** 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()) { --- 143,156 ---- { 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()) { *************** *** 163,170 **** this.titleLayer.setHTML(dynapi.functions.limitString(title,length)); } ! this.titleLayer.setHTML(dynapi.functions.limitString(title,length-3)); } ! if (!this.openned) { --- 164,171 ---- this.titleLayer.setHTML(dynapi.functions.limitString(title,length)); } ! this.titleLayer.setHTML(dynapi.functions.limitString(title,length-3)); } ! if (!this.openned) { *************** *** 205,209 **** }; ! if (!this._created) { this.onCreate(position); --- 206,210 ---- }; ! if (!this._created) { this.onCreate(position); *************** *** 213,217 **** position(); } ! this.setZIndex({topmost: true}); this.titleLayer.setZIndex({above: this}); --- 214,218 ---- position(); } ! this.setZIndex({topmost: true}); this.titleLayer.setZIndex({above: this}); *************** *** 238,242 **** this.invokeEvent('close', new DynEvent('close',this)); } ! p._thyBordePanelSetName = p.setName; /** --- 239,243 ---- this.invokeEvent('close', new DynEvent('close',this)); } ! p._thyBordePanelSetName = p.setName; /** *************** *** 254,258 **** { if (name == null || this.name == name) return; ! this._thyBorderPanelSetName(name); if (this.titleLayer) this.titleLayer.setName(name+'_title'); --- 255,259 ---- { if (name == null || this.name == name) return; ! this._thyBorderPanelSetName(name); if (this.titleLayer) this.titleLayer.setName(name+'_title'); *************** *** 284,288 **** if (this.winDragBorder) this.winDragBorder.setCSSClass(type); } ! p._thyBorderPanelAddChild = p.addChild; /** --- 285,289 ---- if (this.winDragBorder) this.winDragBorder.setCSSClass(type); } ! p._thyBorderPanelAddChild = p.addChild; /** *************** *** 308,312 **** this.content.removeChild(c); } ! /** * Method: getInnerHTML --- 309,313 ---- this.content.removeChild(c); } ! /** * Method: getInnerHTML *************** *** 375,379 **** else this.stick(); } ! /*************************************************************************\ * Private Methods * --- 376,380 ---- else this.stick(); } ! /*************************************************************************\ * Private Methods * *************** *** 398,402 **** var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; ! var w = dynapi.document.getWidth(); var h = dynapi.document.getHeight(); --- 399,403 ---- var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; ! var w = dynapi.document.getWidth(); var h = dynapi.document.getHeight(); *************** *** 412,416 **** var i; ! for (i in positions_x) { --- 413,417 ---- var i; ! for (i in positions_x) { *************** *** 434,438 **** positions_y[thyWin.name] = new Object(); } ! positions_x[thyWin.name][x] = x; positions_y[thyWin.name][y] = y; --- 435,439 ---- positions_y[thyWin.name] = new Object(); } ! positions_x[thyWin.name][x] = x; positions_y[thyWin.name][y] = y; *************** *** 459,463 **** delete positions_x[thyWin.name]; } ! if (positions_y[thyWin.name]) { --- 460,464 ---- delete positions_x[thyWin.name]; } ! if (positions_y[thyWin.name]) { *************** *** 478,482 **** this._thyBorderPanel_destroy(); } ! p._thyBorderPanel_addCSSClass = p._addCSSClass; /** --- 479,483 ---- this._thyBorderPanel_destroy(); } ! p._thyBorderPanel_addCSSClass = p._addCSSClass; /** *************** *** 494,498 **** { this._thyBorderPanel_addCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._addCSSClass(cssClass+'_title'); --- 495,499 ---- { this._thyBorderPanel_addCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._addCSSClass(cssClass+'_title'); *************** *** 503,507 **** } } ! p._thyBorderPanel_removeCSSClass = p._removeCSSClass; /** --- 504,508 ---- } } ! p._thyBorderPanel_removeCSSClass = p._removeCSSClass; /** *************** *** 519,523 **** { this._thyBorderPanel_removeCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._removeCSSClass(cssClass+'_title'); --- 520,524 ---- { this._thyBorderPanel_removeCSSClass(cssClass); ! if (this.titleLayer) { this.titleLayer._removeCSSClass(cssClass+'_title'); Index: thydialogwindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydialogwindow.js,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** thydialogwindow.js 10 Sep 2005 18:09:03 -0000 1.6 --- thydialogwindow.js 29 Jan 2006 23:11:23 -0000 1.7 *************** *** 41,46 **** --- 41,49 ---- this.buttons = []; this.buttonLayer = new thyPanel(this.name+'_buttons'); + this.buttonLayer.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; + this.addCSSClass('thyDialogWindow'); + /*this.addChild(this.buttonLayer); */ this._thyBorderPanelAddChild(this.buttonLayer); Index: thywindow_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow_ie.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thywindow_ie.js 27 Jan 2006 10:29:36 -0000 1.1 --- thywindow_ie.js 29 Jan 2006 23:11:23 -0000 1.2 *************** *** 100,103 **** --- 100,105 ---- // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; + this.btnStick.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; + this.btnClose.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); |
From: Thyamad c. <th...@us...> - 2006-01-29 23:11:33
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28909 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2736 to 2737... Changes made by frank on 2006-01-30 01:18:38 +0100 (Mon, 30 Jan 2006) corresponding to SVN revision 2737 with message: vinicius corrections Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** .sync_svn2cvs 29 Jan 2006 14:22:05 -0000 1.67 --- .sync_svn2cvs 29 Jan 2006 23:11:22 -0000 1.68 *************** *** 1 **** ! 2731 \ No newline at end of file --- 1 ---- ! 2737 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-29 23:11:33
|
Update of /cvsroot/thyapi/thyapi/thythemes/concisus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28909/thythemes/concisus Modified Files: 41thywindow.css Log Message: Commiting file additions and modification from SVN revision 2736 to 2737... Changes made by frank on 2006-01-30 01:18:38 +0100 (Mon, 30 Jan 2006) corresponding to SVN revision 2737 with message: vinicius corrections Index: 41thywindow.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thythemes/concisus/41thywindow.css,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 41thywindow.css 27 Jan 2006 09:32:59 -0000 1.5 --- 41thywindow.css 29 Jan 2006 23:11:23 -0000 1.6 *************** *** 40,44 **** { color: #FFF; ! font-style: none; font-weight: bold; font-size: 10pt; --- 40,44 ---- { color: #FFF; ! font-style: normal; font-weight: bold; font-size: 10pt; |
From: Thyamad c. <th...@us...> - 2006-01-29 23:11:33
|
Update of /cvsroot/thyapi/thyapi/thythemes/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28909/thythemes/thyapi Modified Files: 41thywindow.css Log Message: Commiting file additions and modification from SVN revision 2736 to 2737... Changes made by frank on 2006-01-30 01:18:38 +0100 (Mon, 30 Jan 2006) corresponding to SVN revision 2737 with message: vinicius corrections Index: 41thywindow.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thythemes/thyapi/41thywindow.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 41thywindow.css 27 Jan 2006 09:32:59 -0000 1.4 --- 41thywindow.css 29 Jan 2006 23:11:23 -0000 1.5 *************** *** 32,36 **** { color: #555; ! font-style: none; font-weight: bold; font-size: 10pt; --- 32,36 ---- { color: #555; ! font-style: normal; font-weight: bold; font-size: 10pt; |
From: Thyamad c. <th...@us...> - 2006-01-29 14:22:43
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11150/thywidgets Modified Files: thygrid.js thylistbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2730 to 2731... Changes made by vinicius on 2006-01-29 16:29:22 +0100 (Sun, 29 Jan 2006) corresponding to SVN revision 2731 with message: enhancements in thylistbox_ie Index: thylistbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox_ie.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thylistbox_ie.js 28 Jan 2006 15:12:48 -0000 1.2 --- thylistbox_ie.js 29 Jan 2006 14:22:05 -0000 1.3 *************** *** 41,45 **** this.addCSSClass('thyListBox'); - /*this.contents.addCSSClass(this.name); */ this.onPreCreate(this.preInitThyListBox); --- 41,44 ---- *************** *** 265,269 **** for (i in selarr) { ! selectedNames.push(selarr[i].n); } return selectedNames; --- 264,268 ---- for (i in selarr) { ! selectedNames.push(selarr[i].t); } return selectedNames; *************** *** 304,308 **** retrow = new thyCollection(); retrow.add(selarr[i].v); ! retrow.add(selarr[i].n); retcol.add(retrow); } --- 303,307 ---- retrow = new thyCollection(); retrow.add(selarr[i].v); ! retrow.add(selarr[i].t); retcol.add(retrow); } *************** *** 312,315 **** --- 311,350 ---- p.getSelectedRows = p.getSelected; + /** + * Method: getAllRows + * + * Return a <thyCollection> with other <thyCollections> containing + * the elements of the entire <thyGrid> + * + */ + p.getAllRows = function() + { + var selopt = this.contents.elm.childNodes[0].options, i; + var retcol = new thyCollection(), retrow; + + for (i=0;i<selopt.length;i++) + { + retrow = new thyCollection(); + retrow.add(selopt[i].value); + retrow.add(selopt[i].text); + retcol.add(retrow); + } + return retcol; + } + + /** + * Method: getRowsCount + * + * Returns the number of rows in ListBox + * + */ + p.getRowsCount = function() + { + return this.contents.elm.childNodes[0].options.length; + } + + p.getRow = function() + { + } /** *************** *** 337,341 **** /** ! * Method: search * * Searches for a specified string inside values column --- 372,376 ---- /** ! * Method: searchColumn * * Searches for a specified string inside values column *************** *** 344,359 **** * * str - The string to be searched for * * Returns: the row index */ ! p.search = function (str) { var selopt = this.contents.elm.childNodes[0].options, i; for (i=0;i<selopt.length;i++) { ! if (selopt[i].value.indexOf(str) != -1) { ! return i; } } --- 379,431 ---- * * str - The string to be searched for + * col - The column index + * pos - position desired of match. If not specified search for matches in any position * * Returns: the row index */ ! p.searchColumn = function (str,col,pos) { + var typ; + if (col == 0 || col == null) { typ = 'value'; } + else { typ = 'text'; } + var selopt = this.contents.elm.childNodes[0].options, i; for (i=0;i<selopt.length;i++) { ! if (pos == null && selopt[i][typ].indexOf(str) != -1) { return i; } ! else if (pos != null && selopt[i][typ].indexOf(str) == pos) { return i; } ! } ! } ! ! /** ! * Method: search ! * ! * Searches for a specified string inside values column ! * ! * Parameter: ! * ! * str - The string to be searched for ! * ! * Returns: the row index ! */ ! p.search = function (str) ! { ! return this.searchColumn(str,0); ! } ! ! p.removeSelectedRows = function() ! { ! var selopt = this.contents.elm.childNodes[0].options, i; ! ! for (i=0; i<selopt.length;) ! { ! if (selopt[i].selected) ! { ! selopt[i] = null; ! } ! else { ! i++; } } *************** *** 363,366 **** --- 435,463 ---- + /** + * Method: sweepOutAll + * + * Sweeps out all the selected values and indexes, as well as the content + * + * The format of output object can be used as populate data for this same + * component + */ + p.sweepOutAll = function() + { + var selopt = this.contents.elm.childNodes[0].options, i, contentRows = [ ]; + + for (i=0; i<selopt.length;i++) + { + contentRows.push([selopt[i].value, selopt[i].text]); + } + + var data = { + selectedValues: this.getSelectedValues(), + rows: contentRows + }; + + return data; + } + /*************************************************************************\ * Group: Private Methods * *************** *** 437,481 **** */ p._populateContents = function (data) ! {/* ! var i, j, row, cell; ! ! if (!data.selectedValues || data.rows) ! { ! var rows; ! if (data.rows) rows = data.rows; ! else rows = data; ! ! this.cleanUp(); ! ! for (i = 0; i<rows.length; i++) ! { ! if (typeof(rows[i]) != 'object') rows[i] = [rows[i]]; ! row = new thyCollection('Row'+i); ! ! for (j=0; j<rows[i].length; j++) ! { ! row.add(rows[i][j],'Cell'+i+j); ! } ! this.appendRow(row); ! } ! } ! ! if (data.selectedValues) ! { ! var values = data.selectedValues; ! var nValues = data.selectedValues.length; ! var nRows = this.getRowsCount(); ! ! for (i=0; i<nValues; i++) ! { ! for (j=0; j<nRows; j++) ! { ! if (this.getRowElement(j).getCellElement(0).sweepOut() == values[i]) ! this.getRowElement(j).select(); ! } ! } ! }*/ ! ! if (typeof(data) == 'number') { --- 534,538 ---- */ p._populateContents = function (data) ! { if (typeof(data) == 'number') { *************** *** 618,622 **** { if (optlist[selvalues[j]]) { optlist[selvalues[j]].selected = true; } - else { optlist[selvalues[j]].selected = false; } } } --- 675,678 ---- Index: thygrid.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thygrid.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** thygrid.js 20 Jan 2006 01:26:12 -0000 1.9 --- thygrid.js 29 Jan 2006 14:22:05 -0000 1.10 *************** *** 73,77 **** this.gridContents = new thyGridContents(name+'_contents_table'); - this.rows = new thyVisualCollection(this.name+'_rowsCollection', this.gridContents); this.rowClasses = new thyCollection(); --- 73,76 ---- *************** *** 287,294 **** --- 286,297 ---- * Searches for a specified string in the specified column * + * This search returns the index of the rows that matches with the + * specified string, being this string the whole content or a substring + * * Parameters: * * str - The string to be searched for * col - The column index + * pos - position desired of match. If not specified search for matches in any position * * Returns: *************** *** 297,301 **** * */ ! p.searchColumn = function (str, col) { var i,content,cell,nRows = this.rows.getElementsCount(); --- 300,304 ---- * */ ! p.searchColumn = function (str, col, pos) { var i,content,cell,nRows = this.rows.getElementsCount(); *************** *** 304,308 **** { cell = this.rows.getElementByIndex(i).getCell(col).toString(); ! if (cell.indexOf(str) != -1) return i-1; } } --- 307,312 ---- { cell = this.rows.getElementByIndex(i).getCell(col).toString(); ! if (pos != null && cell.indexOf(str) == pos) { return i-1; } ! else if (pos == null && cell.indexOf(str) != -1) { return i-1; } } } |
From: Thyamad c. <th...@us...> - 2006-01-29 14:22:17
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11150 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2730 to 2731... Changes made by vinicius on 2006-01-29 16:29:22 +0100 (Sun, 29 Jan 2006) corresponding to SVN revision 2731 with message: enhancements in thylistbox_ie Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** .sync_svn2cvs 28 Jan 2006 15:12:47 -0000 1.66 --- .sync_svn2cvs 29 Jan 2006 14:22:05 -0000 1.67 *************** *** 1 **** ! 2730 \ No newline at end of file --- 1 ---- ! 2731 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-28 15:13:03
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9189/thywidgets Modified Files: thylistbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2729 to 2730... Changes made by vinicius on 2006-01-28 17:19:18 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2730 with message: update of thylistbox_ie bug correciton in css Index: thylistbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox_ie.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thylistbox_ie.js 28 Jan 2006 13:38:10 -0000 1.1 --- thylistbox_ie.js 28 Jan 2006 15:12:48 -0000 1.2 *************** *** 41,45 **** this.addCSSClass('thyListBox'); ! this.contents.addCSSClass(this.name); this.onPreCreate(this.preInitThyListBox); --- 41,45 ---- this.addCSSClass('thyListBox'); ! /*this.contents.addCSSClass(this.name); */ this.onPreCreate(this.preInitThyListBox); *************** *** 360,363 **** --- 360,365 ---- } + p.setSelectCellSelectRow = function() { }; + /*************************************************************************\ *************** *** 483,487 **** if (typeof(data) == 'object') { ! this.popcontents = contents; this._updateDOMElement(); } --- 485,489 ---- if (typeof(data) == 'object') { ! this.popcontents = data; this._updateDOMElement(); } |
From: Thyamad c. <th...@us...> - 2006-01-28 15:13:03
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9189/ext Modified Files: packages.js Log Message: Commiting file additions and modification from SVN revision 2729 to 2730... Changes made by vinicius on 2006-01-28 17:19:18 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2730 with message: update of thylistbox_ie bug correciton in css Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** packages.js 28 Jan 2006 13:38:10 -0000 1.16 --- packages.js 28 Jan 2006 15:12:48 -0000 1.17 *************** *** 139,144 **** 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']); } --- 139,146 ---- 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_ie.js', ['thyLabelPanel']); ! l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox_ie.js', ['thyLabelPanel']); ! /*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-28 15:13:03
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9189 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2729 to 2730... Changes made by vinicius on 2006-01-28 17:19:18 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2730 with message: update of thylistbox_ie bug correciton in css Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** .sync_svn2cvs 28 Jan 2006 13:38:10 -0000 1.65 --- .sync_svn2cvs 28 Jan 2006 15:12:47 -0000 1.66 *************** *** 1 **** ! 2728 \ No newline at end of file --- 1 ---- ! 2730 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-28 13:38:22
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13437 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2727 to 2728... Changes made by vinicius on 2006-01-28 15:45:02 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2728 with message: Listbox with select multiple for IE Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** .sync_svn2cvs 27 Jan 2006 10:29:35 -0000 1.64 --- .sync_svn2cvs 28 Jan 2006 13:38:10 -0000 1.65 *************** *** 1 **** ! 2725 \ No newline at end of file --- 1 ---- ! 2728 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2006-01-28 13:38:22
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13437/thywidgets Modified Files: thydropdownbox_ie.js thylistbox.js Added Files: thylistbox_ie.js Log Message: Commiting file additions and modification from SVN revision 2727 to 2728... Changes made by vinicius on 2006-01-28 15:45:02 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2728 with message: Listbox with select multiple for IE --- NEW FILE: thylistbox_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Drop-Down Combo Box Element * * http://www.thyamad.com * * * * Copyright (C) 2005, 2006 - Raphael Derosso Pereira, 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: thyListBox * * This is the ListBox Element, that uses a selectbox multiple * */ function thyListBox(name,label) { this.thyLabelPanel = thyLabelPanel; this.thyLabelPanel(name,label); // Atributes this.containerWindow = null; //These selected* arguments are only used when this element has not been created this.selectedIndex = null; this.selectedValue = null; this.selectedContent = null; /* in thylistbox_ie */ this.popcontents = { }; this.addCSSClass('thyListBox'); this.contents.addCSSClass(this.name); this.onPreCreate(this.preInitThyListBox); this.onCreate(this.initThyListBox); this.addEventListener({ onparentchange: this._dropDownParentChange() }); /* Essa classe deve ter os eventos onselect e onchange */ } p = dynapi.setPrototype('thyListBox', 'thyLabelPanel'); /** * Method: initThyListBox * * Initialization Method * */ p.initThyListBox = function() { this.contents.elm.childNodes[0]._dynobj = this; } /** * Method: preInitThyListBox * * Initialization method executed right before element creation * */ p.preInitThyListBox = function() { this.contents.setRelativeness(false); this.setHTML(['<select multiple ', '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: getContentByValue * * Returns the associated content with the specified value * * Parameter: * * value - The value associated with the needed content * */ p.getContentByValue = function (value) { var opt = this._getOptionByValue(value); if (opt) { return opt.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 opt = this._getOptionByValue(value); if (opt) { opt.text = content; } } p._thyLabelPanelAddChild = p.addChild; /** * Method: addChild * * Overloaded method that prevents the insertion of children in <thyListBox> * */ p.addChild = function () { throw({result: 'No meaning on adding child to thyListBox', location:'thyListBox.addChild'}); } p._thyLabelPanelRemoveChild = p.removeChild; /** * Method: removeChild * * Overloaded method that prevents the removal of children of <thyListBox> * */ p.removeChild = function () { throw({result: 'No meaning on adding child to thyListBox', location:'thyListBox.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: reset * * Resets dropdown to defaultValue * */ p.reset = function () { var selopts = this.contents.elm.childNodes[0].options, i; for (i=0;i<selopts.length;i++) { selopts[i].selected = false; } } /** * Method: appendRow * * Method that garantees if the user sends just one field for each roll, * they will be assumed as contents and their values will be set to null * * viniciuscb: why null???? */ p.appendRow = function(row) { var nCells = row.getElementsCount(); if (!this._created) { if (!this.popcontents.rows) { this.popcontents.rows = []; } var insrow = [], i; for (i=0;i<nCells;i++) { insrow.push(row.getElementByIndex(i)); } this.popcontents.rows.push(insrow); return; } opt = document.createElement('option'); sel = this.contents.elm.childNodes[0]; if (nCells < 2) { opt.value = null; opt.text = row.i(0); } else { opt.value = row.i(0); opt.text = row.i(1); } sel.options.add(opt); } p.insertRow = p.appendRow; /** * Method: getSelectedValues * * Returns an array with the values of the selected rows * */ p.getSelectedValues = function() { var selarr = this._getSelectedArray(), selectedValues = [], i; for (i in selarr) { selectedValues.push(selarr[i].v); } return selectedValues; } /** * Method: getSelectedNames * * Returns an array with the names (captions) of the selected rows * */ p.getSelectedNames = function() { var selarr = this._getSelectedArray(), selectedNames = [], i; for (i in selarr) { selectedNames.push(selarr[i].n); } return selectedNames; } /** * Method: getSelectedIndexes * * Returns an array with the indexes of the selected rows * */ p.getSelectedIndexes = function() { var selarr = this._getSelectedArray(), selectedIndexes = [], i; for (i in selarr) { selectedIndexes.push(selarr[i].i); } return selectedIndexes; } /** * Method: getSelected * * Returns all selected informations * * See <thyGrid::getSelectedRows> for more information * */ p.getSelected = function() { var selarr = this._getSelectedArray(), i; var retcol = new thyCollection(), retrow; for (i in selarr) { retrow = new thyCollection(); retrow.add(selarr[i].v); retrow.add(selarr[i].n); retcol.add(retrow); } return retcol; } p.getSelectedRows = p.getSelected; /** * Method: removeSelected * * Removes all selected rows * * See <thyGrid::removeSelectedRows> for more information * */ p.removeSelected = function() { var selopt = this.contents.elm.childNodes[0].options, i; for (i=0; i< selopt.length; i++) { if (selopt[i].selected) { selopt[i] = null; } } return ret; } /** * Method: search * * Searches for a specified string inside values column * * Parameter: * * str - The string to be searched for * * Returns: the row index */ p.search = function (str) { var selopt = this.contents.elm.childNodes[0].options, i; for (i=0;i<selopt.length;i++) { if (selopt[i].value.indexOf(str) != -1) { return i; } } } /*************************************************************************\ * Group: Private Methods * \*************************************************************************/ p._addOption = function(value,content) { if (!value && !content) return; var sel = this.contents.elm.childNodes[0]; var opt = document.createElement('option'); opt.value = value; opt.text = content; sel.options.add(opt); } 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); } } p.removeAllRows = p.cleanUp; p._thyLabelPanel_setDisabled = p._setDisabled; /** * Method: _setDisabled * * Executed when non-private <thyPanel> setDisabled method is called * */ p._setDisabled = function () { this._thyLabelPanel_setDisabled(); if (!this._created) return; this.contents.elm.childNodes[0].setAttribute('disabled', ''); this.contents.elm.childNodes[0].disabled = this.disabled; } /** * Method: _populateContents * * Sets the contents of the <thyListBox>. This is the same populate as * <thyListBox>::populate, so pass correct formated data. * * Parameter: * * data - The <thyListBox> possible values * */ p._populateContents = function (data) {/* var i, j, row, cell; if (!data.selectedValues || data.rows) { var rows; if (data.rows) rows = data.rows; else rows = data; this.cleanUp(); for (i = 0; i<rows.length; i++) { if (typeof(rows[i]) != 'object') rows[i] = [rows[i]]; row = new thyCollection('Row'+i); for (j=0; j<rows[i].length; j++) { row.add(rows[i][j],'Cell'+i+j); } this.appendRow(row); } } if (data.selectedValues) { var values = data.selectedValues; var nValues = data.selectedValues.length; var nRows = this.getRowsCount(); for (i=0; i<nValues; i++) { for (j=0; j<nRows; j++) { if (this.getRowElement(j).getCellElement(0).sweepOut() == values[i]) this.getRowElement(j).select(); } } }*/ if (typeof(data) == 'number') { data = {index: data}; } if (typeof(data) == 'object') { this.popcontents = contents; this._updateDOMElement(); } } /** * Method: _sweepOutContents * * Gets the value that was selected by the user. * */ p._sweepOutContents = function () { var data = { selectedValues: this.getSelectedValues(), selectedIndexes: this.getSelectedIndexes() }; return data; } 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.rows, 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() { if (!this._created) return; var cont = this.popcontents.rows; var selvalues = this.popcontents.selectedValues ; this.cleanUp(); var sel = this.contents.elm.childNodes[0], j = 0, optlist = { }; for (var i in cont) { var opt = this.parent.doc.createElement('option'); if (cont[i].length == 1) { opt.value = null; opt.text = cont[i][0]; } else { opt.value = cont[i][0]; opt.text = cont[i][1]; } sel.options.add(opt); optlist[opt.value] = cont[i][0]; } if (selvalues) { for (j in selvalues) { if (optlist[selvalues[j]]) { optlist[selvalues[j]].selected = true; } else { optlist[selvalues[j]].selected = false; } } } } /** * Method: _getSelectedArray * * Returns an array with the selected elements * * Format of the returned array: an array, where each element is an object * with the atributes 'i' (index), 'v' (value) and 'n' (name/caption) */ p._getSelectedArray = function() { var selopt = this.contents.elm.childNodes[0].options, ret = [ ], i, j=0; for (i=0; i<selopt.length; i++) { if (selopt[i].selected) { ret.push({ i: j, v: selopt[i].value, t: selopt[i].text}); } j++; } return ret; } /** * Method: _getElementWithValue * * Returns an OPTION element with the respective value given */ p._getOptionByValue = function(value) { var selopt = this.contents.elm.childNodes[0].options, i; for (i=0; i< selopt.length; i++) { if (selopt[i].value == value) { return selopt[i]; } } } /*************************************************************************\ * Group: Events Methods * \*************************************************************************/ /** VINICIUS: assignar os eventos desse objeto ao dropdown */ p._dropDownParentChange = function() { var self = this; return function() { if (self.parent && self.parent._attachWindowed) { self.parent._attachWindowed(self); } else { self.containerWindow = null; } } } /****************************************************************************\ * Group: Misc Operations * \****************************************************************************/ Index: thylistbox.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thylistbox.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** thylistbox.js 26 Jan 2006 16:25:36 -0000 1.8 --- thylistbox.js 28 Jan 2006 13:38:10 -0000 1.9 *************** *** 164,168 **** /** ! * Method: getSelectedValues * * Returns an array with the names (captions) of the selected rows --- 164,168 ---- /** ! * Method: getSelectedNames * * Returns an array with the names (captions) of the selected rows *************** *** 328,333 **** p._sweepOutContents = function () { - var selRows = this.getSelectedRows(); - var i,nRows = selRows.length(); var data = { selectedValues: this.getSelectedValues(), --- 328,331 ---- Index: thydropdownbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox_ie.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** thydropdownbox_ie.js 27 Jan 2006 10:29:35 -0000 1.2 --- thydropdownbox_ie.js 28 Jan 2006 13:38:10 -0000 1.3 *************** *** 396,409 **** } - /** - * Method: hide - * - * Hides - */ - p.hide = function() - { - - } - /*************************************************************************\ --- 396,399 ---- |
From: Thyamad c. <th...@us...> - 2006-01-28 13:38:22
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13437/ext Modified Files: packages.js Log Message: Commiting file additions and modification from SVN revision 2727 to 2728... Changes made by vinicius on 2006-01-28 15:45:02 +0100 (Sat, 28 Jan 2006) corresponding to SVN revision 2728 with message: Listbox with select multiple for IE Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** packages.js 27 Jan 2006 10:29:35 -0000 1.15 --- packages.js 28 Jan 2006 13:38:10 -0000 1.16 *************** *** 130,133 **** --- 130,135 ---- l.add('thyapi.thywidgets.thyGridContents', 'thygridcontents_ie.js', ['thyPanel']); l.add('thyapi.thywidgets.thyGrid', 'thygrid_ie.js', ['thyGridContents','thyLabelPanel','thyGridCell','thyGridRow','thyVisualCollection']); + l.add('thyapi.thywidgets.thyListBox', 'thylistbox_ie.js', ['thyLabelPanel']); + l.add('thyapi.thywidgets.thyDropDownBox', 'thydropdownbox_ie.js', ['thyLabelPanel']); } else *************** *** 137,151 **** 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']); ! 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']); --- 139,146 ---- 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']); } + l.add('thyapi.thywidgets.thyAbout', 'thyabout.js', ['thyWindow','thyPanel']); |
From: Thyamad c. <th...@us...> - 2006-01-27 10:29:46
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2439/thywidgets Modified Files: thydropdownbox_ie.js thypanel.js Added Files: thywindow_ie.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: thypanel.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thypanel.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thypanel.js 1 Sep 2005 18:15:38 -0000 1.5 --- thypanel.js 27 Jan 2006 10:29:35 -0000 1.6 *************** *** 1126,1129 **** --- 1126,1154 ---- } + /** + * Method: _attachWindowed + * + * Attach a windowed control (eg. components that have select or iframe) + * to the nearest parent windowed container + * + * This is used to disable components unsensitive to z-indexes, + * http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/select.asp + * + * Author: Vinicius Cubas Brand + */ + p._attachWindowed = function(element) + { + if (this.windowedContainer) + { + if (!this.windowedElements) this.windowedElements = [ ]; + this.windowedElements.push(element); + element.containerWindow = this; + } + else if (this.parent && this.parent._attachWindowed) + { + this.parent._attachWindowed(element); + } + } + /*************************************************************************\ * Events * *************** *** 1139,1142 **** --- 1164,1168 ---- p.onmouseover = function (e) { + /* Viniciuscb: ripped out for performance. Thanks to JRmiron var actual; if (!this.cssClasses || (actual = this.cssClasses[this.cssActualSelection]) == null) return; *************** *** 1145,1148 **** --- 1171,1175 ---- this.cssExtraClasses['onmouseover'] = extra ; this.setCSSClass(this.cssActualSelection); + */ } *************** *** 1156,1163 **** --- 1183,1192 ---- p.onmouseout = function (e) { + /* Viniciuscb: ripped out for performance. Thanks to JRmiron var actual; if (!this.cssClasses || (actual = this.cssClasses[this.cssActualSelection]) == null) return; delete this.cssExtraClasses['onmouseover']; this.setCSSClass(this.cssActualSelection); + */ } --- NEW FILE: thywindow_ie.js --- /***************************************************************************\ * ThyAPI - Thyamad Javascript API - Window Element * * http://www.thyamad.com * * * * Copyright (C) 2005 - Raphael Derosso Pereira * * 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: 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. * * CSS classes: * * - .thyWindow_title * - .thyWindow_contents * - .thyWindow_btnClose * - .thyWindow_btnStick * - .thyWindow_ondrag * * - .<object name>_title * - .<object name>_contents * - .<object name>_btnClose * - .<object name>_btnStick * - .<object name>_ondrag * * Author: * * Raphael Derosso Pereira <rap...@us...> * */ function thyWindow(name,title,html) { this.thyBorderPanel = thyBorderPanel; this.thyBorderPanel(name); //adds this window to the list of windows if (!dynapi.document._thyWindowInstances) { dynapi.document._thyWindowInstances = { }; } dynapi.document._thyWindowInstances[this.name] = this ; //Class Atribute /* this manages windowed atributes in ie (selectbox), making them disapear when window is not focused */ this.windowedContainer = true; this.windowedElements = [ ]; // Attributes this.openned = false; this.sticked = false; this.focused = false; this.title = title || this.name; this.html = html; this.content = new thyPanel(this.name+'_contents',this.html); this.titleLayer = new thyPanel(this.name+'_title', this.title); this.btnClose = new thyPanel(this.name+'_btnClose'); this.btnStick = new thyPanel(this.name+'_btnStick'); this.winDragBorder = new thyPanel(this.name+'_ondrag',this.title); this.cssClasses['window'] = ['window']; this.addCSSClass('thyWindow'); this.content.cssExtraClasses = this.cssExtraClasses; this.titleLayer.cssExtraClasses = this.cssExtraClasses; // Turn Window into Draggable element this.winDragBorder.setAnchor({ topA: this.id, leftA: this.id }); this.winDragBorder.setRelativeness(false); this.winDragBorder.setDisplay(false); // Initialize Title Bar var self = this; this.titleLayer.setRelativeness(false); //this.titleLayer.setTextSelectable(false); // Initialize Close Button this.btnClose.setRelativeness(false); this.btnClose.addEventListener({ onclick: function(e){self.close()} }); // Initialize Stick Button this.btnStick.setRelativeness(false); this.btnStick.addEventListener({ onclick: function(e){self.switchStick()} }); // Initialize Content this.content.invokeEvent = function (type,e,args){dynapi.document.invokeEvent(type,e,args);}; this._thyBorderPanelAddChild(this.titleLayer); this._thyBorderPanelAddChild(this.btnStick); this._thyBorderPanelAddChild(this.btnClose); this._thyBorderPanelAddChild(this.content); //this.setVisible(false); this.setDisplay(false); this.setSize(0,0); //if (!this.thyWindow) this.onPreCreate(this.initThyWindow); this.onPreCreate(this.initThyWindow); this.onCreate(function() { }); } p = dynapi.setPrototype('thyWindow','thyBorderPanel'); /** * Method: initThyWindow * * Initialization method * */ p.initThyWindow = function () { this.setDragEnabled(true,null,true); this.setDragIcon(this.winDragBorder); //dynapi.document.addChild(this.winDragBorder); } /** * Method: populate * * Sets the title of the widow * */ p.populate = function (data) { if (data['title']) this.setTitle(data['title']); } /** * Method: setTitle * * Sets the Title of the window * */ p.setTitle = function(title) { 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()) { this.winDragBorder.setHTML(title); } else { while (w < this.titleLayer.getWidth() && length > 0) { length--; this.titleLayer.setHTML(dynapi.functions.limitString(title,length)); } this.titleLayer.setHTML(dynapi.functions.limitString(title,length-3)); } if (!this.openned) { this.setDisplay(false); this.setSize(0,0); } } /** * Method: getTitle * * Returns the actual title set * */ p.getTitle = function () { return this.titleLayer.getHTML(); } /** * Method: open * * UnHide the window * */ p.open = function() { var self = this; this.setSize('',''); this.setDisplay(true); var position = function() { var pos = thyWindow._getWindowPosition(self); self.setX(pos.x); self.setY(pos.y); }; if (!this._created) { this.onCreate(position); } else { position(); } this.setZIndex({topmost: true}); this.titleLayer.setZIndex({above: this}); this.openned = true; this.invokeEvent('open', new DynEvent('open',this)); this.focus(); } /** * Method: close * * Hides the window * */ p.close = function() { this.setDisplay(false); this.setSize(0,0); thyWindow._unsetWindowPosition(this); this.openned = false; this.invokeEvent('close', new DynEvent('close',this)); focusTopWindow(); } p._thyBordePanelSetName = p.setName; /** * Method: setName * * Overwritten method that sets the name of main, title, contents and drag border * and refreshes CSS Classes * * Parameter: * * name - The new widget name * */ p.setName = function (name) { if (name == null || this.name == name) return; this._thyBorderPanelSetName(name); if (this.titleLayer) this.titleLayer.setName(name+'_title'); if (this.content) this.content.setName(name+'_contents'); if (this.btnClose) this.btnClose.setName(name+'_btnClose'); if (this.btnStick) this.btnStick.setName(name+'_btnStick'); if (this.winDragBorder) this.winDragBorder.setName(name+'_ondrag'); } p._thyBorderPanelSetCSSClass = p.setCSSClass; /** * Method: setCSSClass * * Overwritten method that calls parent setCSSClass and also sets CSS of title, * content, buttons and drag border * * Parameter: * * type - The class type * */ p.setCSSClass = function (type) { this._thyBorderPanelSetCSSClass(type); if (this.titleLayer) this.titleLayer.setCSSClass(type); if (this.content) this.content.setCSSClass(type); if (this.btnClose) this.btnClose.setCSSClass(type); if (this.btnStick) this.btnStick.setCSSClass(type); if (this.winDragBorder) this.winDragBorder.setCSSClass(type); } p._thyBorderPanelAddChild = p.addChild; /** * Method: addChild * * Overwritten AddChild method that insert childs in contents * */ p.addChild = function (c,alias,inlineID) { this.content.addChild(c,alias,inlineID); } p._thyBorderPanelRemoveChild = p.removeChild; /** * Method: removeChild * * Overwritten RemoveChild method that removes childs from contents * */ p.removeChild = function (c) { this.content.removeChild(c); } /** * Method: getInnerHTML * * Overwritten getInnerHTML that inserts Title * * @public */ p.getInnerHTML = function() { var html=['<table border="0" id="'+this.name+'_mainHolder'+'" cellspacing="0" cellpadding="0" border="0">', '<tr><td id="'+this.name+'_t'+'" class="'+this.getCSSClasses('top')+'" colspan="3"></td></tr>', '<tr><td id="'+this.name+'_l'+'" class="'+this.getCSSClasses('left')+'"></td>', '<td id="'+this.name+'_contentHolder" class="'+this.getCSSClasses('window')+'">', /* style="position: relative">'+this._thyBorderPanelGetInnerHTML(), */ '<div style="position: relative; width: 100%; height: 100%">'+this._thyPanelGetInnerHTML()+'</div>', '</td>', '<td id="'+this.name+'_r'+'" class="'+this.getCSSClasses('right')+'"></td></tr>', '<tr><td id="'+this.name+'_b'+'" class="'+this.getCSSClasses('bottom')+'" colspan="3"></td></tr></table>'].join(''); //alert(html); return html; } /** * Method: stick * * Makes window unmovable * */ p.stick = function () { if (this.sticked) return; this.sticked = true; this.btnStick.cssExtraClasses['sticked'] = {}; this.btnStick.cssExtraClasses['sticked'][this.btnStick.cssActualSelection] = ['sticked']; this.btnStick.setCSSClass(this.btnStick.cssActualSelection); this.setDragEnabled(false); } /** * Method: unstick * * Release window for movement * */ p.unstick = function () { if (!this.sticked) return; this.sticked = false; delete this.btnStick.cssExtraClasses['sticked']; this.btnStick.setCSSClass(this.btnStick.cssActualSelection); this.setDragEnabled(true,null,true); } /** * Method: switchStick * * Change from one sticked state to another * */ p.switchStick = function () { if (this.sticked) this.unstick(); else this.stick(); } /** * Method: focus * * Makes the window gain focus */ p.focus = function() { if (this.focused) return; this.focused = true; //unfocus all other windows var winInstances = dynapi.document._thyWindowInstances; for (var i in winInstances) { if (winInstances[i] && winInstances[i] != this && winInstances[i].blur) { winInstances[i].blur(); } } //enable all dropdowns for (var i in this.windowedElements) { this.windowedElements[i].setDisplay(true); } } /** * Method: blur * */ p.blur = function() { if (!this.focused) return; this.focused = false; //disable all dropdowns for (var i in this.windowedElements) { this.windowedElements[i].setDisplay(false); } } /*************************************************************************\ * Private Methods * \*************************************************************************/ thyWindow._positions_x = new Object(); thyWindow._positions_y = new Object(); /** * Method: _getWindowPosition * * STATIC method that returns the next position to be used * by a window when opened * * Parameter: * * thyWin - The thyWindow object that will be opened * */ thyWindow._getWindowPosition = function (thyWin) { var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; var w = dynapi.document.getWidth(); var h = dynapi.document.getHeight(); var sx = dynapi.document.getXScroll(); var sy = dynapi.document.getYScroll(); var ww = thyWin.content.getWidth(); var wh = thyWin.content.getHeight(); var x = w/2 + sx - ww/2; var y = h/2 + sy - wh/2; var i; for (i in positions_x) { while (positions_x[i][x]) { x += 10; } } for (i in positions_y) { while (positions_y[i][y]) { y += 10; } } if (!positions_x[thyWin.name]) { positions_x[thyWin.name] = new Object(); positions_y[thyWin.name] = new Object(); } positions_x[thyWin.name][x] = x; positions_y[thyWin.name][y] = y; if (x<0) x=0; if (y<0) y=0; return {x:x,y:y}; } /** * Method: _unsetWindowPosition * * STATIC method that removes the position from the list * */ thyWindow._unsetWindowPosition = function (thyWin) { var positions_x = thyWindow._positions_x; var positions_y = thyWindow._positions_y; if (positions_x[thyWin.name]) { delete positions_x[thyWin.name]; } if (positions_y[thyWin.name]) { delete positions_y[thyWin.name]; } } p._thyBorderPanel_destroy = p._destroy; /** * Method: _destroy * * Overloaded method that removes winBorderPanel from memory * */ p._destroy = function () { this.winDragBorder._destroy(); this._thyBorderPanel_destroy(); } p._thyBorderPanel_addCSSClass = p._addCSSClass; /** * Method: _addCSSClass * * Overwritten method that adds the base class to main, title, contents, drag border * and buttons * * Paramenter: * * cssClass - The base class string * */ p._addCSSClass = function (cssClass) { this._thyBorderPanel_addCSSClass(cssClass); if (this.titleLayer) { this.titleLayer._addCSSClass(cssClass+'_title'); this.content._addCSSClass(cssClass+'_contents'); this.btnClose._addCSSClass(cssClass+'_btnClose'); this.btnStick._addCSSClass(cssClass+'_btnStick'); this.winDragBorder._addCSSClass(cssClass+'_ondrag'); } } p._thyBorderPanel_removeCSSClass = p._removeCSSClass; /** * Method: _removeCSSClass * * Removes the specified CSS Class from main, title, contents, drag border * and buttons * * Parameter: * * cssClass - The CSS Class to be removes * */ p._removeCSSClass = function (cssClass) { this._thyBorderPanel_removeCSSClass(cssClass); if (this.titleLayer) { this.titleLayer._removeCSSClass(cssClass+'_title'); this.content._removeCSSClass(cssClass+'_contents'); this.btnClose._removeCSSClass(cssClass+'_btnClose'); this.btnStick._removeCSSClass(cssClass+'_btnStick'); this.winDragBorder._removeCSSClass(cssClass+'_ondrag'); } } /** * Method: ondragend * * OnDragEnd Event. It switches the drag DynLayer to the Window Layer * */ p.ondragend = function(e) { this.winDragBorder.setDisplay(true); var absx = this.winDragBorder.getAbsoluteX(); var absy = this.winDragBorder.getAbsoluteY(); this.setX((absx<0)?0:absx); this.setY((absy<0)?0:absy); this.winDragBorder.setDisplay(false); this.setDisplay(true); } /** * Method: ondragstart * * OnDragStart Event. * */ p.ondragstart = function(e) { this.setDisplay(false); } /** * Method: onmousedown * * OnMouseDown Event. Change z-index of drag layer and window. * */ p.onmousedown = function(e) { if (this.focused) return; this.focus(); this.setZIndex({topmost: true}); this.winDragBorder.setZIndex({below: this}); } /** * Method: focusTopWindow * * Focuses the top window */ function focusTopWindow() { var winInstances = dynapi.document._thyWindowInstances; var topmost , topZ = -1000; for (var i in winInstances) { if (winInstances[i] && winInstances[i].openned && winInstances[i].focus && winInstances[i].getZIndex() > topZ) { topZ = winInstances[i].getZIndex(); topmost = winInstances[i]; } } if (topmost) { topmost.focus(); } } Index: thydropdownbox_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydropdownbox_ie.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thydropdownbox_ie.js 26 Jan 2006 16:25:36 -0000 1.1 --- thydropdownbox_ie.js 27 Jan 2006 10:29:35 -0000 1.2 *************** *** 3,7 **** * http://www.thyamad.com * * * ! * Copyright (C) 2005 - Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * --- 3,7 ---- * http://www.thyamad.com * * * ! * Copyright (C) 2005, 2006 - Raphael Derosso Pereira, Vinicius Cubas Brand * * Based on DynAPI v3.0b1 * * ------------------------------------------------------------------------- * *************** *** 20,26 **** * 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: --- 20,25 ---- * Class: thyDropDownBox * ! * This is the Drop Down Combo Box Element. This IE-optimized version ! * uses a select html component instead of ThyAPI components * * CSS Classes: *************** *** 60,63 **** --- 59,64 ---- // Atributes + this.containerWindow = null; + //These selected* arguments are only used when this element has not been created this.selectedIndex = null; *************** *** 74,77 **** --- 75,81 ---- this.onCreate(this.initThyDropDownBox); + this.addEventListener({ + onparentchange: this._dropDownParentChange() + }); /* *************** *** 156,160 **** * * Returns the value of the selected option - * Vinicius: refazer esta */ p.getSelectedValue = function () --- 160,163 ---- *************** *** 380,384 **** --- 383,410 ---- /* TODO implement this in IE */ } + + /** + * Method: reset + * + * Resets dropdown to defaultValue + * + */ + p.reset = function () + { + if (this.defaultValue) { this.contents.elm.childNodes[0].value = this.defaultValue; } + else { this.contents.elm.childNodes[0].selectedIndex = 0; } + } + + /** + * Method: hide + * + * Hides + */ + p.hide = function() + { + + } + /*************************************************************************\ * Group: Private Methods * *************** *** 415,427 **** } /** ! * Method: _reset * ! * Resets dropList to defaultValue * */ ! p._reset = function () { ! this.contents.elm.childNodes[0].value = this.defaultValue; } --- 441,458 ---- } + p._thyLabelPanel_setDisabled = p._setDisabled; /** ! * Method: _setDisabled * ! * Executed when non-private <thyPanel> setDisabled method is called * */ ! p._setDisabled = function () { ! this._thyLabelPanel_setDisabled(); ! ! if (!this._created) return; ! this.contents.elm.childNodes[0].setAttribute('disabled', ''); ! this.contents.elm.childNodes[0].disabled = this.disabled; } *************** *** 628,631 **** --- 659,678 ---- /** VINICIUS: assignar os eventos desse objeto ao dropdown */ + + p._dropDownParentChange = function() + { + var self = this; + return function() + { + if (self.parent && self.parent._attachWindowed) + { + self.parent._attachWindowed(self); + } + else + { + self.containerWindow = null; + } + } + } |