1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* Page used to create new folders in the current folder.
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">
31
function SetCurrentFolder( resourceType, folderPath )
33
oConnector.ResourceType = resourceType ;
34
oConnector.CurrentFolder = folderPath ;
37
function CreateFolder()
43
sFolderName = prompt( 'Type the name of the new folder:', '' ) ;
45
if ( sFolderName == null )
47
else if ( sFolderName.length == 0 )
48
alert( 'Please type the folder name' ) ;
53
oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ;
56
function CreateFolderCallBack( fckXml )
58
if ( oConnector.CheckError( fckXml ) == 0 )
59
window.parent.frames['frmResourcesList'].Refresh() ;
62
// Get the current folder path.
63
var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ;
64
var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ;
66
switch ( iErrorNumber )
69
window.parent.frames['frmResourcesList'].Refresh() ;
72
alert( 'Folder already exists' ) ;
75
alert( 'Invalid folder name' ) ;
78
alert( 'You have no permissions to create the folder' ) ;
81
alert( 'Unknown error creating folder' ) ;
84
alert( 'Error creating folder. Error number: ' + iErrorNumber ) ;
90
window.onload = function()
92
window.top.IsLoadedCreateFolder = true ;
96
<body bottomMargin="0" topMargin="0">
97
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
100
<button type="button" style="WIDTH: 100%" onclick="CreateFolder();">
101
<table cellSpacing="0" cellPadding="0" border="0">
103
<td><img height="16" alt="" src="images/Folder.gif" width="16"></td>
105
<td nowrap>Create New Folder</td>