FCKeditor 2.6.6
[freeside.git] / httemplate / elements / fckeditor / editor / filemanager / browser / default / frmresourceslist.html
index 3f041f7..3e2771d 100644 (file)
@@ -1,7 +1,7 @@
 <!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-2007 Frederico Caldeira Knabben\r
+ * Copyright (C) 2003-2010 Frederico Caldeira Knabben\r
  *\r
  * == BEGIN LICENSE ==\r
  *\r
  *\r
  * This page shows all resources available in a folder in the File Browser.\r
 -->\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
+<html>\r
 <head>\r
-       <link href="browser.css" type="text/css" rel="stylesheet" />\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
@@ -34,26 +36,33 @@ oListManager.Clear = function()
        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(\'' + folderPath.replace( /'/g, '\\\'') + '\');return false;">' ;\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">&nbsp;' +\r
+                               '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"><\/a>' +\r
+                       '<\/td><td nowrap colspan="2">&nbsp;' +\r
                                sLink +\r
                                folderName +\r
-                               '</a>' +\r
-               '</td></tr>' ;\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(\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">' ;\r
+       var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ;\r
 \r
        // Get the file icon.\r
        var sIcon = oIcons.GetIcon( fileName ) ;\r
@@ -61,15 +70,15 @@ oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )
        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>&nbsp;' +\r
+                               '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"><\/a>' +\r
+                       '<\/td><td>&nbsp;' +\r
                                sLink +\r
                                fileName +\r
-                               '</a>' +\r
-                       '</td><td align="right" nowrap>&nbsp;' +\r
+                               '<\/a>' +\r
+                       '<\/td><td align="right" nowrap>&nbsp;' +\r
                                fileSize +\r
                                ' KB' +\r
-               '</td></tr>' ;\r
+               '<\/td><\/tr>' ;\r
 }\r
 \r
 function OpenFolder( folderPath )\r
@@ -80,7 +89,7 @@ function OpenFolder( folderPath )
 \r
 function OpenFile( fileUrl )\r
 {\r
-       window.top.opener.SetUrl( encodeURI( fileUrl ) ) ;\r
+       window.top.opener.SetUrl( fileUrl ) ;\r
        window.top.close() ;\r
        window.top.opener.focus() ;\r
 }\r
@@ -136,7 +145,7 @@ function GetFoldersAndFilesCallBack( fckXml )
 \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 : sCurrentFolderUrl + sFileName ;\r
+               var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : encodeURI( sCurrentFolderUrl + sFileName ).replace( /#/g, '%23' ) ;\r
 \r
                oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;\r
        }\r
@@ -155,6 +164,6 @@ window.onload = function()
 }\r
        </script>\r
 </head>\r
-<body class="FileArea" bottommargin="10" leftmargin="10" topmargin="10" rightmargin="10">\r
+<body class="FileArea">\r
 </body>\r
 </html>\r