1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!--
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5 *
6 * == BEGIN LICENSE ==
7 *
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")
12 *    http://www.gnu.org/licenses/gpl.html
13 *
14 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15 *    http://www.gnu.org/licenses/lgpl.html
16 *
17 *  - Mozilla Public License Version 1.1 or later (the "MPL")
18 *    http://www.mozilla.org/MPL/MPL-1.1.html
19 *
20 * == END LICENSE ==
21 *
22 * Page used to create new folders in the current folder.
23-->
24<html>
25	<head>
26		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
27		<link href="browser.css" type="text/css" rel="stylesheet">
28		<script type="text/javascript" src="js/common.js"></script>
29		<script language="javascript">
30
31function SetCurrentFolder( resourceType, folderPath )
32{
33	oConnector.ResourceType = resourceType ;
34	oConnector.CurrentFolder = folderPath ;
35}
36
37function CreateFolder()
38{
39	var sFolderName ;
40
41	while ( true )
42	{
43		sFolderName = prompt( 'Type the name of the new folder:', '' ) ;
44
45		if ( sFolderName == null )
46			return ;
47		else if ( sFolderName.length == 0 )
48			alert( 'Please type the folder name' ) ;
49		else
50			break ;
51	}
52
53	oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ;
54}
55
56function CreateFolderCallBack( fckXml )
57{
58	if ( oConnector.CheckError( fckXml ) == 0 )
59		window.parent.frames['frmResourcesList'].Refresh() ;
60
61	/*
62	// Get the current folder path.
63	var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ;
64	var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ;
65
66	switch ( iErrorNumber )
67	{
68		case 0 :
69			window.parent.frames['frmResourcesList'].Refresh() ;
70			break ;
71		case 101 :
72			alert( 'Folder already exists' ) ;
73			break ;
74		case 102 :
75			alert( 'Invalid folder name' ) ;
76			break ;
77		case 103 :
78			alert( 'You have no permissions to create the folder' ) ;
79			break ;
80		case 110 :
81			alert( 'Unknown error creating folder' ) ;
82			break ;
83		default :
84			alert( 'Error creating folder. Error number: ' + iErrorNumber ) ;
85			break ;
86	}
87	*/
88}
89
90window.onload = function()
91{
92	window.top.IsLoadedCreateFolder = true ;
93}
94		</script>
95	</head>
96	<body bottomMargin="0" topMargin="0">
97		<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
98			<tr>
99				<td>
100					<button type="button" style="WIDTH: 100%" onclick="CreateFolder();">
101						<table cellSpacing="0" cellPadding="0" border="0">
102							<tr>
103								<td><img height="16" alt="" src="images/Folder.gif" width="16"></td>
104								<td>&nbsp;</td>
105								<td nowrap>Create New Folder</td>
106							</tr>
107						</table>
108					</button>
109				</td>
110			</tr>
111		</table>
112	</body>
113</html>
114