*** empty log message ***
[project/fckeditor.git] / lib / editor / fckdebug.html
1 <!--
2  * FCKeditor - The text editor for internet
3  * Copyright (C) 2003-2004 Frederico Caldeira Knabben
4  * 
5  * Licensed under the terms of the GNU Lesser General Public License:
6  *              http://www.opensource.org/licenses/lgpl-license.php
7  * 
8  * For further information visit:
9  *              http://www.fckeditor.net/
10  * 
11  * File Name: fckdebug.html
12  *      This is the Debug window.
13  *      It automatically popups if the Debug = true in the configuration file.
14  * 
15  * Version:  2.0 RC2
16  * Modified: 2004-05-31 23:07:52
17  * 
18  * File Authors:
19  *              Frederico Caldeira Knabben (fredck@fckeditor.net)
20 -->
21 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22 <html>
23         <head>
24                 <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
25                 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
26                 <title>FCKeditor Debug Window</title>
27                 <script type="text/javascript">
28
29 var oWindow ;
30 var oDiv ;
31
32 if ( !window.FCKMessages )
33         window.FCKMessages = new Array() ;
34
35 function Initialize()
36 {
37         oWindow = window.frames[ 'eOutput' ]
38         oWindow.document.open() ;
39         oWindow.document.write( '<div id="divMsg"></div>' ) ;
40         oWindow.document.close() ;
41         oDiv    = oWindow.document.getElementById('divMsg') ;
42 }
43
44 function Output( message, color )
45 {
46         if ( color )
47                 message = '<font color="' + color + '">' + message + '</font>' ;
48                 
49         window.FCKMessages[ window.FCKMessages.length ] = message ;
50         StartTimer() ;
51 }
52
53 function StartTimer()
54 {
55         window.setTimeout( 'CheckMessages()', 100 ) ;
56 }
57
58 function CheckMessages()
59 {
60         if ( window.FCKMessages.length > 0 )
61         {
62                 // Get the first item in the queue
63                 var sMessage = window.FCKMessages[0] ;
64                 
65                 // Removes the first item from the queue
66                 var oTempArray = new Array() ;
67                 for ( i = 1 ; i < window.FCKMessages.length ; i++ )
68                         oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
69                 window.FCKMessages = oTempArray ;
70                 
71                 var d = new Date() ;
72                 var sTime = 
73                         ( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' + 
74                         ( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' + 
75                         ( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' + 
76                         ( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
77
78                 var oMsgDiv = oWindow.document.createElement( 'div' ) ;
79                 oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '</b>' ;
80                 oDiv.appendChild( oMsgDiv ) ;
81                 oMsgDiv.scrollIntoView() ;
82         }
83 }
84
85 function Clear()
86 {
87         oDiv.innerHTML = '' ;
88 }
89                 </script>
90         </head>
91         <body onload="Initialize();" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
92                 <TABLE height="100%" cellSpacing="5" cellPadding="0" width="100%" border="0">
93                         <TR>
94                                 <TD>
95                                         <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
96                                                 <TR>
97                                                         <TD><FONT size="+2"><STRONG>FCKeditor Debug Window</STRONG></FONT></TD>
98                                                         <TD align="right"><INPUT type="button" value="Clear" onclick="Clear();"></TD>
99                                                 </TR>
100                                         </TABLE>
101                                 </TD>
102                         </TR>
103                         <TR>
104                                 <TD height="100%" style="BORDER-RIGHT: #696969 1px solid; BORDER-TOP: #696969 1px solid; BORDER-LEFT: #696969 1px solid; BORDER-BOTTOM: #696969 1px solid">
105                                         <iframe id="eOutput" name="eOutput" width="100%" height="100%" scrolling="auto" src="about:blank" frameborder="no"></iframe>
106                                 </TD>
107                         </TR>
108                 </TABLE>
109         </body>
110 </html>