|
From: Thyamad c. <th...@us...> - 2005-09-10 18:09:11
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24494/thywidgets Modified Files: thydialogwindow.js thyformdialog.js Log Message: Commiting file additions and modification from SVN revision 1927 to 1928... Changes made by rpereira on 2005-09-10 20:24:24 +0200 (Sat, 10 Sep 2005) corresponding to SVN revision 1928 with message: - Added defaultTitle populate argument to thyFormDialog - Now Dialog buttons can be added sending just an array of numbers to setButtons method (tested) Index: thydialogwindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thydialogwindow.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thydialogwindow.js 6 Sep 2005 13:30:07 -0000 1.5 --- thydialogwindow.js 10 Sep 2005 18:09:03 -0000 1.6 *************** *** 88,92 **** for (i=0; i<buttons.length; i++) { ! if (typeof(buttons[i]) != 'object') buttons[i]['code'] = buttons[i]; btn = new thyButton(this.name+'_button'+this.buttons.length, buttons[i]['caption']) --- 88,92 ---- for (i=0; i<buttons.length; i++) { ! if (typeof(buttons[i]) != 'object') buttons[i] = { code : buttons[i] }; btn = new thyButton(this.name+'_button'+this.buttons.length, buttons[i]['caption']) Index: thyformdialog.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thyformdialog.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thyformdialog.js 1 Sep 2005 18:15:38 -0000 1.3 --- thyformdialog.js 10 Sep 2005 18:09:03 -0000 1.4 *************** *** 68,72 **** var self = this; this.dataSrc.addEventListener({ ! onwrite: function () {self.invokeEvent('savesuccess', new DynEvent('savesuccess', self));} }); } --- 68,76 ---- var self = this; this.dataSrc.addEventListener({ ! onwrite: function () ! { ! self.invokeEvent('savesuccess', new DynEvent('savesuccess', self)); ! self.close(); ! } }); } *************** *** 109,112 **** --- 113,123 ---- } + // Then check for default Title + if (data.defaultTitle) + { + this.defaultTitle = data.defaultTitle; + data.defaultTitle = null; + } + // Then check for Buttons if (data.buttons) *************** *** 198,200 **** --- 209,212 ---- this._thyDialogWindowReset(); this.dataID = null; + this.setTitle(this.defaultTitle); } |