Show
Ignore:
Timestamp:
2008-03-25 08:57:35 (6 months ago)
Author:
wwalc
Message:

Fix for #1919 (file browser & relaxation mode issue)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/filemanager/connectors/py/fckoutput.py

    r1565 r1791  
    103103                "This is the function that sends the results of the uploading process" 
    104104                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                        })() ; 
     135 
    105136                        window.parent.OnUploadCompleted(%(errorNumber)s,"%(fileUrl)s","%(fileName)s","%(customMsg)s"); 
    106137                        </script>""" % {