Changeset 2123 for FCKeditor/branches/features/new_samples/editor/filemanager/connectors/lasso/upload.lasso
- Timestamp:
- 2008-06-24 12:06:29 (7 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/new_samples/editor/filemanager/connectors/lasso/upload.lasso
r1797 r2123 75 75 -description='Sets the HTML response for the FCKEditor Quick Upload feature.' 76 76 ); 77 $__html_reply__ = '\78 <script type="text/javascript">79 (function()80 {81 var d = document.domain ;82 77 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">'; 92 79 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;}}})();"; 95 84 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__ + '\ 109 86 window.parent.OnUploadCompleted(' + #errorNumber + ',"' 110 87 + string_replace(#fileUrl, -find='"', -replace='\\"') + '","'