Changeset 1383

Show
Ignore:
Timestamp:
2008-01-22 06:50:46 (7 months ago)
Author:
martinkou
Message:

Removed changes in fckdebug.html from floating dialog branch in respect to the trunk.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/floating_dialog/editor/fckdebug.html

    r1262 r1383  
    3131var oWindow ; 
    3232var oDiv ; 
    33 var sOriginalDomain = document.domain ; 
    34  
    35 // Automatically detect the correct document.domain (#123). 
    36 (function() 
    37 { 
    38         var d = document.domain ; 
    39  
    40         while ( true ) 
    41         { 
    42                 // Test if we can access a parent property. 
    43                 try 
    44                 { 
    45                         var parentDomain = window.opener.document.domain ; 
    46  
    47                         if ( document.domain != parentDomain ) 
    48                                 document.domain = parentDomain ; 
    49                         break ; 
    50                 } 
    51                 catch( e ) {} 
    52  
    53                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    54                 d = d.replace( /.*?(?:\.|$)/, '' ) ; 
    55  
    56                 if ( d.length == 0 ) 
    57                         break ;         // It was not able to detect the domain. 
    58  
    59                 document.domain = d ; 
    60         } 
    61 })(); 
    62 var bDomainChanged = ( sOriginalDomain != document.domain ) ; 
    6333 
    6434if ( !window.FCKMessages ) 
     
    6737window.onload = function() 
    6838{ 
    69         oFrame = document.getElementById('xOutput') ; 
    70         if ( bDomainChanged ) 
    71         { 
    72                 var sUrl = 'javascript: void( function(){' + 
    73                         'document.open() ;' + 
    74                         'document.domain = "' + document.domain + '" ;' + 
    75                         'document.write( "<div id=\\"divMsg\\"><\/div>" ) ;' + 
    76                         'document.close() ;' + 
    77                         '}() ) ;'; 
    78                 oFrame.src = sUrl ; 
    79                 setTimeout( function() 
    80                 { 
    81                         oWindow = oFrame.contentWindow ; 
    82                         oDiv    = oWindow.document.getElementById('divMsg') ; 
    83                 }, 1 ) ; 
    84         } 
    85         else 
    86         { 
    87                 oWindow = oFrame.contentWindow ; 
    88                 oWindow.document.open() ; 
    89                 oWindow.document.write( '<div id="divMsg"><\/div>' ) ; 
    90                 oWindow.document.close() ; 
    91                 oDiv    = oWindow.document.getElementById('divMsg') ; 
    92         } 
     39        oWindow = document.getElementById('xOutput').contentWindow ; 
     40        oWindow.document.open() ; 
     41        oWindow.document.write( '<div id="divMsg"><\/div>' ) ; 
     42        oWindow.document.close() ; 
     43        oDiv    = oWindow.document.getElementById('divMsg') ; 
    9344} 
    9445