Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
Line -... Line 1...
-
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!--
2
<!--
2
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
4
 * 
7
 *
5
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
-
 
9
 * choice:
-
 
10
 *
-
 
11
 *  - GNU General Public License Version 2 or later (the "GPL")
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
12
 *    http://www.gnu.org/licenses/gpl.html
7
 * 
13
 *
8
 * For further information visit:
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
9
 * 		http://www.fckeditor.net/
15
 *    http://www.gnu.org/licenses/lgpl.html
10
 * 
16
 *
11
 * "Support Open Source software. What about a donation today?"
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
-
 
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
12
 * 
19
 *
13
 * File Name: frmfolders.html
20
 * == END LICENSE ==
-
 
21
 *
14
 * 	This page shows the list of folders available in the parent folder 
22
 * This page shows the list of folders available in the parent folder
15
 * 	of the current folder.
23
 * of the current folder.
16
 * 
-
 
17
 * File Authors:
-
 
18
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
-
 
19
-->
24
-->
20
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
 
21
<html>
25
<html>
22
	<head>
26
	<head>
-
 
27
		<title>Folders</title>
23
		<link href="browser.css" type="text/css" rel="stylesheet">
28
		<link href="browser.css" type="text/css" rel="stylesheet">
-
 
29
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
		<script type="text/javascript" src="js/common.js"></script>
30
		<script type="text/javascript" src="js/common.js"></script>
25
		<script language="javascript">
31
		<script type="text/javascript">
Line 26... Line 32...
26
 
32
 
Line 27... Line 33...
27
var sActiveFolder ;
33
var sActiveFolder ;
28
 
34
 
Line 34... Line 40...
34
oListManager.Init = function()
40
oListManager.Init = function()
35
{
41
{
36
	this.Table = document.getElementById('tableFiles') ;
42
	this.Table = document.getElementById('tableFiles') ;
37
	this.UpRow = document.getElementById('trUp') ;
43
	this.UpRow = document.getElementById('trUp') ;
Line 38... Line 44...
38
 
44
 
39
	this.TableRows = new Object() ;	
45
	this.TableRows = new Object() ;
Line 40... Line 46...
40
}
46
}
41
 
47
 
42
oListManager.Clear = function()
48
oListManager.Clear = function()
Line 59... Line 65...
59
	var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ;
65
	var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ;
Line 60... Line 66...
60
 
66
 
61
	// Add the folder icon cell.
67
	// Add the folder icon cell.
62
	var oCell = oRow.insertCell(-1) ;
68
	var oCell = oRow.insertCell(-1) ;
63
	oCell.width = 16 ;
69
	oCell.width = 16 ;
Line 64... Line 70...
64
	oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"></a>' ;
70
	oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"><\/a>' ;
65
 
71
 
66
	// Add the folder name cell.
72
	// Add the folder name cell.
67
	oCell = oRow.insertCell(-1) ;
73
	oCell = oRow.insertCell(-1) ;
68
	oCell.noWrap = true ;
74
	oCell.noWrap = true ;
69
	oCell.innerHTML = '&nbsp;' + sLink + folderName + '</a>' ;
75
	oCell.innerHTML = '&nbsp;' + sLink + folderName + '<\/a>' ;
70
	
76
 
Line 71... Line 77...
71
	this.TableRows[ folderPath ] = oRow ;
77
	this.TableRows[ folderPath ] = oRow ;
72
}
78
}
73
 
79
 
74
oListManager.ShowUpFolder = function( upFolderPath )
80
oListManager.ShowUpFolder = function( upFolderPath )
75
{
81
{
76
	this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ;
82
	this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ;
77
	
83
 
78
	if ( upFolderPath != null )
84
	if ( upFolderPath != null )
79
	{
85
	{
Line 85... Line 91...
85
	}
91
	}
86
}
92
}
Line 87... Line 93...
87
 
93
 
88
function CheckLoaded()
94
function CheckLoaded()
89
{
95
{
90
	if ( window.top.IsLoadedActualFolder 
96
	if ( window.top.IsLoadedActualFolder
91
		&& window.top.IsLoadedCreateFolder 
97
		&& window.top.IsLoadedCreateFolder
92
		&& window.top.IsLoadedUpload
98
		&& window.top.IsLoadedUpload
93
		&& window.top.IsLoadedResourcesList )
99
		&& window.top.IsLoadedResourcesList )
94
	{
100
	{
95
		window.clearInterval( iIntervalId ) ;
101
		window.clearInterval( iIntervalId ) ;
Line 110... Line 116...
110
	}
116
	}
Line 111... Line 117...
111
 
117
 
112
	// Change the style for the select row (to show the opened folder).
118
	// Change the style for the select row (to show the opened folder).
113
	for ( var sFolderPath in oListManager.TableRows )
119
	for ( var sFolderPath in oListManager.TableRows )
114
	{
120
	{
115
		oListManager.TableRows[ sFolderPath ].className = 
121
		oListManager.TableRows[ sFolderPath ].className =
116
			( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ;
122
			( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ;
Line 117... Line 123...
117
	}
123
	}
118
 
124
 
119
	// Set the current folder in all frames.
125
	// Set the current folder in all frames.
120
	window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
126
	window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
121
	window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
127
	window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
122
	window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
128
	window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
123
	
129
 
124
	// Load the resources list for this folder.
130
	// Load the resources list for this folder.
Line 125... Line 131...
125
	window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ;
131
	window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ;
Line 135... Line 141...
135
	if ( folderPath != '/' )
141
	if ( folderPath != '/' )
136
		sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ;
142
		sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ;
Line 137... Line 143...
137
 
143
 
138
	// Show/Hide the Up Folder.
144
	// Show/Hide the Up Folder.
139
	oListManager.ShowUpFolder( sParentFolderPath ) ;
145
	oListManager.ShowUpFolder( sParentFolderPath ) ;
140
	
146
 
141
	if ( folderPath != '/' )
147
	if ( folderPath != '/' )
142
	{
148
	{
143
		sActiveFolder = folderPath ;
149
		sActiveFolder = folderPath ;
144
		oConnector.CurrentFolder = sParentFolderPath
150
		oConnector.CurrentFolder = sParentFolderPath ;
145
		oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ;
151
		oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ;
146
	}
152
	}
147
	else
153
	else
148
		OpenFolder( '/' ) ;
154
		OpenFolder( '/' ) ;
Line 149... Line 155...
149
}
155
}
150
 
156
 
151
function GetFoldersCallBack( fckXml )
157
function GetFoldersCallBack( fckXml )
152
{
158
{
153
	if ( oConnector.CheckError( fckXml ) != 0 )
159
	if ( oConnector.CheckError( fckXml ) != 0 )
154
		return ;
160
		return ;
155
		
161
 
156
	// Get the current folder path.
162
	// Get the current folder path.
157
	var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
163
	var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
158
	var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
164
	var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
159
	
165
 
160
	var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
166
	var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
161
	
167
 
162
	for ( var i = 0 ; i < oNodes.length ; i++ )
168
	for ( var i = 0 ; i < oNodes.length ; i++ )
163
	{
169
	{
164
		var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
170
		var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
165
		oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ;
171
		oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + '/' ) ;
166
	}
172
	}
167
	
173
 
Line 168... Line 174...
168
	OpenFolder( sActiveFolder ) ;
174
	OpenFolder( sActiveFolder ) ;
169
}
175
}
Line 179... Line 185...
179
	oListManager.Init() ;
185
	oListManager.Init() ;
180
	LoadFolders( '/' ) ;
186
	LoadFolders( '/' ) ;
181
}
187
}
182
		</script>
188
		</script>
183
	</head>
189
	</head>
184
	<body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
190
	<body class="FileArea">
185
		<table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0">
191
		<table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0">
186
			<tr id="trUp" style="DISPLAY: none">
192
			<tr id="trUp" style="DISPLAY: none">
187
				<td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td>
193
				<td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td>
188
				<td nowrap width="100%">&nbsp;<a id="linkUp" href="#">..</a></td>
194
				<td nowrap width="100%">&nbsp;<a id="linkUp" href="#">..</a></td>
189
			</tr>
195
			</tr>