fckdialogframe.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <!--
  3. * FCKeditor - The text editor for Internet - http://www.fckeditor.net
  4. * Copyright (C) 2003-2008 Frederico Caldeira Knabben
  5. *
  6. * == BEGIN LICENSE ==
  7. *
  8. * Licensed under the terms of any of the following licenses at your
  9. * choice:
  10. *
  11. * - GNU General Public License Version 2 or later (the "GPL")
  12. * http://www.gnu.org/licenses/gpl.html
  13. *
  14. * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  15. * http://www.gnu.org/licenses/lgpl.html
  16. *
  17. * - Mozilla Public License Version 1.1 or later (the "MPL")
  18. * http://www.mozilla.org/MPL/MPL-1.1.html
  19. *
  20. * == END LICENSE ==
  21. *
  22. * This page is used by all dialog box as the container.
  23. -->
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <title></title>
  27. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  28. <meta name="robots" content="noindex, nofollow" />
  29. <script type="text/javascript">
  30. // <![CDATA[
  31. // Domain relaxation logic.
  32. /*
  33. (function()
  34. {
  35. var d = document.domain ;
  36. while ( true )
  37. {
  38. // Test if we can access a parent property.
  39. try
  40. {
  41. var parentDomain = ( Args().TopWindow || E ).document.domain ;
  42. if ( document.domain != parentDomain )
  43. document.domain = parentDomain ;
  44. break ;
  45. }
  46. catch( e ) {}
  47. // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
  48. d = d.replace( /.*?(?:\.|$)/, '' ) ;
  49. if ( d.length == 0 )
  50. break ; // It was not able to detect the domain.
  51. document.domain = d ;
  52. }
  53. })() ;
  54. */
  55. var E = window.parent.InnerDialogLoaded() ;
  56. var F = E ;
  57. //var E = frameElement._DialogArguments.Editor ;
  58. // It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE.
  59. // So let's use functions to access its members instead.
  60. function Args()
  61. {
  62. return F ;
  63. //return frameElement._DialogArguments ;
  64. }
  65. E = E.Editor ;
  66. var FCK = E.FCK ;
  67. var FCKTools = E.FCKTools ;
  68. var FCKDomTools = E.FCKDomTools ;
  69. var FCKDialog = E.FCKDialog ;
  70. var FCKBrowserInfo = E.FCKBrowserInfo ;
  71. var FCKConfig = E.FCKConfig ;
  72. // Steal the focus so that the caret would no longer stay in the editor iframe.
  73. window.focus() ;
  74. // Dialog's size
  75. var WindowSize= '480px';
  76. // Sets the language direction.
  77. var langDir = document.documentElement.dir = E.FCKLang.Dir ;
  78. // For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser.
  79. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
  80. document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ;
  81. FCKTools.RegisterDollarFunction( window ) ;
  82. // Sets the Skin CSS
  83. document.write( '<link href="' + FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
  84. // The business logic of the dialog, dealing with operational things like
  85. // dialog open/dialog close/enable/disable/etc.
  86. (function()
  87. {
  88. window.Init = function()
  89. {
  90. LoadInnerDialog() ;
  91. FCKTools.DisableSelection( document.body ) ;
  92. // Make the title area draggable.
  93. var titleElement = $( 'header' ) ;
  94. } ;
  95. window.LoadInnerDialog = function()
  96. {
  97. if ( window.onresize )
  98. window.onresize() ;
  99. // First of all, translate the dialog box contents.
  100. //E.FCKLanguageManager.TranslatePage( document ) ;
  101. // Create the IFRAME that holds the dialog contents.
  102. window.frames["frmMain"].document.location.href = Args().Page ;
  103. //$( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"><\/iframe>' ;
  104. } ;
  105. window.InnerDialogLoaded = function()
  106. {
  107. // If the dialog has been closed before the iframe is loaded, do nothing.
  108. if ( !frameElement.parentNode )
  109. return null ;
  110. var frmMain = $('frmMain') ;
  111. var innerWindow = frmMain.contentWindow ;
  112. var innerDoc = innerWindow.document ;
  113. return E ;
  114. } ;
  115. })() ;
  116. // ]]>
  117. </script>
  118. </head>
  119. <body onload="javascript: Init();" class="PopupBody">
  120. <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
  121. <tr>
  122. <td id="TitleArea" class="PopupTitleSimple">
  123. <script type="text/javascript">
  124. // <![CDATA[
  125. document.write( Args().Title ) ;
  126. // ]]>
  127. </script>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td id="FrameCell" height="100%" valign="top">
  132. <iframe id="frmMain" src="fckblank.html" name="frmMain" frameborder="0" height="505px" width="100%" scrolling="no">
  133. </iframe>
  134. </td>
  135. </tr>
  136. </table>
  137. </body>
  138. </html>