/lib/ckfinder/ckfinder.html

http://speedcms.googlecode.com/ · HTML · 127 lines · 104 code · 23 blank · 0 comment · 0 complexity · f0a8958e69fb711610c6396a8e4faeb7 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>CKFinder 2</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript" src="ckfinder.js"></script>
  7. <style type="text/css">
  8. body, html, iframe, #ckfinder {
  9. margin: 0;
  10. padding: 0;
  11. border: 0;
  12. width: 100%;
  13. height: 100%;
  14. overflow: hidden;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div id="ckfinder"></div>
  20. <script type="text/javascript">
  21. (function()
  22. {
  23. var config = {
  24. };
  25. var get = CKFinder.tools.getUrlParam;
  26. var getBool = function( v )
  27. {
  28. var t = get( v );
  29. if ( t === null )
  30. return null;
  31. return t == '0' ? false : true;
  32. };
  33. var tmp;
  34. if ( tmp = get( 'basePath' ) )
  35. CKFINDER.basePath = tmp;
  36. if ( tmp = get( 'startupPath' ) )
  37. config.startupPath = decodeURIComponent( tmp );
  38. config.id = get( 'id' ) || '';
  39. if ( ( tmp = getBool( 'rlf' ) ) !== null )
  40. config.rememberLastFolder = tmp;
  41. if ( ( tmp = getBool( 'dts' ) ) !== null )
  42. config.disableThumbnailSelection = tmp;
  43. if ( tmp = get( 'data' ) )
  44. config.selectActionData = tmp;
  45. if ( tmp = get( 'tdata' ) )
  46. config.selectThumbnailActionData = tmp;
  47. if ( tmp = get( 'type' ) )
  48. config.resourceType = tmp;
  49. if ( tmp = get( 'skin' ) )
  50. config.skin = tmp;
  51. if ( tmp = get( 'langCode' ) )
  52. config.language = tmp;
  53. // Try to get desired "File Select" action from the URL.
  54. var action;
  55. if ( tmp = get( 'CKEditor' ) )
  56. {
  57. if ( tmp.length )
  58. action = 'ckeditor';
  59. }
  60. if ( !action )
  61. action = get( 'action' );
  62. var parentWindow = ( window.parent == window )
  63. ? window.opener : window.parent;
  64. switch ( action )
  65. {
  66. case 'js':
  67. var actionFunction = get( 'func' );
  68. if ( actionFunction && actionFunction.length > 0 )
  69. config.selectActionFunction = parentWindow[ actionFunction ];
  70. actionFunction = get( 'thumbFunc' );
  71. if ( actionFunction && actionFunction.length > 0 )
  72. config.selectThumbnailActionFunction = parentWindow[ actionFunction ];
  73. break ;
  74. case 'ckeditor':
  75. var funcNum = get( 'CKEditorFuncNum' );
  76. if ( parentWindow['CKEDITOR'] )
  77. {
  78. config.selectActionFunction = function( fileUrl, data )
  79. {
  80. parentWindow['CKEDITOR'].tools.callFunction( funcNum, fileUrl, data );
  81. };
  82. config.selectThumbnailActionFunction = config.selectActionFunction;
  83. }
  84. break;
  85. default:
  86. if ( parentWindow && parentWindow['FCK'] && parentWindow['SetUrl'] )
  87. {
  88. action = 'fckeditor' ;
  89. config.selectActionFunction = parentWindow['SetUrl'];
  90. if ( !config.disableThumbnailSelection )
  91. config.selectThumbnailActionFunction = parentWindow['SetUrl'];
  92. }
  93. else
  94. action = null ;
  95. }
  96. config.action = action;
  97. // Always use 100% width and height when nested using this middle page.
  98. config.width = config.height = '100%';
  99. var ckfinder = new CKFinder( config );
  100. ckfinder.replace( 'ckfinder', config );
  101. })();
  102. </script>
  103. </body>
  104. </html>