1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
\r
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
\r
4 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
\r
6 * == BEGIN LICENSE ==
\r
8 * Licensed under the terms of any of the following licenses at your
\r
11 * - GNU General Public License Version 2 or later (the "GPL")
\r
12 * http://www.gnu.org/licenses/gpl.html
\r
14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
\r
15 * http://www.gnu.org/licenses/lgpl.html
\r
17 * - Mozilla Public License Version 1.1 or later (the "MPL")
\r
18 * http://www.mozilla.org/MPL/MPL-1.1.html
\r
22 * This is the Debug window.
\r
23 * It automatically popups if the Debug = true in the configuration file.
\r
25 <html xmlns="http://www.w3.org/1999/xhtml">
\r
27 <title>FCKeditor Debug Window</title>
\r
28 <meta name="robots" content="noindex, nofollow" />
\r
29 <script type="text/javascript">
\r
34 if ( !window.FCKMessages )
\r
35 window.FCKMessages = new Array() ;
\r
37 window.onload = function()
\r
39 oWindow = document.getElementById('xOutput').contentWindow ;
\r
40 oWindow.document.open() ;
\r
41 oWindow.document.write( '<div id="divMsg"><\/div>' ) ;
\r
42 oWindow.document.close() ;
\r
43 oDiv = oWindow.document.getElementById('divMsg') ;
\r
46 function Output( message, color, noParse )
\r
48 if ( !noParse && message != null && isNaN( message ) )
\r
49 message = message.replace(/</g, "<") ;
\r
52 message = '<font color="' + color + '">' + message + '<\/font>' ;
\r
54 window.FCKMessages[ window.FCKMessages.length ] = message ;
\r
58 function OutputObject( anyObject, color )
\r
62 if ( anyObject != null )
\r
64 message = 'Properties of: ' + anyObject + '</b><blockquote>' ;
\r
66 for (var prop in anyObject)
\r
70 var sVal = anyObject[ prop ] != null ? anyObject[ prop ] + '' : '[null]' ;
\r
71 message += '<b>' + prop + '</b> : ' + sVal.replace(/</g, '<') + '<br>' ;
\r
77 message += '<b>' + prop + '</b> : [' + typeof( anyObject[ prop ] ) + ']<br>' ;
\r
81 message += '<b>' + prop + '</b> : [-error-]<br>' ;
\r
86 message += '</blockquote><b>' ;
\r
88 message = 'OutputObject : Object is "null".' ;
\r
90 Output( message, color, true ) ;
\r
93 function StartTimer()
\r
95 window.setTimeout( 'CheckMessages()', 100 ) ;
\r
98 function CheckMessages()
\r
100 if ( window.FCKMessages.length > 0 )
\r
102 // Get the first item in the queue
\r
103 var sMessage = window.FCKMessages[0] ;
\r
105 // Removes the first item from the queue
\r
106 var oTempArray = new Array() ;
\r
107 for ( i = 1 ; i < window.FCKMessages.length ; i++ )
\r
108 oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
\r
109 window.FCKMessages = oTempArray ;
\r
111 var d = new Date() ;
\r
113 ( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' +
\r
114 ( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' +
\r
115 ( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' +
\r
116 ( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
\r
118 var oMsgDiv = oWindow.document.createElement( 'div' ) ;
\r
119 oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ;
\r
120 oDiv.appendChild( oMsgDiv ) ;
\r
121 oMsgDiv.scrollIntoView() ;
\r
127 oDiv.innerHTML = '' ;
\r
131 <body style="margin: 10px">
\r
132 <table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0">
\r
135 <table cellspacing="0" cellpadding="0" width="100%" border="0">
\r
137 <td style="font-weight: bold; font-size: 1.2em;">
\r
138 FCKeditor Debug Window</td>
\r
140 <input type="button" value="Clear" onclick="Clear();" /></td>
\r
145 <tr style="height: 100%">
\r
146 <td style="border: #696969 1px solid">
\r
147 <iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="javascript:void(0)"
\r
148 frameborder="0"></iframe>
\r