+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
-<!--\r
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
- * Copyright (C) 2003-2010 Frederico Caldeira Knabben\r
- *\r
- * == BEGIN LICENSE ==\r
- *\r
- * Licensed under the terms of any of the following licenses at your\r
- * choice:\r
- *\r
- * - GNU General Public License Version 2 or later (the "GPL")\r
- * http://www.gnu.org/licenses/gpl.html\r
- *\r
- * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
- * http://www.gnu.org/licenses/lgpl.html\r
- *\r
- * - Mozilla Public License Version 1.1 or later (the "MPL")\r
- * http://www.mozilla.org/MPL/MPL-1.1.html\r
- *\r
- * == END LICENSE ==\r
- *\r
- * This page shows all resources available in a folder in the File Browser.\r
--->\r
-<html>\r
-<head>\r
- <title>Resources</title>\r
- <link href="browser.css" type="text/css" rel="stylesheet">\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
- <script type="text/javascript" src="js/common.js"></script>\r
- <script type="text/javascript">\r
-\r
-var oListManager = new Object() ;\r
-\r
-oListManager.Clear = function()\r
-{\r
- document.body.innerHTML = '' ;\r
-}\r
-\r
-function ProtectPath(path)\r
-{\r
- path = path.replace( /\\/g, '\\\\') ;\r
- path = path.replace( /'/g, '\\\'') ;\r
- return path ;\r
-}\r
-\r
-oListManager.GetFolderRowHtml = function( folderName, folderPath )\r
-{\r
- // Build the link to view the folder.\r
- var sLink = '<a href="#" onclick="OpenFolder(\'' + ProtectPath( folderPath ) + '\');return false;">' ;\r
-\r
- return '<tr>' +\r
- '<td width="16">' +\r
- sLink +\r
- '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"><\/a>' +\r
- '<\/td><td nowrap colspan="2"> ' +\r
- sLink +\r
- folderName +\r
- '<\/a>' +\r
- '<\/td><\/tr>' ;\r
-}\r
-\r
-oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )\r
-{\r
- // Build the link to view the folder.\r
- var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ;\r
-\r
- // Get the file icon.\r
- var sIcon = oIcons.GetIcon( fileName ) ;\r
-\r
- return '<tr>' +\r
- '<td width="16">' +\r
- sLink +\r
- '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"><\/a>' +\r
- '<\/td><td> ' +\r
- sLink +\r
- fileName +\r
- '<\/a>' +\r
- '<\/td><td align="right" nowrap> ' +\r
- fileSize +\r
- ' KB' +\r
- '<\/td><\/tr>' ;\r
-}\r
-\r
-function OpenFolder( folderPath )\r
-{\r
- // Load the resources list for this folder.\r
- window.parent.frames['frmFolders'].LoadFolders( folderPath ) ;\r
-}\r
-\r
-function OpenFile( fileUrl )\r
-{\r
- window.top.opener.SetUrl( fileUrl ) ;\r
- window.top.close() ;\r
- window.top.opener.focus() ;\r
-}\r
-\r
-function LoadResources( resourceType, folderPath )\r
-{\r
- oListManager.Clear() ;\r
- oConnector.ResourceType = resourceType ;\r
- oConnector.CurrentFolder = folderPath ;\r
- oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ;\r
-}\r
-\r
-function Refresh()\r
-{\r
- LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ;\r
-}\r
-\r
-function GetFoldersAndFilesCallBack( fckXml )\r
-{\r
- if ( oConnector.CheckError( fckXml ) != 0 )\r
- return ;\r
-\r
- // Get the current folder path.\r
- var oFolderNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;\r
- if ( oFolderNode == null )\r
- {\r
- alert( 'The server didn\'t reply with a proper XML data. Please check your configuration.' ) ;\r
- return ;\r
- }\r
- var sCurrentFolderPath = oFolderNode.attributes.getNamedItem('path').value ;\r
- var sCurrentFolderUrl = oFolderNode.attributes.getNamedItem('url').value ;\r
-\r
-// var dTimer = new Date() ;\r
-\r
- var oHtml = new StringBuilder( '<table id="tableFiles" cellspacing="1" cellpadding="0" width="100%" border="0">' ) ;\r
-\r
- // Add the Folders.\r
- var oNodes ;\r
- oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;\r
- for ( var i = 0 ; i < oNodes.length ; i++ )\r
- {\r
- var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;\r
- oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ) ;\r
- }\r
-\r
- // Add the Files.\r
- oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;\r
- for ( var j = 0 ; j < oNodes.length ; j++ )\r
- {\r
- var oNode = oNodes[j] ;\r
- var sFileName = oNode.attributes.getNamedItem('name').value ;\r
- var sFileSize = oNode.attributes.getNamedItem('size').value ;\r
-\r
- // Get the optional "url" attribute. If not available, build the url.\r
- var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ;\r
- var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : encodeURI( sCurrentFolderUrl + sFileName ).replace( /#/g, '%23' ) ;\r
-\r
- oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;\r
- }\r
-\r
- oHtml.Append( '<\/table>' ) ;\r
-\r
- document.body.innerHTML = oHtml.ToString() ;\r
-\r
-// window.top.document.title = 'Finished processing in ' + ( ( ( new Date() ) - dTimer ) / 1000 ) + ' seconds' ;\r
-\r
-}\r
-\r
-window.onload = function()\r
-{\r
- window.top.IsLoadedResourcesList = true ;\r
-}\r
- </script>\r
-</head>\r
-<body class="FileArea">\r
-</body>\r
-</html>\r