summaryrefslogtreecommitdiffstats
path: root/lib/editor/fckdebug.html
blob: 46ad3610d293aa104b00d22c776f889f17176193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!--
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2004 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * File Name: fckdebug.html
 * 	This is the Debug window.
 * 	It automatically popups if the Debug = true in the configuration file.
 * 
 * Version:  2.0 RC2
 * Modified: 2004-05-31 23:07:52
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
		<title>FCKeditor Debug Window</title>
		<script type="text/javascript">

var oWindow ;
var oDiv ;

if ( !window.FCKMessages )
	window.FCKMessages = new Array() ;

function Initialize()
{
	oWindow = window.frames[ 'eOutput' ]
	oWindow.document.open() ;
	oWindow.document.write( '<div id="divMsg"></div>' ) ;
	oWindow.document.close() ;
	oDiv	= oWindow.document.getElementById('divMsg') ;
}

function Output( message, color )
{
	if ( color )
		message = '<font color="' + color + '">' + message + '</font>' ;
		
	window.FCKMessages[ window.FCKMessages.length ] = message ;
	StartTimer() ;
}

function StartTimer()
{
	window.setTimeout( 'CheckMessages()', 100 ) ;
}

function CheckMessages()
{
	if ( window.FCKMessages.length > 0 )
	{
		// Get the first item in the queue
		var sMessage = window.FCKMessages[0] ;
		
		// Removes the first item from the queue
		var oTempArray = new Array() ;
		for ( i = 1 ; i < window.FCKMessages.length ; i++ )
			oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
		window.FCKMessages = oTempArray ;
		
		var d = new Date() ;
		var sTime = 
			( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' + 
			( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' + 
			( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' + 
			( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;

		var oMsgDiv = oWindow.document.createElement( 'div' ) ;
		oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '</b>' ;
		oDiv.appendChild( oMsgDiv ) ;
		oMsgDiv.scrollIntoView() ;
	}
}

function Clear()
{
	oDiv.innerHTML = '' ;
}
		</script>
	</head>
	<body onload="Initialize();" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
		<TABLE height="100%" cellSpacing="5" cellPadding="0" width="100%" border="0">
			<TR>
				<TD>
					<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
						<TR>
							<TD><FONT size="+2"><STRONG>FCKeditor Debug Window</STRONG></FONT></TD>
							<TD align="right"><INPUT type="button" value="Clear" onclick="Clear();"></TD>
						</TR>
					</TABLE>
				</TD>
			</TR>
			<TR>
				<TD height="100%" style="BORDER-RIGHT: #696969 1px solid; BORDER-TOP: #696969 1px solid; BORDER-LEFT: #696969 1px solid; BORDER-BOTTOM: #696969 1px solid">
					<iframe id="eOutput" name="eOutput" width="100%" height="100%" scrolling="auto" src="about:blank" frameborder="no"></iframe>
				</TD>
			</TR>
		</TABLE>
	</body>
</html>