import torrus 1.0.9
[freeside.git] / rt / share / html / NoAuth / RichText / FCKeditor / editor / _source / internals / fckdebug.js
1 /*\r
2  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
3  * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r
4  *\r
5  * == BEGIN LICENSE ==\r
6  *\r
7  * Licensed under the terms of any of the following licenses at your\r
8  * choice:\r
9  *\r
10  *  - GNU General Public License Version 2 or later (the "GPL")\r
11  *    http://www.gnu.org/licenses/gpl.html\r
12  *\r
13  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
14  *    http://www.gnu.org/licenses/lgpl.html\r
15  *\r
16  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
17  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
18  *\r
19  * == END LICENSE ==\r
20  *\r
21  * Debug window control and operations.\r
22  */\r
23 \r
24 // Public function defined here must be declared in fckdebug_empty.js.\r
25 \r
26 var FCKDebug =\r
27 {\r
28         Output : function( message, color, noParse )\r
29         {\r
30                 if ( ! FCKConfig.Debug )\r
31                         return ;\r
32 \r
33                 try\r
34                 {\r
35                         this._GetWindow().Output( message, color, noParse ) ;\r
36                 }\r
37                 catch ( e ) {}   // Ignore errors\r
38         },\r
39 \r
40         OutputObject : function( anyObject, color )\r
41         {\r
42                 if ( ! FCKConfig.Debug )\r
43                         return ;\r
44 \r
45                 try\r
46                 {\r
47                         this._GetWindow().OutputObject( anyObject, color ) ;\r
48                 }\r
49                 catch ( e ) {}   // Ignore errors\r
50         },\r
51 \r
52         _GetWindow : function()\r
53         {\r
54                 if ( !this.DebugWindow || this.DebugWindow.closed )\r
55                         this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;\r
56 \r
57                 return this.DebugWindow ;\r
58         }\r
59 } ;\r