Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Jul 20, 6:31 AM

in-portal

Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/frmresourceslist.html
===================================================================
--- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/frmresourceslist.html (revision 4859)
+++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/frmresourceslist.html (revision 4860)
@@ -1,152 +1,190 @@
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: frmresourceslist.html
* This page shows all resources available in a folder in the File Browser.
*
* Version: 2.0 RC3
* Modified: 2005-02-25 22:01:23
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href="Browser.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/common.js"></script>
<script language="javascript">
var oListManager = new Object() ;
oListManager.Init = function()
{
this.Table = document.getElementById('tableFiles') ;
}
oListManager.Clear = function()
{
// Remove all other rows available.
while ( this.Table.rows.length > 0 )
this.Table.deleteRow(0) ;
}
oListManager.AddFolder = function( folderName, folderPath )
{
// Create the new row.
var oRow = this.Table.insertRow(-1) ;
// Build the link to view the folder.
var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ;
-
+
+ var oCell = oRow.insertCell(-1);
+ oCell.width = 16;
+
// Add the folder icon cell.
var oCell = oRow.insertCell(-1) ;
oCell.width = 16 ;
oCell.innerHTML = sLink + '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"></a>' ;
// Add the folder name cell.
oCell = oRow.insertCell(-1) ;
oCell.noWrap = true ;
oCell.colSpan = 2 ;
oCell.innerHTML = '&nbsp;' + sLink + folderName + '</a>' ;
}
oListManager.AddFile = function( fileName, fileUrl, fileSize )
{
// Create the new row.
var oRow = this.Table.insertRow(-1) ;
// Build the link to view the folder.
var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl + '\',\''+fileSize+'\'); return false;">' ;
// Get the file icon.
var sIcon = oIcons.GetIcon( fileName ) ;
+ // Add the checkbox cell
+ var oCell = oRow.insertCell(-1);
+ oCell.width = 16;
+ oCell.innerHTML = '<input type="checkbox" name="file_checkbox" onclick="HandleCheckboxes()"/>';
+
// Add the file icon cell.
var oCell = oRow.insertCell(-1) ;
oCell.width = 16 ;
- oCell.innerHTML = sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' ;
+ oCell.innerHTML = sLink + ' <img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' ;
// Add the file name cell.
oCell = oRow.insertCell(-1) ;
oCell.innerHTML = '&nbsp;' + sLink + fileName + '</a>' ;
// Add the file size cell.
oCell = oRow.insertCell(-1) ;
+ oCell.width = 50;
oCell.noWrap = true ;
oCell.align = 'right' ;
oCell.innerHTML = '&nbsp;' + fileSize + ' KB' ;
+
+ //Add the file date cell.
+ oCell = oRow.insertCell(-1) ;
+ oCell.width = 75;
+ oCell.noWrap = true ;
+ oCell.align = 'right' ;
+ oCell.innerHTML = '07-06-2006' ;
+
+ oCell = oRow.insertCell(-1);
+ oCell.width = 10;
+
+}
+
+function HandleCheckboxes() {
+ var checked_num = 0, i;
+ checkboxes = document.getElementsByName('file_checkbox');
+
+ for (i in checkboxes) {
+ if (checkboxes[i].checked) {
+ checked_num++;
+ }
+ }
+
+ if (checked_num > 0) {
+ window.parent.frames['frmUpload'].SetElementVisibility("none", "");
+ }
+ else {
+ window.parent.frames['frmUpload'].SetElementVisibility("", "none");
+ }
}
function OpenFolder( folderPath )
{
// Load the resources list for this folder.
window.parent.frames['frmFolders'].LoadFolders( folderPath ) ;
}
function OpenFile( fileUrl, fileSize)
{
window.top.opener.SetUrl( fileUrl, '', '', '', fileSize);
window.close() ;
window.top.close() ;
window.top.opener.focus() ;
}
function LoadResources( resourceType, folderPath )
{
oListManager.Clear() ;
oConnector.ResourceType = resourceType ;
oConnector.CurrentFolder = folderPath
oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ;
}
function Refresh()
{
LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ;
}
function GetFoldersAndFilesCallBack( fckXml )
{
// Get the current folder path.
var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
var sCurrentFolderUrl = oNode.attributes.getNamedItem('url').value ;
// Add the Folders.
var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
for ( var i = 0 ; i < oNodes.length ; i++ )
{
var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
oListManager.AddFolder( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ;
}
// Add the Files.
var oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;
for ( var i = 0 ; i < oNodes.length ; i++ )
{
var sFileName = oNodes[i].attributes.getNamedItem('name').value ;
var sFileSize = oNodes[i].attributes.getNamedItem('size').value ;
oListManager.AddFile( sFileName, sCurrentFolderUrl + sFileName, sFileSize ) ;
}
}
window.onload = function()
{
oListManager.Init() ;
window.top.IsLoadedResourcesList = true ;
}
</script>
</head>
<body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
<table id="tableFiles" cellSpacing="1" cellPadding="0" width="100%" border="0">
</table>
</body>
</html>
Property changes on: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/frmresourceslist.html
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property

Event Timeline