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.01 Frameset//EN"
-
 
2
   "http://www.w3.org/TR/html4/frameset.dtd">
1
<!--
3
<!--
2
 * FCKeditor - The text editor for internet
4
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
5
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
6
 *
-
 
7
 * == BEGIN LICENSE ==
4
 * 
8
 *
5
 * Licensed under the terms of the GNU Lesser General Public License:
9
 * Licensed under the terms of any of the following licenses at your
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
10
 * choice:
7
 * 
11
 *
8
 * For further information visit:
12
 *  - GNU General Public License Version 2 or later (the "GPL")
9
 * 		http://www.fckeditor.net/
13
 *    http://www.gnu.org/licenses/gpl.html
10
 * 
14
 *
11
 * "Support Open Source software. What about a donation today?"
15
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
-
 
16
 *    http://www.gnu.org/licenses/lgpl.html
12
 * 
17
 *
13
 * File Name: browser.html
18
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
14
 * 	This page compose the File Browser dialog frameset.
19
 *    http://www.mozilla.org/MPL/MPL-1.1.html
15
 * 
20
 *
16
 * File Authors:
21
 * == END LICENSE ==
-
 
22
 *
17
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
23
 * This page compose the File Browser dialog frameset.
18
-->
24
-->
19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
 
20
<html>
25
<html>
21
	<head>
26
	<head>
22
		<title>FCKeditor - Resources Browser</title>
27
		<title>FCKeditor - Resources Browser</title>
-
 
28
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
23
		<link href="browser.css" type="text/css" rel="stylesheet">
29
		<link href="browser.css" type="text/css" rel="stylesheet">
24
		<script type="text/javascript" src="js/fckxml.js"></script>
30
		<script type="text/javascript" src="js/fckxml.js"></script>
25
		<script language="javascript">
31
		<script type="text/javascript">
-
 
32
// Automatically detect the correct document.domain (#1919).
-
 
33
(function()
-
 
34
{
-
 
35
	var d = document.domain ;
-
 
36
 
-
 
37
	while ( true )
-
 
38
	{
-
 
39
		// Test if we can access a parent property.
-
 
40
		try
-
 
41
		{
-
 
42
			var test = window.opener.document.domain ;
-
 
43
			break ;
-
 
44
		}
-
 
45
		catch( e )
-
 
46
		{}
-
 
47
 
-
 
48
		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
-
 
49
		d = d.replace( /.*?(?:\.|$)/, '' ) ;
-
 
50
 
-
 
51
		if ( d.length == 0 )
-
 
52
			break ;		// It was not able to detect the domain.
-
 
53
 
-
 
54
		try
-
 
55
		{
-
 
56
			document.domain = d ;
-
 
57
		}
-
 
58
		catch (e)
-
 
59
		{
-
 
60
			break ;
-
 
61
		}
-
 
62
	}
-
 
63
})() ;
Line 26... Line 64...
26
 
64
 
27
function GetUrlParam( paramName )
65
function GetUrlParam( paramName )
28
{
66
{
29
	var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
67
	var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
30
	var oMatch = oRegex.exec( window.top.location.search ) ;
68
	var oMatch = oRegex.exec( window.top.location.search ) ;
31
	
69
 
32
	if ( oMatch && oMatch.length > 1 )
70
	if ( oMatch && oMatch.length > 1 )
33
		return unescape( oMatch[1] ) ;
71
		return decodeURIComponent( oMatch[1] ) ;
34
	else
72
	else
35
		return '' ;
73
		return '' ;
Line 36... Line 74...
36
}
74
}
Line 46... Line 84...
46
 
84
 
Line 47... Line 85...
47
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
85
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
48
 
86
 
49
var sServerPath = GetUrlParam( 'ServerPath' ) ;
87
var sServerPath = GetUrlParam( 'ServerPath' ) ;
Line 50... Line 88...
50
if ( sServerPath.length > 0 )
88
if ( sServerPath.length > 0 )
51
	oConnector.ConnectorUrl += 'ServerPath=' + escape( sServerPath ) + '&' ;
89
	oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ;
Line 52... Line 90...
52
 
90
 
Line 58... Line 96...
58
 
96
 
59
oConnector.SendCommand = function( command, params, callBackFunction )
97
oConnector.SendCommand = function( command, params, callBackFunction )
60
{
98
{
61
	var sUrl = this.ConnectorUrl + 'Command=' + command ;
99
	var sUrl = this.ConnectorUrl + 'Command=' + command ;
62
	sUrl += '&Type=' + this.ResourceType ;
100
	sUrl += '&Type=' + this.ResourceType ;
63
	sUrl += '&CurrentFolder=' + escape( this.CurrentFolder ) ;
101
	sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;
64
	
102
 
Line -... Line 103...
-
 
103
	if ( params ) sUrl += '&' + params ;
-
 
104
 
-
 
105
	// Add a random salt to avoid getting a cached version of the command execution
65
	if ( params ) sUrl += '&' + params ;
106
	sUrl += '&uuid=' + new Date().getTime() ;
66
 
107
 
67
	var oXML = new FCKXml() ;
108
	var oXML = new FCKXml() ;
68
	
109
 
69
	if ( callBackFunction )
110
	if ( callBackFunction )
70
		oXML.LoadUrl( sUrl, callBackFunction ) ;	// Asynchronous load.
111
		oXML.LoadUrl( sUrl, callBackFunction ) ;	// Asynchronous load.
-
 
112
	else
-
 
113
		return oXML.LoadUrl( sUrl ) ;
71
	else
114
 
Line 72... Line 115...
72
		return oXML.LoadUrl( sUrl ) ;
115
	return null ;
73
}
116
}
74
 
117
 
75
oConnector.CheckError = function( responseXml )
118
oConnector.CheckError = function( responseXml )
76
{
119
{
77
	var iErrorNumber = 0
120
	var iErrorNumber = 0 ;
78
	var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
121
	var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
79
	
122
 
80
	if ( oErrorNode )
123
	if ( oErrorNode )
81
	{
124
	{
82
		iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value ) ;
125
		iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ;
83
		
126
 
84
		switch ( iErrorNumber )
127
		switch ( iErrorNumber )
85
		{
128
		{
Line 108... Line 151...
108
	return iErrorNumber ;
151
	return iErrorNumber ;
109
}
152
}
Line 110... Line 153...
110
 
153
 
Line 111... Line 154...
111
var oIcons = new Object() ;
154
var oIcons = new Object() ;
112
 
155
 
113
oIcons.AvailableIconsArray = [ 
156
oIcons.AvailableIconsArray = [
114
	'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
157
	'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
115
	'mdb','mp3','pdf','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
158
	'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
Line 116... Line 159...
116
	
159
 
117
oIcons.AvailableIcons = new Object() ;
160
oIcons.AvailableIcons = new Object() ;
Line 126... Line 169...
126
	if ( this.AvailableIcons[ sExtension ] == true )
169
	if ( this.AvailableIcons[ sExtension ] == true )
127
		return sExtension ;
170
		return sExtension ;
128
	else
171
	else
129
		return 'default.icon' ;
172
		return 'default.icon' ;
130
}
173
}
-
 
174
 
-
 
175
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
-
 
176
{
-
 
177
	if (errorNumber == "1")
-
 
178
		window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ;
-
 
179
	else
-
 
180
		window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
-
 
181
}
-
 
182
 
131
		</script>
183
		</script>
132
	</head>
184
	</head>
133
	<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
185
	<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
134
		<frameset rows="50,*" framespacing="0">
186
		<frameset rows="50,*" framespacing="0">
135
			<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
187
			<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
Line 139... Line 191...
139
			<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
191
			<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
140
			<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
192
			<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
141
			<frameset cols="150,*,0" framespacing="0" frameborder="0">
193
			<frameset cols="150,*,0" framespacing="0" frameborder="0">
142
				<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
194
				<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
143
				<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
195
				<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
144
				<frame name="frmUploadWorker" src="../../../fckblank.html" scrolling="no" frameborder="0">
196
				<frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0">
145
			</frameset>
197
			</frameset>
146
		</frameset>
198
		</frameset>
147
	</frameset>
199
	</frameset>
148
</html>
200
</html>