From: Thyamad c. <th...@us...> - 2005-08-23 13:14:43
|
Update of /cvsroot/thyapi/thyapi/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25920/ext Modified Files: debug.html debug.js functions.numeric.js functions.string.js library.js packages.js Log Message: Commiting file additions and modification from SVN revision 1841 to 1842... Changes made by vinicius on 2005-08-23 15:49:13 +0200 (Tue, 23 Aug 2005) corresponding to SVN revision 1842 with message: License file included in thyapi Index: functions.string.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/functions.string.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** functions.string.js 28 Feb 2005 00:33:48 -0000 1.1.1.1 --- functions.string.js 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 49,52 **** if(dir=='>'||dir=='<>') s=s.replace(/(\s+)$/g,''); return s; ! }; \ No newline at end of file --- 49,115 ---- if(dir=='>'||dir=='<>') s=s.replace(/(\s+)$/g,''); return s; + }; + f.limitString = function (s,max) + { + if (!s) return s; + else s+=''; + + // Do not process HTML tags \\ + var tag = new RegExp(/[<][^>]*[>]/g); + var special = new RegExp(/[&][^;]*;/g); + var m, count=0; + var tags = new Array(); + var specials = new Array(); + + var r_s = s.replace(/[<][^>]*[>]/g,'\xFE').replace(/[&][^;]*;/g,'\xFF'); ! while (m = tag.exec(s)) ! { ! tags[tags.length] = m[0]; ! max++; ! } ! ! while (m = special.exec(s)) ! { ! specials[specials.length] = m[0]; ! max += 2; ! } ! ! var i; ! var count = 0; ! var r_final = ''; ! for (i=0; i<r_s.length;i++) ! { ! if (r_s[i] == '\xFF') ! { ! r_final += r_s.charAt(i); ! } ! else if (r_s[i] == '\xFE') ! { ! r_final += r_s.charAt(i); ! count++; ! } ! else if (count <= max) ! { ! r_final += r_s.charAt(i); ! count++; ! } ! } ! ! if (count > max) ! { ! r_final += '...'; ! } ! ! for (i=0; i<tags.length; i++) ! { ! r_final = r_final.replace(/\xFE/,tags[i]); ! } ! ! for (i=0; i<specials.length; i++) ! { ! r_final = r_final.replace(/\xFF/,specials[i]); ! } ! ! return r_final; ! } Index: library.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/library.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** library.js 28 Feb 2005 00:33:48 -0000 1.1.1.1 --- library.js 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 59,63 **** var src = this.loadList[this.loadIndex]; //if (!confirm('load: '+src+' ?')) return; ! var rsrc = src + '?'+Math.random(); // random ensures cached files are not loaded var s = this.scripts[src]; if (dynapi.ua.ns4) { --- 59,65 ---- var src = this.loadList[this.loadIndex]; //if (!confirm('load: '+src+' ?')) return; ! //raphaelpereira: Why not use cached script??? ! //var rsrc = src + '?'+Math.random(); // random ensures cached files are not loaded ! var rsrc = src; var s = this.scripts[src]; if (dynapi.ua.ns4) { Index: functions.numeric.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/functions.numeric.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** functions.numeric.js 28 Feb 2005 00:33:48 -0000 1.1.1.1 --- functions.numeric.js 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 77,78 **** --- 77,83 ---- return (dt=='true'||dt>=1)? true:false; }; + + f.isNumeric = function (n) + { + var nReg = new RegExp('[-][[:digit:]]'); + } Index: debug.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/debug.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** debug.html 28 Feb 2005 00:33:49 -0000 1.1.1.1 --- debug.html 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 88,95 **** +'.textinspect{width:90px;}' +'.textreload{width:130px;}' ! +'.textprint{width:340px; height:180px;}' ! +'.textstat{width:340px;}' ! +'.texteval{width:340px;height:132px;}' ! +'.cboprev{width:340px;}' +'</style>'); } --- 88,95 ---- +'.textinspect{width:90px;}' +'.textreload{width:130px;}' ! +'.textprint{width:100%; height:100%;}' ! +'.textstat{width:100%;}' ! +'.texteval{width:100%;height:132px;}' ! +'.cboprev{width:100%;}' +'</style>'); } *************** *** 106,110 **** var s=0;h=[]; h[s++]='<form name="debugform"><div align="center"><center><font face="'+(dynapi.ua.mac?'Monaco':'Courier')+'" size="1">\n'; ! h[s++]='<table border="0" bgcolor="#EFEBDE" cellspacing="0">\n'; h[s++]='<tr><td colspan="2" bgcolor="#0033CC"><table border="0" width="100%" cellspacing="0" cellpadding="0">\n'; h[s++]='<tr><td width="50%" nowrap><b><font size="2" color="#FFFFFF" face="Arial"><span style="cursor:default"><img border="0" src="'+url+'images/debug_icon.gif" align="absmiddle" width="32" height="32"> DynAPI Debugger</span></font></b></td>\n'; --- 106,110 ---- var s=0;h=[]; h[s++]='<form name="debugform"><div align="center"><center><font face="'+(dynapi.ua.mac?'Monaco':'Courier')+'" size="1">\n'; ! h[s++]='<table border="0" bgcolor="#EFEBDE" cellpadding="0" cellspacing="0" width="100%" height="100%">\n'; h[s++]='<tr><td colspan="2" bgcolor="#0033CC"><table border="0" width="100%" cellspacing="0" cellpadding="0">\n'; h[s++]='<tr><td width="50%" nowrap><b><font size="2" color="#FFFFFF" face="Arial"><span style="cursor:default"><img border="0" src="'+url+'images/debug_icon.gif" align="absmiddle" width="32" height="32"> DynAPI Debugger</span></font></b></td>\n'; Index: packages.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/packages.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** packages.js 28 Feb 2005 00:33:49 -0000 1.1.1.1 --- packages.js 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 19,26 **** l.add('dynapi.functions.Math','functions.math.js'); l.add('dynapi.functions.Date','functions.date.js'); - l.add('dynapi.functions.Image','functions.image.js',((dynapi.ua.ns4)? 'MouseEvent':null)); // ns4 required MouseEvent for Image functions l.add('dynapi.functions.Numeric','functions.numeric.js'); l.add('dynapi.functions.String','functions.string.js'); l.add('dynapi.functions.System','functions.system.js'); // API - Core Events & DynDocument --- 19,29 ---- l.add('dynapi.functions.Math','functions.math.js'); l.add('dynapi.functions.Date','functions.date.js'); l.add('dynapi.functions.Numeric','functions.numeric.js'); l.add('dynapi.functions.String','functions.string.js'); l.add('dynapi.functions.System','functions.system.js'); + if (dynapi.ua.ns4) + l.add('dynapi.functions.Image','functions.image.js','MouseEvent'); // ns4 required MouseEvent for Image functions + else + l.add('dynapi.functions.Image','functions.image.js'); // ns4 required MouseEvent for Image functions // API - Core Events & DynDocument *************** *** 30,49 **** // DynLayer l.add('dynapi.api.DynLayerBase','dynlayer_base.js','DynDocument'); ! if (dynapi.ua.ns4) l.add('dynapi.api.DynLayer','dynlayer_ns4.js','DynLayerBase'); ! else if (dynapi.ua.ie) l.add('dynapi.api.DynLayer','dynlayer_ie.js','DynLayerBase'); ! else if (dynapi.ua.opera) l.add('dynapi.api.DynLayer','dynlayer_opera.js','DynLayerBase'); ! else l.add('dynapi.api.DynLayer','dynlayer_dom.js','DynLayerBase'); // MouseEvent ! if (dynapi.ua.ns4) l.add('dynapi.api.MouseEvent','mouse_ns4.js','DynLayer'); ! else if(dynapi.ua.ie||dynapi.ua.opera) l.add('dynapi.api.MouseEvent','mouse_ie.js','DynLayer'); ! else l.add('dynapi.api.MouseEvent','mouse_dom.js','DynLayer'); ! // Extensions ! l.addPackage('dynapi.api.ext',p+'api/ext/'); ! l.add('dynapi.api.ext.DragEvent','dragevent.js','DynDocument'); ! l.add(['dynapi.api.ext.DynKeyEvent','dynapi.api.ext.TabManager'],'dynkeyevent.js','DynLayer'); ! l.add('dynapi.api.ext.DynLayerInline','dynlayer.inline.js','DynLayer'); // FX l.addPackage('dynapi.fx',p+'fx/'); l.add('dynapi.fx.Thread','thread.js','DynLayer'); --- 33,60 ---- // DynLayer l.add('dynapi.api.DynLayerBase','dynlayer_base.js','DynDocument'); ! if (dynapi.ua.ns4) ! l.add('dynapi.api.DynLayer','dynlayer_ns4.js','DynLayerBase'); ! else if (dynapi.ua.ie) ! l.add('dynapi.api.DynLayer','dynlayer_ie.js','DynLayerBase'); ! else if (dynapi.ua.opera) ! l.add('dynapi.api.DynLayer','dynlayer_opera.js','DynLayerBase'); ! else ! l.add('dynapi.api.DynLayer','dynlayer_dom.js','DynLayerBase'); // MouseEvent ! if (dynapi.ua.ns4) ! l.add('dynapi.api.MouseEvent','mouse_ns4.js','DynLayer'); ! else if(dynapi.ua.ie|| (dynapi.ua.opera && dynapi.ua.v < 8)) ! l.add('dynapi.api.MouseEvent','mouse_ie.js','DynLayer'); ! else ! l.add('dynapi.api.MouseEvent','mouse_dom.js','DynLayer'); ! // Extensions ! l.addPackage('dynapi.api.ext',p+'api/ext/'); ! //l.add('dynapi.api.ext.DragEvent','dragevent.js','DynDocument'); ! l.add(['dynapi.api.ext.DynKeyEvent','dynapi.api.ext.TabManager'],'dynkeyevent.js','DynLayer'); ! l.add('dynapi.api.ext.DynLayerInline','dynlayer.inline.js','DynLayer'); // FX + /* l.addPackage('dynapi.fx',p+'fx/'); l.add('dynapi.fx.Thread','thread.js','DynLayer'); *************** *** 61,178 **** l.add('dynapi.fx.Swiper','swiper.js','DynLayer'); l.add('dynapi.fx.TextAnimation','textanim.js','DynLayer'); ! ! // GUI ! l.addPackage('dynapi.gui',p+'gui/'); ! l.add('dynapi.gui.BorderManager','bordermanager.js','Highlighter'); ! l.add('dynapi.gui.GroupManager','groupmanager.js','DynLayer'); ! l.add('dynapi.gui.FocusManager','focusmanager.js','DynLayer'); ! l.add('dynapi.gui.StyleManager','stylemanager.js','DynLayer'); ! l.add('dynapi.gui.TemplateManager','templmngr.js','DynLayer'); ! l.add('dynapi.gui.Frame','frame.js','Highlighter'); ! l.add('dynapi.gui.PanelBar','panelbar.js','DynLayer'); ! l.add('dynapi.gui.Label','label.js','DynLayer'); ! l.add('dynapi.gui.NodeItem','nodeitem.js','DynLayer'); ! l.add('dynapi.gui.List','list.js','Label'); ! l.add('dynapi.gui.Tree','tree.js','DynLayer'); ! // Components ! l.add('dynapi.gui.Highlighter','highlighter.js','DynLayer'); ! l.add('dynapi.gui.ImageClip','imageclip.js','DynLayer'); ! l.add('dynapi.gui.LoadPanel','loadpanel.js','DynLayer'); ! l.add('dynapi.gui.Graphics','graphics.js','DynLayer'); ! l.add('dynapi.gui.Button','button.js','ButtonStyle'); ! l.add('dynapi.gui.Knob','knob.js',['KnobStyle','DragEvent']); ! l.add('dynapi.gui.ScrollBar','scrollbar.js',['Button','Knob','ScrollBarStyle']); ! l.add('dynapi.gui.ListBox','listbox.js',['ScrollBar','PoolManager','ListBoxStyle']); ! l.add('dynapi.gui.Marquee','marquee.js','MarqueeStyle'); ! l.add('dynapi.gui.RadioButton','radiobutton.js','RadioButtonStyle'); ! l.add('dynapi.gui.CheckBox','checkbox.js','CheckBoxStyle'); ! l.add('dynapi.gui.Explorer','explorer.js','ExplorerStyle'); ! l.add('dynapi.gui.ViewPane','viewpane.js',['ScrollBar','ViewPaneStyle']); ! l.add('dynapi.gui.ProgressBar','progressbar.js','ProgressBarStyle'); ! l.add('dynapi.gui.Stacker','stacker.js','DynLayer'); ! // Component Styles ! l.add('dynapi.gui.ButtonStyle','button.style.js',['StyleManager','BorderManager']); ! l.add('dynapi.gui.ButtonFlatStyle','button.flatstyle.js',['StyleManager','BorderManager']); ! l.add('dynapi.gui.ButtonImageStyle','button.imagestyle.js','StyleManager'); ! l.add('dynapi.gui.KnobStyle','knob.style.js',['StyleManager','BorderManager']); ! l.add('dynapi.gui.ScrollBarStyle','scrollbar.style.js','StyleManager'); ! l.add('dynapi.gui.ListBoxStyle','listbox.style.js','StyleManager'); ! l.add('dynapi.gui.MarqueeStyle','marquee.style.js','StyleManager'); ! l.add('dynapi.gui.RadioButtonStyle','radiobutton.style.js','StyleManager'); ! l.add('dynapi.gui.CheckBoxStyle','checkbox.style.js','StyleManager'); ! l.add('dynapi.gui.ExplorerStyle','explorer.style.js','StyleManager'); ! l.add('dynapi.gui.ExplorerBlockStyle','explorer.block.style.js','ExplorerStyle'); ! l.add('dynapi.gui.ViewPaneStyle','viewpane.style.js',['StyleManager','BorderManager']); ! l.add('dynapi.gui.ProgressBarStyle','progressbar.style.js',['StyleManager','BorderManager']); ! // HTML Components ! l.add('dynapi.gui.HTMLButton','htmlbutton.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLComponent','htmlcomponent.js','DynElement'); ! l.add('dynapi.gui.HTMLContainer','htmlcontainer.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLCalendar','htmlcalendar.js','HTMLContainer'); ! l.add('dynapi.gui.HTMLCheckBox','htmlcheckbox.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLHyperLink','htmlhyperlink.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLRollover','htmlrollover.js',['HTMLHyperLink','Image']); ! l.add('dynapi.gui.HTMLClock','htmlclock.js','HTMLContainer'); ! l.add('dynapi.gui.HTMLMenu','htmlmenu.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLTextBox','htmltextbox.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLTextArea','htmltextarea.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLRadioButton','htmlradiobutton.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLFile','htmlfile.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLListbox','htmllistbox.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLDropDownMenu','htmldropdownmenu.js','HTMLListbox'); ! l.add('dynapi.gui.HTMLDatePicker','htmldatepicker.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLProgressBar','htmlprogressbar.js','HTMLComponent'); ! l.add('dynapi.gui.HTMLColorPicker','htmlcolorpicker.js','HTMLMenu'); ! ! // Util ! l.addPackage('dynapi.util',p+'util/'); ! l.add('dynapi.util.Cookie','cookie.js'); ! l.add('dynapi.util.IOElement','ioelement.js','DynLayer'); ! l.add('dynapi.util.IOElementSoda','ioelement.soda.js',['Math','IOElement']); ! l.add('dynapi.util.IOElementSync','ioelement.sync.js','IOElement'); ! l.add('dynapi.util.DataSource','datasource.js','IOElement'); ! l.add('dynapi.util.StringBuffer','stringbuffer.js','DynObject'); ! l.add('dynapi.util.PoolManager','poolmanager.js'); ! l.add('dynapi.util.FileReader','filereader.js','IOElementSync'); // ThyAPI Packages // ThyAPI Utils ! l.addPackage('dynapi.thyutils', p+'thyutils/'); ! l.add('dynapi.thyutils.thyProtocol','thyprotocol.js'); ! l.add('dynapi.thyutils.thyXMLRPCProtocol','thyxmlrpcprotocol.js','thyProtocol'); ! l.add('dynapi.thyutils.thyConnector','thyconnector.js', 'thyXMLRPCProtocol'); ! l.add('dynapi.thyutils.thyDataSource','thydatasource.js', ['DynElement','thyConnector']); ! l.add('dynapi.thyutils.thyCollection','thycollection.js'); //ThyAPI Widgets ! l.addPackage('dynapi.thywidgets', p+'thywidgets/'); ! l.add('dynapi.thywidgets.thyPanelBase', 'thypanel.js', ['DynLayer', 'System', 'DynKeyEvent']); ! if (dynapi.ua.ie) ! l.add('dynapi.thywidgets.thyPanel', 'thypanel_ie.js', 'thyPanelBase'); ! else if (dynapi.ua.ns4) ! l.add('dynapi.thywidgets.thyPanel', 'thypanel_ns4.js', 'thyPanelBase'); ! else if (dynapi.ua.opera) ! l.add('dynapi.thywidgets.thyPanel', 'thypanel_opera.js', 'thyPanelBase'); ! else l.add('dynapi.thywidgets.thyPanel', 'thypanel_dom.js', 'thyPanelBase'); ! l.add('dynapi.thywidgets.thyLabelPanel', 'thylabelpanel.js', 'thyPanel'); ! l.add('dynapi.thywidgets.thyBorderPanel', 'thyborderpanel.js', 'thyBorderPanel'); ! l.add('dynapi.thywidgets.thyEditBox', 'thyeditbox.js', 'thyPanel'); ! l.add('dynapi.thywidgets.thyRichTextEdit', 'thyrichtextedit.js', ['thyPanel', 'FCKeditor']); ! l.add('dynapi.thywidgets.thyButton', 'thybutton.js', 'thyPanel'); ! l.add('dynapi.thywidgets.thyWindow', 'thywindow.js', ['thyBorderPanel','thyButton','DragEvent']); ! l.add('dynapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); ! l.add('dynapi.thywidgets.thyTabsManager', 'thytabsmanager.js', 'thyPanel'); ! l.add('dynapi.thywidgets.thyGridCell', 'thygridcell.js', ['thyPanel','thyEditBox']); ! l.add('dynapi.thywidgets.thyGrid', 'thygrid.js', ['thyGridCell','thyCollection']); // ThyAPI External ! l.addPackage('dynapi.thywidgets.external', p+'thywidgets/external/'); ! l.add('dynapi.thywidgets.external.FCKeditor', 'fckeditor/fckeditor.js'); // Load buffered includes --------- if(l._buffer){ var i,ar=l._buffer; ! for(i=0;i<ar.length;i++) l.include(true,ar[i]); // pass agruments true and bufferedAgruments l._buffer=null; } --- 72,135 ---- l.add('dynapi.fx.Swiper','swiper.js','DynLayer'); l.add('dynapi.fx.TextAnimation','textanim.js','DynLayer'); ! */ // ThyAPI Packages + l.addPackage('thyapi.thybase', p+'thybase/'); + l.add('thyapi.thybase.thyBase', 'thybase.js'); + l.add('thyapi.thybase.thyDragEvent','thydragevent.js',['DynDocument', 'thyBase']); + // ThyAPI Utils ! l.addPackage('thyapi.thyutils', p+'thyutils/'); ! l.add('thyapi.thyutils.thyCollection','thycollection.js', ['thyBase']); ! l.add('thyapi.thyutils.thyVisualCollection', 'thyvisualcollection.js', ['thyCollection']); ! l.add('thyapi.thyutils.thyProtocol','thyprotocol.js', ['thyBase']); ! l.add('thyapi.thyutils.thyXMLRPCProtocol','thyxmlrpcprotocol.js','thyProtocol'); ! l.add('thyapi.thyutils.thyConnector','thyconnector.js', 'thyXMLRPCProtocol'); ! l.add('thyapi.thyutils.thySynchronizer','thysynchronizer.js', ['thyBase','thyConnector']); ! l.add('thyapi.thyutils.thyDataSource','thydatasource.js', ['thyBase','thyConnector','thyCollection','thySynchronizer']); ! l.add('thyapi.thyutils.thyCrypt','thycrypt.js','thyBase'); ! l.add('thyapi.thyutils.thyBlowfish','thyblowfish.js','thyCrypt'); ! l.add('thyapi.thyutils.thyHash','thyhash.js','thyBase'); ! l.add('thyapi.thyutils.thyHashMD5','thyhashmd5.js','thyHash'); //ThyAPI Widgets ! l.addPackage('thyapi.thywidgets', p+'thywidgets/'); ! l.add('thyapi.thywidgets.thyPanelBase', 'thypanel.js', ['thyBase','DynLayer', 'System', 'DynKeyEvent', 'thyDragEvent', 'thyCollection']); ! if (dynapi.ua.ie) l.add('thyapi.thywidgets.thyPanel', 'thypanel_ie.js', 'thyPanelBase'); ! else if (dynapi.ua.ns4) l.add('thyapi.thywidgets.thyPanel', 'thypanel_ns4.js', 'thyPanelBase'); ! else if (dynapi.ua.opera) l.add('thyapi.thywidgets.thyPanel', 'thypanel_opera.js', 'thyPanelBase'); ! else l.add('thyapi.thywidgets.thyPanel', 'thypanel_dom.js', 'thyPanelBase'); ! l.add('thyapi.thywidgets.thyButton', 'thybutton.js', 'thyPanel'); ! l.add('thyapi.thywidgets.thyTabsManager', 'thytabsmanager.js', 'thyPanel'); ! l.add('thyapi.thywidgets.thyBorderPanel', 'thyborderpanel.js', 'thyPanel'); ! l.add('thyapi.thywidgets.thyLabelPanel', 'thylabelpanel.js', 'thyPanel'); ! l.add('thyapi.thywidgets.thyEditBox', 'thyeditbox.js', 'thyLabelPanel'); ! l.add('thyapi.thywidgets.thyCheckBox', 'thycheckbox.js', 'thyLabelPanel'); ! //l.add('thyapi.thywidgets.thyPopupCalendar', 'thypopupcalendar.js', ['thyEditBox','JSCalendarSetup','thyButton']); ! l.add('thyapi.thywidgets.thyPopupCalendar', 'thypopupcalendar.js', ['thyEditBox','thyButton']); ! l.add('thyapi.thywidgets.thyTextEdit', 'thytextedit.js', 'thyLabelPanel'); ! l.add('thyapi.thywidgets.thyRichTextEdit', 'thyrichtextedit.js', ['thyLabelPanel', 'FCKeditor']); ! l.add('thyapi.thywidgets.thyWindow', 'thywindow.js', ['thyBorderPanel','thyButton','thyDragEvent','dynapi.functions.String']); ! l.add('thyapi.thywidgets.thyDialogWindow', 'thydialogwindow.js', ['thyWindow','thyButton']); ! l.add('thyapi.thywidgets.thyGridCell', 'thygridcell.js', ['thyPanel','thyEditBox', 'thyCollection']); ! l.add('thyapi.thywidgets.thyGridRow', 'thygridrow.js', ['thyGridCell', 'thyVisualCollection']) ! 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']); // ThyAPI External ! l.addPackage('thyapi.thywidgets.external', p+'thywidgets/external/'); ! l.add('thyapi.thywidgets.external.FCKeditor', 'fckeditor/fckeditor.js'); ! l.add('thyapi.thywidgets.external.JSCalendar', 'jscalendar/calendar.js'); ! l.add('thyapi.thywidgets.external.JSCalendarLang', 'jscalendar/lang/calendar-en.js'); ! l.add('thyapi.thywidgets.external.JSCalendarSetup', 'jscalendar/calendar-setup.js',['JSCalendar','JSCalendarLang']); // Load buffered includes --------- if(l._buffer){ var i,ar=l._buffer; ! for(i=0;i<ar.length;i++) l.include(true,ar[i]); // pass arguments true and bufferedArguments l._buffer=null; } Index: debug.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/ext/debug.js,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** debug.js 28 Feb 2005 00:33:49 -0000 1.1.1.1 --- debug.js 23 Aug 2005 13:14:04 -0000 1.2 *************** *** 1 **** ! /* DynAPI Distribution Debugger The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ // Note: Debugger does not have to be a DynObject - very important for blueprinted layers function Debugger() { this._mode='normal'; this.win = null; this._watch={}; this._evalBuffer=''; this._buffer = dynapi._debugBuffer; dynapi._debugBuffer = ''; // close the debug window on unload this.closeOnUnLoad = false; dynapi.onUnload(function() { if (dynapi.debug.closeOnUnLoad) dynapi.debug.close(); }); this.open(); } var p = Debugger.prototype; //dynapi.setPrototype('Debugger','DynObject'); p.close = function() { if (this.isLoaded()) { this.win.close(); this.win = null; } }; // error - output a browser generated error to the debug window p.error = function(msg, url, lno) { if (url && url.indexOf(dynapi.documentPath)==0) { url = url.substring(dynapi.documentPath.length); } this.print('Error:'+ (lno? ' Line '+lno : '') +' ['+url+']\n '+msg); }; // evaluates an expression in the scope of the main dynapi window p.evaluate = function(str) { dynapi.frame.eval(str); this.setEvalHistory(str); }; // get evaluation history p.getEvalHistory=function(n){ if(!this.isLoaded()) return; var t,f=this.win.document.debugform; if(n>=1) { var lim=this.win.evalHistory.length-1; this.win.evalIndex++; if (this.win.evalIndex>lim) this.win.evalIndex=(lim<0)?0:lim; t=this.win.evalHistory[this.win.evalIndex]; if(t)f.eval.value=t; }else if(n<=0){ this.win.evalIndex--; if(this.win.evalIndex<0) this.win.evalIndex=0; t=this.win.evalHistory[this.win.evalIndex]; if(t)f.eval.value=t; } }; // lists all known properties of an object p.inspect = function(obj,showFunctions) { this.print('Inspecting:'); var v; if (typeof(obj)=='string') obj=eval(obj); if (typeof(obj)=='object') { for (var i in obj) { if (obj[i]==null) v = 'null' else if (typeof(obj[i])=='undefined') v = 'null'; else if (typeof(obj[i])=='function') { if (showFunctions==false) continue; else v = '[Function]'; } else if (typeof(obj[i])=='object' && typeof(obj[i].length)!='undefined') v = 'Array';// ['+obj[i]+']'; else if (typeof(obj[i])=='object') v = '[Object]'; else v = obj[i]; this.print(' '+i+' = '+v); } } else this.print(' undefined'); }; p.isLoaded = function() { return (this.win!=null && this.win.document && typeof(this.win.document.debugform)=="object"); }; // opens the debugger window p.open = function() { var p = dynapi.library.path; if (!this.isLoaded() && p) { var url = dynapi.documentPath+p+'ext/debug.html#'; var w = (dynapi.ua.def||dynapi.ua.dom)? 350:355 //dynapi.ua.mac? (dynapi.ua.ie?330:300) : 350; var h = (dynapi.ua.def||dynapi.ua.dom)? 432:485 //dynapi.ua.mac? (dynapi.ua.ie?405:365) : (dynapi.ua.def||dynapi.ua.dom)? 420:476; this.win = window.open(url,'debugwin','width='+w+',height='+h+',scrollbars=no,status=no,toolbar=no'); //,resizable=no this.win.opener=window; this.win.evalHistory=[]; this.win.evalIndex=0; this.print(); /* dynapi.frame.onerror = function(msg, url, lno) { dynapi.debug.error(msg, url, lno); }; */ } }; // output text to the debug window p.print = function(s) { if (s==null) s = ''; else s = s + '\n'; if (this.isLoaded()) { this.switchMode('normal'); if (this._buffer != '') { // dump buffer s = this._buffer + s; this._buffer = ''; } this.win.document.debugform.print.value += s; this._normalModeData = this.win.document.debugform.print.value; // Does mozilla has something like this? if (dynapi.ua.ie) { var po = this.win.document.debugform.print; po.scrollTop = po.scrollHeight; var range = po.createTextRange(); range.collapse(false); range.select(); } } else this._buffer += s; }; // reloads selected javascripts, packages or html pages p.reload=function(t){ if (!this.isLoaded) return; t=t+''; if(t.substr(0,3).toLowerCase()=='go:') { t=t.substr(3).replace(/\\/g,'/'); dynapi.frame.location.href=t; return; } var i,f=t.split(';'); for(i=0;i<f.length;i++){ t=f[i]; if(t.indexOf('.js')<0) dynapi.library.load(t,null,true); else { var lib=dynapi.library; if (!lib.scripts[t]) lib.loadScript(t); else lib.reloadScript(t,null,true); } } if(this.win.focus) this.win.focus(); else this.win.setZIndex({topmost:true}); }; p.reset=function(section){ if (!this.isLoaded) return; this._oldWatchSrc=''; if(!section) { this.win.document.debugform.reset(); this._normalModeData=''; this.switchMode('normal'); }else{ var t=this.win.document.debugform[section]; if(t) t.value=''; } }; p.status = function(str) { if (this.isLoaded()) { for (var i=1;i<arguments.length;i++) { str += ', '+arguments[i]; } this.win.document.debugform.stat.value = str; }; }; // Set Mode p.switchMode=function(m){ if (!this.isLoaded) return; if(m=='watch'||(this._mode=='normal' && m!='normal')) { this._normalModeData = this.win.document.debugform.print.value; this._mode='watch'; this._enableWatch(); }else if(m=='normal'||(this._mode=='watch' && m!='watch')){ this.win.document.debugform.print.value=(this._normalModeData)?this._normalModeData:''; this._mode='normal'; this._disableWatch(); } }; // enters text to the evaluate field in the debugger widnow p.setEvaluate = function(str) { if (!this.isLoaded()) this._evalBuffer=str; else { if (!str) str = ''; if(this._evalBuffer!='') { str =this._evalBuffer+str; this._evalBuffer=''; } this.win.document.debugform.eval.value = str; this.setEvalHistory(str); } }; // Set previous evaluation information p.setEvalHistory=function(s){ if(!this.isLoaded()) return; var i,found; if(s){ for(i=0;i<this.win.evalHistory.length;i++){ if(this.win.evalHistory[i]==s) {found=i;break;} } if(found!=null) this.win.evalHistory=dynapi.functions.removeFromArray(this.win.evalHistory,found); this.win.evalHistory[this.win.evalHistory.length]=s; this.win.evalIndex=this.win.evalHistory.length-1; } }; p.showHelp=function(){ var t='' +'-----------------------\n' +'Quick Help\n' +'-----------------------\n' +'1) To inspect an Object enter the name\n' +'of the object in the "Inspect Variable/Object"\n' +'textbox and then click on the "Inspect" button\n\n' +'2) To Load/Reload a DynAPI Package,\n' +'javascript or html page enter the name\n' +'of the package or javascript in the reload\n' +'text. For HTML pages type the prefix Go:\n' +'before the page name.\n' +'------------------------------------------------'; this.print(t); }; // watch object variables; p.watch = function(name,value){ if(arguments.length>1) this._watch[name]=value; else if(dynapi.frame.eval(name)) this._watch[name]='_watch object_'; else this._watch[name]='_watch object_'; }; p._disableWatch = function(){ this._oldWatchSrc=''; if(this._timerWatch) { window.clearTimeout(this._timerWatch); this._timerWatch=0; } }; p._enableWatch = function(){ if(this._mode!='watch') return; var src,row,v; src='Name\t \t \t Value\n---------------------------------------\n'; for(i in this._watch){ if(this._watch[i]=='_watch object_') v=dynapi.frame.eval(i); else v=this._watch[i]; if(v==null) v='null'; if(typeof(v)=='string') v=v.replace(/\n/g,' '); src+=(i+' ').substr(0,22)+'\t '+v+'\n'; } if(src!=this._oldWatchSrc){ this.win.document.debugform.print.value=this._oldWatchSrc=src; } if(this._timerWatch) window.clearTimeout(this._timerWatch); this._timerWatch=window.setTimeout(this+'._enableWatch()',200); }; dynapi.debug = new Debugger(); var t='------------------------------\n' +'Click "?" for help\n' +'------------------------------\n'; dynapi.debug.print(t); \ No newline at end of file --- 1,256 ---- ! /* ! DynAPI Distribution ! Debugger ! The DynAPI Distribution is distributed under the terms of the GNU LGPL license. ! */ ! // Note - Debugger does not have to be a DynObject - very important for blueprinted layers ! function Debugger() { ! this._mode='normal'; ! this.win = null; ! this._watch={}; ! this._evalBuffer=''; ! this._buffer = dynapi._debugBuffer; ! dynapi._debugBuffer = ''; ! // close the debug window on unload ! this.closeOnUnLoad = false; ! dynapi.onUnload(function() { ! if (dynapi.debug.closeOnUnLoad) dynapi.debug.close(); ! }); ! this.open(); ! } ! var p = Debugger.prototype; //dynapi.setPrototype('Debugger','DynObject'); ! p.close = function() { ! if (this.isLoaded()) { ! this.win.close(); ! this.win = null; ! } ! }; ! // error - output a browser generated error to the debug window ! p.error = function(msg, url, lno) { ! if (url && url.indexOf(dynapi.documentPath)==0) { ! url = url.substring(dynapi.documentPath.length); ! } ! this.print('Error:'+ (lno? ' Line '+lno : '') +' ['+url+']\n '+msg); ! }; ! // evaluates an expression in the scope of the main dynapi window ! p.evaluate = function(str) { ! dynapi.frame.eval(str); ! this.setEvalHistory(str); ! }; ! // get evaluation history ! p.getEvalHistory=function(n){ ! if(!this.isLoaded()) return; ! var t,f=this.win.document.debugform; ! if(n>=1) { ! var lim=this.win.evalHistory.length-1; ! this.win.evalIndex++; ! if (this.win.evalIndex>lim) this.win.evalIndex=(lim<0)?0:lim; ! t=this.win.evalHistory[this.win.evalIndex]; ! if(t)f.eval.value=t; ! }else if(n<=0){ ! this.win.evalIndex--; ! if(this.win.evalIndex<0) this.win.evalIndex=0; ! t=this.win.evalHistory[this.win.evalIndex]; ! if(t)f.eval.value=t; ! } ! }; ! // lists all known properties of an object ! p.inspect = function(obj,showFunctions) { ! this.print('Inspecting:'); ! var v; ! if (typeof(obj)=='string') obj=eval(obj); ! if (typeof(obj)=='object') { ! for (var i in obj) { ! if (obj[i]==null) v = 'null' ! else if (typeof(obj[i])=='undefined') v = 'null'; ! else if (typeof(obj[i])=='function') { ! if (showFunctions==false) continue; ! else v = '[Function]'; ! } ! else if (typeof(obj[i])=='object' && typeof(obj[i].length)!='undefined') v = 'Array';// ['+obj[i]+']'; ! else if (typeof(obj[i])=='object') v = '[Object]'; ! else v = obj[i]; ! this.print(' '+i+' = '+v); ! } ! } ! else this.print(' undefined'); ! }; ! p.isLoaded = function() { ! return (this.win!=null && this.win.document && typeof(this.win.document.debugform)=="object"); ! }; ! // opens the debugger window ! p.open = function() { ! var p = dynapi.library.path; ! if (!this.isLoaded() && p) { ! // Modified by Raphael Pereira ! //var url = dynapi.documentPath+p+'ext/debug.html#'; ! var url = p+'ext/debug.html#'; ! var w = (dynapi.ua.def||dynapi.ua.dom)? 350:355 //dynapi.ua.mac? (dynapi.ua.ie?330:300) : 350; ! var h = (dynapi.ua.def||dynapi.ua.dom)? 432:485 //dynapi.ua.mac? (dynapi.ua.ie?405:365) : (dynapi.ua.def||dynapi.ua.dom)? 420:476; ! this.win = window.open(url,'debugwin','width='+w+',height='+h+',scrollbars=no,status=no,toolbar=no'); //,resizable=no ! this.win.opener=window; ! this.win.evalHistory=[]; ! this.win.evalIndex=0; ! this.print(); ! /* dynapi.frame.onerror = function(msg, url, lno) { ! dynapi.debug.error(msg, url, lno); ! }; ! */ ! } ! }; ! // output text to the debug window ! p.print = function(s) { ! if (s==null) s = ''; ! else s = s + '\n'; ! if (this.isLoaded()) { ! this.switchMode('normal'); ! if (this._buffer != '') { // dump buffer ! s = this._buffer + s; ! this._buffer = ''; ! } ! this.win.document.debugform.print.value += s; ! this._normalModeData = this.win.document.debugform.print.value; ! ! // Does mozilla has something like this? ! if (dynapi.ua.ie) { ! var po = this.win.document.debugform.print; ! po.scrollTop = po.scrollHeight; ! var range = po.createTextRange(); ! range.collapse(false); ! range.select(); ! } ! } ! else this._buffer += s; ! }; ! // reloads selected javascripts, packages or html pages ! p.reload=function(t){ ! if (!this.isLoaded) return; ! t=t+''; ! if(t.substr(0,3).toLowerCase()=='go:') { ! t=t.substr(3).replace(/\\/g,'/'); ! dynapi.frame.location.href=t; ! return; ! } ! var i,f=t.split(';'); ! for(i=0;i<f.length;i++){ ! t=f[i]; ! if(t.indexOf('.js')<0) dynapi.library.load(t,null,true); ! else { ! var lib=dynapi.library; ! if (!lib.scripts[t]) lib.loadScript(t); ! else lib.reloadScript(t,null,true); ! } ! } ! if(this.win.focus) this.win.focus(); ! else this.win.setZIndex({topmost:true}); ! }; ! p.reset=function(section){ ! if (!this.isLoaded) return; ! this._oldWatchSrc=''; ! if(!section) { ! this.win.document.debugform.reset(); ! this._normalModeData=''; ! this.switchMode('normal'); ! }else{ ! var t=this.win.document.debugform[section]; ! if(t) t.value=''; ! } ! }; ! p.status = function(str) { ! if (this.isLoaded()) { ! for (var i=1;i<arguments.length;i++) { ! str += ', '+arguments[i]; ! } ! this.win.document.debugform.stat.value = str; ! }; ! }; ! // Set Mode ! p.switchMode=function(m){ ! if (!this.isLoaded) return; ! if(m=='watch'||(this._mode=='normal' && m!='normal')) { ! this._normalModeData = this.win.document.debugform.print.value; ! this._mode='watch'; ! this._enableWatch(); ! }else if(m=='normal'||(this._mode=='watch' && m!='watch')){ ! this.win.document.debugform.print.value=(this._normalModeData)?this._normalModeData:''; ! this._mode='normal'; ! this._disableWatch(); ! } ! }; ! // enters text to the evaluate field in the debugger widnow ! p.setEvaluate = function(str) { ! if (!this.isLoaded()) this._evalBuffer=str; ! else { ! if (!str) str = ''; ! if(this._evalBuffer!='') { ! str =this._evalBuffer+str; ! this._evalBuffer=''; ! } ! this.win.document.debugform.eval.value = str; ! this.setEvalHistory(str); ! } ! }; ! // Set previous evaluation information ! p.setEvalHistory=function(s){ ! if(!this.isLoaded()) return; ! var i,found; ! if(s){ ! for(i=0;i<this.win.evalHistory.length;i++){ ! if(this.win.evalHistory[i]==s) {found=i;break;} ! } ! if(found!=null) this.win.evalHistory=dynapi.functions.removeFromArray(this.win.evalHistory,found); ! this.win.evalHistory[this.win.evalHistory.length]=s; ! this.win.evalIndex=this.win.evalHistory.length-1; ! } ! }; ! p.showHelp=function(){ ! var t='' ! +'-----------------------\n' ! +'Quick Help\n' ! +'-----------------------\n' ! +'1) To inspect an Object enter the name\n' ! +'of the object in the "Inspect Variable/Object"\n' ! +'textbox and then click on the "Inspect" button\n\n' ! +'2) To Load/Reload a DynAPI Package,\n' ! +'javascript or html page enter the name\n' ! +'of the package or javascript in the reload\n' ! +'text. For HTML pages type the prefix Go:\n' ! +'before the page name.\n' ! +'------------------------------------------------'; ! this.print(t); ! }; ! // watch object variables; ! p.watch = function(name,value){ ! if(arguments.length>1) this._watch[name]=value; ! else if(dynapi.frame.eval(name)) this._watch[name]='_watch object_'; ! else this._watch[name]='_watch object_'; ! }; ! p._disableWatch = function(){ ! this._oldWatchSrc=''; ! if(this._timerWatch) { ! window.clearTimeout(this._timerWatch); ! this._timerWatch=0; ! } ! }; ! p._enableWatch = function(){ ! if(this._mode!='watch') return; ! var src,row,v; ! src='Name\t \t \t Value\n---------------------------------------\n'; ! for(i in this._watch){ ! if(this._watch[i]=='_watch object_') v=dynapi.frame.eval(i); ! else v=this._watch[i]; ! if(v==null) v='null'; ! if(typeof(v)=='string') v=v.replace(/\n/g,' '); ! src+=(i+' ').substr(0,22)+'\t '+v+'\n'; ! } ! if(src!=this._oldWatchSrc){ ! this.win.document.debugform.print.value=this._oldWatchSrc=src; ! } ! if(this._timerWatch) window.clearTimeout(this._timerWatch); ! this._timerWatch=window.setTimeout(this+'._enableWatch()',200); ! }; ! dynapi.debug = new Debugger(); ! var t='------------------------------\n' ! +'Click "?" for help\n' ! +'------------------------------\n'; ! dynapi.debug.print(t); |