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

Merged all changes in trunk up to r2121.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/new_samples/editor/filemanager/connectors/py/fckoutput.py

    r1791 r2123  
    102102                self.setHttpHeaders("text/html") 
    103103                "This is the function that sends the results of the uploading process" 
     104 
     105                "Minified version of the document.domain automatic fix script (#1919)." 
     106                "The original script can be found at _dev/domain_fix_template.js" 
    104107                return """<script type="text/javascript"> 
    105                         (function() 
    106                         { 
    107                                 var d = document.domain ; 
    108  
    109                                 while ( true ) 
    110                                 { 
    111                                         // Test if we can access a parent property. 
    112                                         try 
    113                                         { 
    114                                                 var test = window.top.opener.document.domain ; 
    115                                                 break ; 
    116                                         } 
    117                                         catch( e ) {} 
    118  
    119                                         // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    120                                         d = d.replace( /.*?(?:\.|$)/, '' ) ; 
    121  
    122                                         if ( d.length == 0 ) 
    123                                                 break ;         // It was not able to detect the domain. 
    124  
    125                                         try 
    126                                         { 
    127                                                 document.domain = d ; 
    128                                         } 
    129                                         catch (e) 
    130                                         { 
    131                                                 break ; 
    132                                         } 
    133                                 } 
    134                         })() ; 
     108                        (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;}}})(); 
    135109 
    136110                        window.parent.OnUploadCompleted(%(errorNumber)s,"%(fileUrl)s","%(fileName)s","%(customMsg)s");