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
* This page compose the File Browser dialog frameset.
26
<title>FCKeditor - Resources Browser</title>
27
<link href="browser.css" type="text/css" rel="stylesheet">
28
<script type="text/javascript" src="js/fckxml.js"></script>
29
<script language="javascript">
31
function GetUrlParam( paramName )
33
var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
34
var oMatch = oRegex.exec( window.top.location.search ) ;
36
if ( oMatch && oMatch.length > 1 )
37
return decodeURIComponent( oMatch[1] ) ;
42
var oConnector = new Object() ;
43
oConnector.CurrentFolder = '/' ;
45
var sConnUrl = GetUrlParam( 'Connector' ) ;
47
// Gecko has some problems when using relative URLs (not starting with slash).
48
if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 )
49
sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ;
51
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
53
var sServerPath = GetUrlParam( 'ServerPath' ) ;
54
if ( sServerPath.length > 0 )
55
oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ;
57
oConnector.ResourceType = GetUrlParam( 'Type' ) ;
58
oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
60
if ( oConnector.ShowAllTypes )
61
oConnector.ResourceType = 'File' ;
63
oConnector.SendCommand = function( command, params, callBackFunction )
65
var sUrl = this.ConnectorUrl + 'Command=' + command ;
66
sUrl += '&Type=' + this.ResourceType ;
67
sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;
69
if ( params ) sUrl += '&' + params ;
71
// Add a random salt to avoid getting a cached version of the command execution
72
sUrl += '&uuid=' + new Date().getTime() ;
74
var oXML = new FCKXml() ;
76
if ( callBackFunction )
77
oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
79
return oXML.LoadUrl( sUrl ) ;
84
oConnector.CheckError = function( responseXml )
86
var iErrorNumber = 0 ;
87
var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
91
iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ;
93
switch ( iErrorNumber )
97
case 1 : // Custom error. Message placed in the "text" attribute.
98
alert( oErrorNode.attributes.getNamedItem('text').value ) ;
101
alert( 'Folder already exists' ) ;
104
alert( 'Invalid folder name' ) ;
107
alert( 'You have no permissions to create the folder' ) ;
110
alert( 'Unknown error creating folder' ) ;
113
alert( 'Error on your request. Error number: ' + iErrorNumber ) ;
117
return iErrorNumber ;
120
var oIcons = new Object() ;
122
oIcons.AvailableIconsArray = [
123
'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
124
'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
126
oIcons.AvailableIcons = new Object() ;
128
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
129
oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
131
oIcons.GetIcon = function( fileName )
133
var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
135
if ( this.AvailableIcons[ sExtension ] == true )
138
return 'default.icon' ;
141
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
143
window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
148
<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
149
<frameset rows="50,*" framespacing="0">
150
<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
151
<frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1">
153
<frameset rows="50,*,50" framespacing="0">
154
<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
155
<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
156
<frameset cols="150,*,0" framespacing="0" frameborder="0">
157
<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
158
<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
159
<frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0">
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
* This page compose the File Browser dialog frameset.
26
<title>FCKeditor - Resources Browser</title>
27
<link href="browser.css" type="text/css" rel="stylesheet">
28
<script type="text/javascript" src="js/fckxml.js"></script>
29
<script language="javascript">
31
function GetUrlParam( paramName )
33
var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
34
var oMatch = oRegex.exec( window.top.location.search ) ;
36
if ( oMatch && oMatch.length > 1 )
37
return decodeURIComponent( oMatch[1] ) ;
42
var oConnector = new Object() ;
43
oConnector.CurrentFolder = '/' ;
45
var sConnUrl = GetUrlParam( 'Connector' ) ;
47
// Gecko has some problems when using relative URLs (not starting with slash).
48
if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 )
49
sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ;
51
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
53
var sServerPath = GetUrlParam( 'ServerPath' ) ;
54
if ( sServerPath.length > 0 )
55
oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ;
57
oConnector.ResourceType = GetUrlParam( 'Type' ) ;
58
oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
60
if ( oConnector.ShowAllTypes )
61
oConnector.ResourceType = 'File' ;
63
oConnector.SendCommand = function( command, params, callBackFunction )
65
var sUrl = this.ConnectorUrl + 'Command=' + command ;
66
sUrl += '&Type=' + this.ResourceType ;
67
sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;
69
if ( params ) sUrl += '&' + params ;
71
// Add a random salt to avoid getting a cached version of the command execution
72
sUrl += '&uuid=' + new Date().getTime() ;
74
var oXML = new FCKXml() ;
76
if ( callBackFunction )
77
oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
79
return oXML.LoadUrl( sUrl ) ;
84
oConnector.CheckError = function( responseXml )
86
var iErrorNumber = 0 ;
87
var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
91
iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ;
93
switch ( iErrorNumber )
97
case 1 : // Custom error. Message placed in the "text" attribute.
98
alert( oErrorNode.attributes.getNamedItem('text').value ) ;
101
alert( 'Folder already exists' ) ;
104
alert( 'Invalid folder name' ) ;
107
alert( 'You have no permissions to create the folder' ) ;
110
alert( 'Unknown error creating folder' ) ;
113
alert( 'Error on your request. Error number: ' + iErrorNumber ) ;
117
return iErrorNumber ;
120
var oIcons = new Object() ;
122
oIcons.AvailableIconsArray = [
123
'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
124
'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
126
oIcons.AvailableIcons = new Object() ;
128
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
129
oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
131
oIcons.GetIcon = function( fileName )
133
var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
135
if ( this.AvailableIcons[ sExtension ] == true )
138
return 'default.icon' ;
141
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
143
window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
148
<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
149
<frameset rows="50,*" framespacing="0">
150
<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
151
<frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1">
153
<frameset rows="50,*,50" framespacing="0">
154
<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
155
<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
156
<frameset cols="150,*,0" framespacing="0" frameborder="0">
157
<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
158
<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
159
<frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0">