Ticket #2043: 2043_2.patch

File 2043_2.patch, 5.9 KB (added by fredck, 22 months ago)
  • _whatsnew.html

     
    4646                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2215">#2215</a>] Following 
    4747                        the above new feature, the ReplaceTextarea method will now copy the textarea.tabIndex 
    4848                        value if available.</li> 
     49                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2043">#2043</a>] The debug 
     50                        script is not anymore part of the compressed files. If FCKeditor native debugging 
     51                        features (FCKDebug) is required, the _source folder must be present in your installation.</li> 
    4952 
    5053                 
    5154        </ul> 
  • editor/_source/internals/fckdebug.js

     
    2121 * Debug window control and operations. 
    2222 */ 
    2323 
    24 var FCKDebug = new Object() ; 
     24// Public function defined here must be declared in fckdebug_empty.js. 
    2525 
    26 FCKDebug._GetWindow = function() 
     26var FCKDebug =  
    2727{ 
    28         if ( !this.DebugWindow || this.DebugWindow.closed ) 
    29                 this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ; 
     28        Output : function( message, color, noParse ) 
     29        { 
     30                if ( ! FCKConfig.Debug ) 
     31                        return ; 
    3032 
    31         return this.DebugWindow ; 
    32 } 
     33                try 
     34                { 
     35                        this._GetWindow().Output( message, color ) ; 
     36                } 
     37                catch ( e ) {}   // Ignore errors 
     38        }, 
    3339 
    34 FCKDebug.Output = function( message, color, noParse ) 
    35 { 
    36         if ( ! FCKConfig.Debug ) 
    37                 return ; 
    38  
    39         try 
     40        OutputObject : function( anyObject, color ) 
    4041        { 
    41                 this._GetWindow().Output( message, color ) ; 
    42         } 
    43         catch ( e ) {}   // Ignore errors 
    44 } 
     42                if ( !this.DebugWindow || this.DebugWindow.closed ) 
     43                if ( ! FCKConfig.Debug ) 
     44                        return ; 
    4545 
    46 FCKDebug.OutputObject = function( anyObject, color ) 
    47 { 
    48         if ( ! FCKConfig.Debug ) 
    49                 return ; 
     46                try 
     47                { 
     48                        this._GetWindow().OutputObject( anyObject, color ) ; 
     49                } 
     50                catch ( e ) {}   // Ignore errors 
     51        }, 
    5052 
    51         try 
     53        _GetWindow : function() 
    5254        { 
    53                 this._GetWindow().OutputObject( anyObject, color ) ; 
     55                if ( !this.DebugWindow || this.DebugWindow.closed ) 
     56                        this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ; 
     57 
     58                return this.DebugWindow ; 
    5459        } 
    55         catch ( e ) {}   // Ignore errors 
    56 } 
     60} ; 
     61 No newline at end of file 
  • editor/_source/internals/fckdebug_empty.js

     
     1/* 
     2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 
     3 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 
     4 * 
     5 * == BEGIN LICENSE == 
     6 * 
     7 * Licensed under the terms of any of the following licenses at your 
     8 * choice: 
     9 * 
     10 *  - GNU General Public License Version 2 or later (the "GPL") 
     11 *    http://www.gnu.org/licenses/gpl.html 
     12 * 
     13 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 
     14 *    http://www.gnu.org/licenses/lgpl.html 
     15 * 
     16 *  - Mozilla Public License Version 1.1 or later (the "MPL") 
     17 *    http://www.mozilla.org/MPL/MPL-1.1.html 
     18 * 
     19 * == END LICENSE == 
     20 * 
     21 * Debug window control and operations (empty for the compressed files - #2043). 
     22 */ 
     23 
     24var FCKDebug =  
     25{ 
     26        Output : function() 
     27        {}, 
     28 
     29        OutputObject : function() 
     30        {} 
     31} ; 
     32 No newline at end of file 
  • editor/fckeditor.html

     
    103103LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ; 
    104104LoadScript( '_source/internals/fckconfig.js' ) ; 
    105105 
    106 LoadScript( '_source/internals/fckdebug.js' ) ; 
     106LoadScript( '_source/internals/fckdebug_empty.js' ) ; 
    107107LoadScript( '_source/internals/fckdomtools.js' ) ; 
    108108LoadScript( '_source/internals/fcktools.js' ) ; 
    109109LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ; 
     
    237237 
    238238FCKConfig_PreProcess() ; 
    239239 
     240// Load the full debug script. 
     241if ( FCKConfig.Debug ) 
     242        LoadScript( '_source/internals/fckdebug.js' ) ; 
     243 
     244        </script> 
     245        <script type="text/javascript"> 
     246 
    240247var FCK_InternalCSS                     = FCKConfig.FullBasePath + 'css/fck_internal.css' ;                                     // @Packager.RemoveLine 
    241248var FCK_ShowTableBordersCSS     = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ;       // @Packager.RemoveLine 
    242249/* @Packager.RemoveLine 
  • fckpackager.xml

     
    7777                <File path="editor/_source/internals/fck.js" /> 
    7878                <File path="editor/_source/internals/fck_ie.js" /> 
    7979                <File path="editor/_source/internals/fckconfig.js" /> 
    80                 <File path="editor/_source/internals/fckdebug.js" /> 
     80                <File path="editor/_source/internals/fckdebug_empty.js" /> 
    8181                <File path="editor/_source/internals/fckdomtools.js" /> 
    8282                <File path="editor/_source/internals/fcktools.js" /> 
    8383                <File path="editor/_source/internals/fcktools_ie.js" /> 
     
    173173                <File path="editor/_source/internals/fck.js" /> 
    174174                <File path="editor/_source/internals/fck_gecko.js" /> 
    175175                <File path="editor/_source/internals/fckconfig.js" /> 
    176                 <File path="editor/_source/internals/fckdebug.js" /> 
     176                <File path="editor/_source/internals/fckdebug_empty.js" /> 
    177177                <File path="editor/_source/internals/fckdomtools.js" /> 
    178178                <File path="editor/_source/internals/fcktools.js" /> 
    179179                <File path="editor/_source/internals/fcktools_gecko.js" />