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-2009 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		<title>Create Folder</title>
27		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
28		<link href="browser.css" type="text/css" rel="stylesheet">
29		<script type="text/javascript" src="js/common.js"></script>
30		<script type="text/javascript" src="js/language.js"></script>
31		<script type="text/javascript" src="js/safeFN_class.js"></script>
32		<script type="text/javascript">
33
34var CurrentDWikiUser = parent.CurrentDWikiUser;
35var isLocalDwikiBrowser = parent.isLocalDwikiBrowser;
36var CreateDwikiFolder = parent.CreateDwikiFolder;
37var DwikiFNencode = parent.DwikiFNencode;
38
39function SetCurrentFolder( resourceType, folderPath )
40{
41	oConnector.ResourceType = resourceType ;
42	oConnector.CurrentFolder = folderPath ;
43}
44
45function CreateFolder()
46{
47	var sFolderName ;
48
49	while ( true )
50	{
51		sFolderName = prompt(translateItem('DlgFileBrowserFolderPrompt', 'Type the name of the new folder:'), '' ) ;
52
53		if ( sFolderName == null )
54			return ;
55		else if ( sFolderName.length == 0 )
56			alert(translateItem('DlgFileBrowserFolderWarning', 'Please type the folder name' ) ) ;
57		else
58			break ;
59	}
60
61/* requires safe_ascii */
62if(DwikiFNencode == 'safe') {
63   sFolderName=sFolderName.toLowerCase();
64   sFolderName=sFolderName.replace(/\s/g, '_');
65}
66oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + dwikiUTF8_encodeFN(sFolderName,DwikiFNencode) , CreateFolderCallBack ) ;
67}
68
69function CreateFolderCallBack( fckXml )
70{
71	if ( oConnector.CheckError( fckXml ) == 0 )
72		window.parent.frames['frmResourcesList'].Refresh() ;
73
74}
75
76window.onload = function()
77{
78   window.top.IsLoadedCreateFolder = true ;
79   setupLanguage();
80}
81		</script>
82    </head>
83<body>
84
85	</body>
86</html>
87