Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1925 jp_milcent 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<!--
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
5
 *
6
 * == BEGIN LICENSE ==
7
 *
8
 * Licensed under the terms of any of the following licenses at your
9
 * choice:
10
 *
11
 *  - GNU General Public License Version 2 or later (the "GPL")
12
 *    http://www.gnu.org/licenses/gpl.html
13
 *
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
 *    http://www.gnu.org/licenses/lgpl.html
16
 *
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
19
 *
20
 * == END LICENSE ==
21
 *
22
 * This is the Debug window.
23
 * It automatically popups if the Debug = true in the configuration file.
24
-->
25
<html xmlns="http://www.w3.org/1999/xhtml">
26
<head>
27
	<title>FCKeditor Debug Window</title>
28
	<meta name="robots" content="noindex, nofollow" />
29
	<script type="text/javascript">
30
 
31
var oWindow ;
32
var oDiv ;
33
 
34
if ( !window.FCKMessages )
35
	window.FCKMessages = new Array() ;
36
 
37
window.onload = function()
38
{
39
	oWindow = document.getElementById('xOutput').contentWindow ;
40
	oWindow.document.open() ;
41
	oWindow.document.write( '<div id="divMsg"><\/div>' ) ;
42
	oWindow.document.close() ;
43
	oDiv	= oWindow.document.getElementById('divMsg') ;
44
}
45
 
46
function Output( message, color, noParse )
47
{
48
	if ( !noParse && message != null && isNaN( message ) )
49
		message = message.replace(/</g, "&lt;") ;
50
 
51
	if ( color )
52
		message = '<font color="' + color + '">' + message + '<\/font>' ;
53
 
54
	window.FCKMessages[ window.FCKMessages.length ] = message ;
55
	StartTimer() ;
56
}
57
 
58
function OutputObject( anyObject, color )
59
{
60
	var message ;
61
 
62
	if ( anyObject != null )
63
	{
64
		message = 'Properties of: ' + anyObject + '</b><blockquote>' ;
65
 
66
		for (var prop in anyObject)
67
		{
68
			try
69
			{
70
				var sVal = anyObject[ prop ] != null ? anyObject[ prop ] + '' : '[null]' ;
71
				message += '<b>' + prop + '</b> : ' + sVal.replace(/</g, '&lt;') + '<br>' ;
72
			}
73
			catch (e)
74
			{
75
				try
76
				{
77
					message += '<b>' + prop + '</b> : [' + typeof( anyObject[ prop ] ) + ']<br>' ;
78
				}
79
				catch (e)
80
				{
81
					message += '<b>' + prop + '</b> : [-error-]<br>' ;
82
				}
83
			}
84
		}
85
 
86
		message += '</blockquote><b>' ;
87
	} else
88
		message = 'OutputObject : Object is "null".' ;
89
 
90
	Output( message, color, true ) ;
91
}
92
 
93
function StartTimer()
94
{
95
	window.setTimeout( 'CheckMessages()', 100 ) ;
96
}
97
 
98
function CheckMessages()
99
{
100
	if ( window.FCKMessages.length > 0 )
101
	{
102
		// Get the first item in the queue
103
		var sMessage = window.FCKMessages[0] ;
104
 
105
		// Removes the first item from the queue
106
		var oTempArray = new Array() ;
107
		for ( i = 1 ; i < window.FCKMessages.length ; i++ )
108
			oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
109
		window.FCKMessages = oTempArray ;
110
 
111
		var d = new Date() ;
112
		var sTime =
113
			( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' +
114
			( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' +
115
			( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' +
116
			( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
117
 
118
		var oMsgDiv = oWindow.document.createElement( 'div' ) ;
119
		oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ;
120
		oDiv.appendChild( oMsgDiv ) ;
121
		oMsgDiv.scrollIntoView() ;
122
	}
123
}
124
 
125
function Clear()
126
{
127
	oDiv.innerHTML = '' ;
128
}
129
	</script>
130
</head>
131
<body style="margin: 10px">
132
	<table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0">
133
		<tr>
134
			<td>
135
				<table cellspacing="0" cellpadding="0" width="100%" border="0">
136
					<tr>
137
						<td style="font-weight: bold; font-size: 1.2em;">
138
							FCKeditor Debug Window</td>
139
						<td align="right">
140
							<input type="button" value="Clear" onclick="Clear();" /></td>
141
					</tr>
142
				</table>
143
			</td>
144
		</tr>
145
		<tr style="height: 100%">
146
			<td style="border: #696969 1px solid">
147
				<iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="javascript:void(0)"
148
					frameborder="0"></iframe>
149
			</td>
150
		</tr>
151
	</table>
152
</body>
153
</html>