/EQT_V1/EQTWebApp/fckeditor/editor/filemanager/browser/default/browser.html

http://sgsoft-las.googlecode.com/ · HTML · 200 lines · 148 code · 30 blank · 22 comment · 0 complexity · 1c418618396ec67e9ea2630a36ac0ba7 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
  2. "http://www.w3.org/TR/html4/frameset.dtd">
  3. <!--
  4. * FCKeditor - The text editor for Internet - http://www.fckeditor.net
  5. * Copyright (C) 2003-2009 Frederico Caldeira Knabben
  6. *
  7. * == BEGIN LICENSE ==
  8. *
  9. * Licensed under the terms of any of the following licenses at your
  10. * choice:
  11. *
  12. * - GNU General Public License Version 2 or later (the "GPL")
  13. * http://www.gnu.org/licenses/gpl.html
  14. *
  15. * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  16. * http://www.gnu.org/licenses/lgpl.html
  17. *
  18. * - Mozilla Public License Version 1.1 or later (the "MPL")
  19. * http://www.mozilla.org/MPL/MPL-1.1.html
  20. *
  21. * == END LICENSE ==
  22. *
  23. * This page compose the File Browser dialog frameset.
  24. -->
  25. <html>
  26. <head>
  27. <title>FCKeditor - Resources Browser</title>
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  29. <link href="browser.css" type="text/css" rel="stylesheet">
  30. <script type="text/javascript" src="js/fckxml.js"></script>
  31. <script type="text/javascript">
  32. // Automatically detect the correct document.domain (#1919).
  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 test = window.opener.document.domain ;
  42. break ;
  43. }
  44. catch( e )
  45. {}
  46. // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
  47. d = d.replace( /.*?(?:\.|$)/, '' ) ;
  48. if ( d.length == 0 )
  49. break ; // It was not able to detect the domain.
  50. try
  51. {
  52. document.domain = d ;
  53. }
  54. catch (e)
  55. {
  56. break ;
  57. }
  58. }
  59. })() ;
  60. function GetUrlParam( paramName )
  61. {
  62. var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
  63. var oMatch = oRegex.exec( window.top.location.search ) ;
  64. if ( oMatch && oMatch.length > 1 )
  65. return decodeURIComponent( oMatch[1] ) ;
  66. else
  67. return '' ;
  68. }
  69. var oConnector = new Object() ;
  70. oConnector.CurrentFolder = '/' ;
  71. var sConnUrl = GetUrlParam( 'Connector' ) ;
  72. // Gecko has some problems when using relative URLs (not starting with slash).
  73. if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 )
  74. sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ;
  75. oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
  76. var sServerPath = GetUrlParam( 'ServerPath' ) ;
  77. if ( sServerPath.length > 0 )
  78. oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ;
  79. oConnector.ResourceType = GetUrlParam( 'Type' ) ;
  80. oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
  81. if ( oConnector.ShowAllTypes )
  82. oConnector.ResourceType = 'File' ;
  83. oConnector.SendCommand = function( command, params, callBackFunction )
  84. {
  85. var sUrl = this.ConnectorUrl + 'Command=' + command ;
  86. sUrl += '&Type=' + this.ResourceType ;
  87. sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;
  88. if ( params ) sUrl += '&' + params ;
  89. // Add a random salt to avoid getting a cached version of the command execution
  90. sUrl += '&uuid=' + new Date().getTime() ;
  91. var oXML = new FCKXml() ;
  92. if ( callBackFunction )
  93. oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
  94. else
  95. return oXML.LoadUrl( sUrl ) ;
  96. return null ;
  97. }
  98. oConnector.CheckError = function( responseXml )
  99. {
  100. var iErrorNumber = 0 ;
  101. var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
  102. if ( oErrorNode )
  103. {
  104. iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ;
  105. switch ( iErrorNumber )
  106. {
  107. case 0 :
  108. break ;
  109. case 1 : // Custom error. Message placed in the "text" attribute.
  110. alert( oErrorNode.attributes.getNamedItem('text').value ) ;
  111. break ;
  112. case 101 :
  113. alert( 'Folder already exists' ) ;
  114. break ;
  115. case 102 :
  116. alert( 'Invalid folder name' ) ;
  117. break ;
  118. case 103 :
  119. alert( 'You have no permissions to create the folder' ) ;
  120. break ;
  121. case 110 :
  122. alert( 'Unknown error creating folder' ) ;
  123. break ;
  124. default :
  125. alert( 'Error on your request. Error number: ' + iErrorNumber ) ;
  126. break ;
  127. }
  128. }
  129. return iErrorNumber ;
  130. }
  131. var oIcons = new Object() ;
  132. oIcons.AvailableIconsArray = [
  133. 'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
  134. 'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
  135. oIcons.AvailableIcons = new Object() ;
  136. for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
  137. oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
  138. oIcons.GetIcon = function( fileName )
  139. {
  140. var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
  141. if ( this.AvailableIcons[ sExtension ] == true )
  142. return sExtension ;
  143. else
  144. return 'default.icon' ;
  145. }
  146. function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
  147. {
  148. if (errorNumber == "1")
  149. window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ;
  150. else
  151. window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
  152. }
  153. </script>
  154. </head>
  155. <frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
  156. <frameset rows="50,*" framespacing="0">
  157. <frame src="frmresourcetype.html" scrolling="no" frameborder="0">
  158. <frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1">
  159. </frameset>
  160. <frameset rows="50,*,50" framespacing="0">
  161. <frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
  162. <frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
  163. <frameset cols="150,*,0" framespacing="0" frameborder="0">
  164. <frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
  165. <frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
  166. <frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0">
  167. </frameset>
  168. </frameset>
  169. </frameset>
  170. </html>