Changeset 2123 for FCKeditor/branches

Show
Ignore:
Timestamp:
2008-06-24 12:06:29 (5 months ago)
Author:
martinkou
Message:

Merged all changes in trunk up to r2121.

Location:
FCKeditor/branches/features/new_samples
Files:
44 modified
2 copied

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/new_samples/_dev/build_release.bat

    r1826 r2123  
    2626 
    2727:: Update this variable for each new release. 
    28 SET RELEASER_VERSION=2.6.1 (SVN) 
     28SET RELEASER_VERSION=2.6.3 (SVN) 
    2929 
    3030CLS 
  • FCKeditor/branches/features/new_samples/_dev/domain_fix_template.js

    r1799 r2123  
    2626// ### Minified Script (must be updated on changes in the original below). 
    2727 
    28 (function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
     28(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
    2929 
    3030// ### Original Script. 
     
    3939                try 
    4040                { 
    41                         var test = window.top.opener.document.domain ; 
     41                        var test = window.parent.document.domain ; 
    4242                        break ; 
    4343                } 
  • FCKeditor/branches/features/new_samples/editor/dialog/common/fck_dialog_common.js

    r2019 r2123  
    6060        return ( prefix || '' ) + 'common/fck_dialog_common.css' ;      // @Packager.RemoveLine 
    6161        /* @Packager.RemoveLine 
    62         // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor 
     62        // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). 
    6363        return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ; 
    6464        @Packager.RemoveLine */ 
  • FCKeditor/branches/features/new_samples/editor/dialog/fck_replace.html

    r2030 r2123  
    6060GetNextNonEmptyTextNode = function( node, stopNode ) 
    6161{ 
    62         var node ; 
    63         while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 ) ; 
     62        while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 ) 
     63                1 ; 
    6464        return node ; 
    6565} 
  • FCKeditor/branches/features/new_samples/editor/fckeditor.html

    r1771 r2123  
    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' ) ; 
     
    238238FCKConfig_PreProcess() ; 
    239239 
    240 var FCK_InternalCSS                     = FCKConfig.FullBasePath + 'css/fck_internal.css' ;                                     // @Packager.RemoveLine 
    241 var FCK_ShowTableBordersCSS     = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ;       // @Packager.RemoveLine 
     240// Load the full debug script. 
     241if ( FCKConfig.Debug ) 
     242        LoadScript( '_source/internals/fckdebug.js' ) ; 
     243 
     244        </script> 
     245        <script type="text/javascript"> 
     246 
     247var FCK_InternalCSS                     = FCKConfig.BasePath + 'css/fck_internal.css' ;                                 // @Packager.RemoveLine 
     248var FCK_ShowTableBordersCSS     = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ;   // @Packager.RemoveLine 
    242249/* @Packager.RemoveLine 
    243 // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor 
    244 var FCK_InternalCSS                     = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; 
    245 var FCK_ShowTableBordersCSS     = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; 
     250// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). 
     251var FCK_InternalCSS                     = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; 
     252var FCK_ShowTableBordersCSS     = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; 
    246253@Packager.RemoveLine */ 
    247254 
  • FCKeditor/branches/features/new_samples/editor/filemanager/browser/default/browser.html

    r1985 r2123  
    4343                        break ; 
    4444                } 
    45                 catch( e ) {} 
     45                catch( e ) 
     46                {} 
    4647 
    4748                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
  • FCKeditor/branches/features/new_samples/editor/filemanager/browser/default/frmactualfolder.html

    r1985 r2123  
    4141                        break ; 
    4242                } 
    43                 catch( e ) {} 
     43                catch( e ) 
     44                {} 
    4445 
    4546                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
  • FCKeditor/branches/features/new_samples/editor/filemanager/browser/default/js/common.js

    r1791 r2123  
    3636                        break ; 
    3737                } 
    38                 catch( e ) {} 
     38                catch( e ) 
     39                {} 
    3940 
    4041                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
  • FCKeditor/branches/features/new_samples/editor/filemanager/browser/default/js/fckxml.js

    r1805 r2123  
    6262                        if ( oXmlHttp.readyState == 4 ) 
    6363                        { 
    64                                 if ( ( oXmlHttp.status != 200 && oXmlHttp.status != 304 ) || oXmlHttp.responseXML == null || oXmlHttp.responseXML.firstChild == null ) 
     64                                var oXml ; 
     65                                try 
     66                                { 
     67                                        // this is the same test for an FF2 bug as in fckxml_gecko.js 
     68                                        // but we've moved the responseXML assignment into the try{} 
     69                                        // so we don't even have to check the return status codes. 
     70                                        var test = oXmlHttp.responseXML.firstChild ; 
     71                                        oXml = oXmlHttp.responseXML ; 
     72                                } 
     73                                catch ( e ) 
     74                                { 
     75                                        try 
     76                                        { 
     77                                                oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; 
     78                                        } 
     79                                        catch ( e ) {} 
     80                                } 
     81 
     82                                if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' ) 
    6583                                { 
    6684                                        alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' + 
     
    7189                                } 
    7290 
    73                                 oFCKXml.DOMDocument = oXmlHttp.responseXML ; 
     91                                oFCKXml.DOMDocument = oXml ; 
    7492                                asyncFunctionPointer( oFCKXml ) ; 
    7593                        } 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/asp/basexml.asp

    r1565 r2123  
    3131 
    3232        ' Set the response format. 
     33        Response.CodePage               = 65001 
    3334        Response.CharSet                = "UTF-8" 
    3435        Response.ContentType    = "text/xml" 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/asp/io.asp

    r2037 r2123  
    225225        Response.Clear 
    226226        Response.Write "<script type=""text/javascript"">" 
    227         Response.Write "(function()" 
    228         Response.Write "{" 
    229         Response.Write "var d = document.domain ;" 
    230  
    231         Response.Write " while ( true )" 
    232         Response.Write "        {" 
    233         ' Test if we can access a parent property. 
    234         Response.Write "                try" 
    235         Response.Write "                {" 
    236         Response.Write "                        var test = window.top.opener.document.domain ;" 
    237         Response.Write "                        break ;" 
    238         Response.Write "                }" 
    239         Response.Write "                catch( e ) {}" 
    240  
    241         ' Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    242         Response.Write "                d = d.replace( /.*?(?:\.|$)/, '' ) ;" 
    243  
    244         Response.Write "                if ( d.length == 0 )" 
    245         ' It was not able to detect the domain. 
    246         Response.Write "                        break ;" 
    247         Response.Write "" 
    248         Response.Write "                try" 
    249         Response.Write "                {" 
    250         Response.Write "                        document.domain = d ;" 
    251         Response.Write "                }" 
    252         Response.Write "                catch (e)" 
    253         Response.Write "                {" 
    254         Response.Write "                        break ;" 
    255         Response.Write "                }" 
    256         Response.Write "        }" 
    257         Response.Write "})() ;" 
     227        ' Minified version of the document.domain automatic fix script (#1919). 
     228        ' The original script can be found at _dev/domain_fix_template.js 
     229        Response.Write "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" 
    258230 
    259231        Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", "\""" ) & """,""" & Replace( fileName, """", "\""" ) & """,""" & Replace( customMsg , """", "\""" ) & """) ;" 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/cfm/cf5_upload.cfm

    r1797 r2123  
    4848        { 
    4949                WriteOutput('<script type="text/javascript">'); 
    50                 WriteOutput("(function()"& 
    51 "{"& 
    52 "       var d = document.domain ;"& 
    53 ""& 
    54 "       while ( true )"& 
    55 "       {"& 
    56                 // Test if we can access a parent property. 
    57 "               try"& 
    58 "               {"& 
    59 "                       var test = window.top.opener.document.domain ;"& 
    60 "                       break ;"& 
    61 "               }"& 
    62 "               catch( e ) {}"& 
    63 ""& 
    64                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    65 "               d = d.replace( /.*?(?:\.|$)/, '' ) ;"& 
    66 ""& 
    67 "               if ( d.length == 0 )"& 
    68                         // It was not able to detect the domain. 
    69 "                       break ;"& 
    70 ""& 
    71 "               try"& 
    72 "               {"& 
    73 "                       document.domain = d ;"& 
    74 "               }"& 
    75 "               catch (e)"& 
    76 "               {"& 
    77 "                       break ;"& 
    78 "               }"& 
    79 "       }"& 
    80 "})() ;"); 
    81  
     50                // Minified version of the document.domain automatic fix script (#1919). 
     51                // The original script can be found at _dev/domain_fix_template.js 
     52                WriteOutput("(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"); 
    8253                WriteOutput('window.parent.OnUploadCompleted(' & errorNumber & ', "' & JSStringFormat(fileUrl) & '", "' & JSStringFormat(fileName) & '", "' & JSStringFormat(customMsg) & '");' ); 
    8354                WriteOutput('</script>'); 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/cfm/cf_io.cfm

    r1797 r2123  
    266266        <cfargument name="customMsg" required="false" type="String" default=""> 
    267267 
     268        <!--- Minified version of the document.domain automatic fix script (#1919). 
     269        The original script can be found at _dev/domain_fix_template.js ---> 
    268270        <cfoutput> 
    269271<script type="text/javascript"> 
    270 (function() 
    271 { 
    272         var d = document.domain ; 
    273  
    274         while ( true ) 
    275         { 
    276                 // Test if we can access a parent property. 
    277                 try 
    278                 { 
    279                         var test = window.top.opener.document.domain ; 
    280                         break ; 
    281                 } 
    282                 catch( e ) {} 
    283  
    284                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    285                 d = d.replace( /.*?(?:\.|$)/, '' ) ; 
    286  
    287                 if ( d.length == 0 ) 
    288                         break ;         // It was not able to detect the domain. 
    289  
    290                 try 
    291                 { 
    292                         document.domain = d ; 
    293                 } 
    294                 catch (e) 
    295                 { 
    296                         break ; 
    297                 } 
    298         } 
    299 })() ; 
    300  
    301                         window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" ); 
    302                 </script> 
     272(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
     273window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" ); 
     274</script> 
    303275        </cfoutput> 
    304276        <cfabort> 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/lasso/upload.lasso

    r1797 r2123  
    7575                -description='Sets the HTML response for the FCKEditor Quick Upload feature.' 
    7676        ); 
    77                 $__html_reply__ = '\ 
    78 <script type="text/javascript"> 
    79 (function() 
    80 { 
    81         var d = document.domain ; 
    8277 
    83         while ( true ) 
    84         { 
    85                 // Test if we can access a parent property. 
    86                 try 
    87                 { 
    88                         var test = window.top.opener.document.domain ; 
    89                         break ; 
    90                 } 
    91                 catch( e ) {} 
     78                $__html_reply__ = '<script type="text/javascript">'; 
    9279 
    93                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    94                 d = d.replace( /.*?(?:\\.|$)/, "" ) ; 
     80                // Minified version of the document.domain automatic fix script (#1919). 
     81                // The original script can be found at _dev/domain_fix_template.js 
     82                // Note: in Lasso replace \ with \\ 
     83                $__html_reply__ = $__html_reply__ + "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"; 
    9584 
    96                 if ( d.length == 0 ) 
    97                         break ;         // It was not able to detect the domain. 
    98  
    99                 try 
    100                 { 
    101                         document.domain = d ; 
    102                 } 
    103                 catch (e) 
    104                 { 
    105                         break ; 
    106                 } 
    107         } 
    108 })() ; 
     85                $__html_reply__ = $__html_reply__ + '\ 
    10986        window.parent.OnUploadCompleted(' + #errorNumber + ',"' 
    11087                + string_replace(#fileUrl, -find='"', -replace='\\"') + '","' 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/perl/commands.pl

    r1791 r2123  
    170170        local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_; 
    171171 
     172        # Minified version of the document.domain automatic fix script (#1919). 
     173        # The original script can be found at _dev/domain_fix_template.js 
     174        # Note: in Perl replace \ with \\ and $ with \$ 
    172175        print <<EOF; 
    173176Content-type: text/html 
    174177 
    175178<script type="text/javascript"> 
    176 // Automatically detect the correct document.domain (#1919). 
    177 (function() 
    178 { 
    179         var d = document.domain ; 
    180  
    181         while ( true ) 
    182         { 
    183                 // Test if we can access a parent property. 
    184                 try 
    185                 { 
    186                         var test = window.top.opener.document.domain ; 
    187                         break ; 
    188                 } 
    189                 catch( e ) {} 
    190  
    191                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    192                 d = d.replace( /.*?(?:\\.|\$)/, '' ) ; 
    193  
    194                 if ( d.length == 0 ) 
    195                         break ;         // It was not able to detect the domain. 
    196  
    197                 try 
    198                 { 
    199                         document.domain = d ; 
    200                 } 
    201                 catch (e) 
    202                 { 
    203                         break ; 
    204                 } 
    205         } 
    206 })() ; 
     179(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
    207180 
    208181EOF 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/php/io.php

    r1998 r2123  
    280280function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) 
    281281{ 
     282        // Minified version of the document.domain automatic fix script (#1919). 
     283        // The original script can be found at _dev/domain_fix_template.js 
    282284        echo <<<EOF 
    283285<script type="text/javascript"> 
    284 (function() 
    285 { 
    286         var d = document.domain ; 
    287  
    288         while ( true ) 
    289         { 
    290                 // Test if we can access a parent property. 
    291                 try 
    292                 { 
    293                         var test = window.top.opener.document.domain ; 
    294                         break ; 
    295                 } 
    296                 catch( e ) {} 
    297  
    298                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    299                 d = d.replace( /.*?(?:\.|$)/, '' ) ; 
    300  
    301                 if ( d.length == 0 ) 
    302                         break ;         // It was not able to detect the domain. 
    303  
    304                 try 
    305                 { 
    306                         document.domain = d ; 
    307                 } 
    308                 catch (e) 
    309                 { 
    310                         break ; 
    311                 } 
    312         } 
    313 })() ; 
    314  
     286(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
    315287EOF; 
     288 
    316289        $rpl = array( '\\' => '\\\\', '"' => '\\"' ) ; 
    317290        echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ; 
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/py/fckoutput.py

    r1791 r2123