Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1075 ddelon 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<!--
1921 jp_milcent 3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2008 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
 * Main page that holds the editor.
1075 ddelon 23
-->
1921 jp_milcent 24
<html>
1075 ddelon 25
<head>
26
	<title>FCKeditor</title>
1921 jp_milcent 27
	<meta name="robots" content="noindex, nofollow">
28
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
29
	<meta http-equiv="Cache-Control" content="public">
1075 ddelon 30
	<script type="text/javascript">
31
 
1921 jp_milcent 32
// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
33
// without security.fileuri.strict_origin_policy disabled.
34
if ( document.location.protocol == 'file:' )
35
{
36
	try
37
	{
38
		window.parent.document.domain ;
39
	}
40
	catch ( e )
41
	{
42
		window.addEventListener( 'load', function()
43
			{
44
				document.body.innerHTML = '\
45
					<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
46
						<p>\
47
							<b>Your browser security settings don\'t allow FCKeditor to be opened from\
48
							the local filesystem.<\/b>\
49
						<\/p>\
50
						<p>\
51
							Please open the <b>about:config<\/b> page and disable the\
52
							&quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\
53
						<\/p>\
54
						<p>\
55
							Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
56
							for more information.\
57
						<\/p>\
58
					<\/div>' ;
59
			}, false ) ;
60
	}
61
}
62
 
63
// Save a reference to the default domain.
64
var FCK_ORIGINAL_DOMAIN ;
65
 
66
// Automatically detect the correct document.domain (#123).
67
(function()
68
{
69
	var d = FCK_ORIGINAL_DOMAIN = document.domain ;
70
 
71
	while ( true )
72
	{
73
		// Test if we can access a parent property.
74
		try
75
		{
76
			var test = window.parent.document.domain ;
77
			break ;
78
		}
79
		catch( e ) {}
80
 
81
		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
82
		d = d.replace( /.*?(?:\.|$)/, '' ) ;
83
 
84
		if ( d.length == 0 )
85
			break ;		// It was not able to detect the domain.
86
 
87
		try
88
		{
89
			document.domain = d ;
90
		}
91
		catch (e)
92
		{
93
			break ;
94
		}
95
	}
96
})() ;
97
 
98
// Save a reference to the detected runtime domain.
99
var FCK_RUNTIME_DOMAIN = document.domain ;
100
 
101
var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
102
 
1075 ddelon 103
// Instead of loading scripts and CSSs using inline tags, all scripts are
104
// loaded by code. In this way we can guarantee the correct processing order,
105
// otherwise external scripts and inline scripts could be executed in an
106
// unwanted order (IE).
107
 
108
function LoadScript( url )
109
{
1921 jp_milcent 110
	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
1075 ddelon 111
}
112
 
113
// Main editor scripts.
1921 jp_milcent 114
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
1075 ddelon 115
 
116
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
117
 
118
// Base configuration file.
119
LoadScript( '../fckconfig.js' ) ;
120
 
121
	</script>
122
	<script type="text/javascript">
123
 
1921 jp_milcent 124
// Adobe AIR compatibility file.
125
if ( FCKBrowserInfo.IsAIR )
126
	LoadScript( 'js/fckadobeair.js' ) ;
127
 
1075 ddelon 128
if ( FCKBrowserInfo.IsIE )
129
{
1921 jp_milcent 130
	// Remove IE mouse flickering.
131
	try
132
	{
133
		document.execCommand( 'BackgroundImageCache', false, true ) ;
134
	}
135
	catch (e)
136
	{
137
		// We have been reported about loading problems caused by the above
138
		// line. For safety, let's just ignore errors.
139
	}
140
 
141
	// Create the default cleanup object used by the editor.
1075 ddelon 142
	FCK.IECleanup = new FCKIECleanup( window ) ;
143
	FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
144
	FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
145
}
146
 
1921 jp_milcent 147
// The first function to be called on selection change must the the styles
148
// change checker, because the result of its processing may be used by another
149
// functions listening to the same event.
150
FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
151
 
1075 ddelon 152
// The config hidden field is processed immediately, because
153
// CustomConfigurationsPath may be set in the page.
154
FCKConfig.ProcessHiddenField() ;
155
 
156
// Load the custom configurations file (if defined).
157
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
158
	LoadScript( FCKConfig.CustomConfigurationsPath ) ;
159
 
160
	</script>
161
	<script type="text/javascript">
162
 
163
// Load configurations defined at page level.
164
FCKConfig_LoadPageConfig() ;
165
 
166
FCKConfig_PreProcess() ;
167
 
1921 jp_milcent 168
// Load the full debug script.
169
if ( FCKConfig.Debug )
170
	LoadScript( '_source/internals/fckdebug.js' ) ;
171
 
172
	</script>
173
	<script type="text/javascript">
174
 
175
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
176
var FCK_InternalCSS			= FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
177
var FCK_ShowTableBordersCSS	= FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
178
 
179
// Popup the debug window if debug mode is set to true. It guarantees that the
180
// first debug message will not be lost.
181
if ( FCKConfig.Debug )
182
	FCKDebug._GetWindow() ;
183
 
1075 ddelon 184
// Load the active skin CSS.
1921 jp_milcent 185
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
1075 ddelon 186
 
187
// Load the language file.
188
FCKLanguageManager.Initialize() ;
189
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
190
 
191
	</script>
192
	<script type="text/javascript">
193
 
194
// Initialize the editing area context menu.
195
FCK_ContextMenu_Init() ;
196
 
197
FCKPlugins.Load() ;
198
 
199
	</script>
200
	<script type="text/javascript">
1921 jp_milcent 201
 
1075 ddelon 202
// Set the editor interface direction.
203
window.document.dir = FCKLang.Dir ;
204
 
205
	</script>
206
	<script type="text/javascript">
207
 
208
window.onload = function()
209
{
210
	InitializeAPI() ;
211
 
212
	if ( FCKBrowserInfo.IsIE )
213
		FCK_PreloadImages() ;
214
	else
215
		LoadToolbarSetup() ;
216
}
217
 
218
function LoadToolbarSetup()
219
{
220
	FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
221
}
222
 
223
function LoadToolbar()
224
{
225
	var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
1921 jp_milcent 226
 
1075 ddelon 227
	if ( oToolbarSet.IsLoaded )
228
		StartEditor() ;
229
	else
230
	{
231
		oToolbarSet.OnLoad = StartEditor ;
232
		oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
233
	}
234
}
235
 
236
function StartEditor()
237
{
238
	// Remove the onload listener.
239
	FCK.ToolbarSet.OnLoad = null ;
240
 
241
	FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
242
 
243
	FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
244
 
245
	// Start the editor.
246
	FCK.StartEditor() ;
247
}
248
 
249
function WaitForActive( editorInstance, newStatus )
250
{
251
	if ( newStatus == FCK_STATUS_ACTIVE )
252
	{
253
		if ( FCKBrowserInfo.IsGecko )
254
			FCKTools.RunFunction( window.onresize ) ;
255
 
1921 jp_milcent 256
		if ( !FCKConfig.PreventSubmitHandler )
257
			_AttachFormSubmitToAPI() ;
258
 
1075 ddelon 259
		FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
260
 
1921 jp_milcent 261
		// Call the special "FCKeditor_OnComplete" function that should be present in
1075 ddelon 262
		// the HTML page where the editor is located.
263
		if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
1921 jp_milcent 264
			window.parent.FCKeditor_OnComplete( FCK ) ;
1075 ddelon 265
	}
266
}
267
 
1921 jp_milcent 268
// Gecko browsers doesn't calculate well the IFRAME size so we must
1075 ddelon 269
// recalculate it every time the window size changes.
1921 jp_milcent 270
if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
1075 ddelon 271
{
1921 jp_milcent 272
	window.onresize = function( e )
1075 ddelon 273
	{
1921 jp_milcent 274
		// Running in Chrome makes the window receive the event including subframes.
275
		// we care only about this window. Ticket #1642.
276
		// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
277
		if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
1075 ddelon 278
			return ;
279
 
280
		var oCell = document.getElementById( 'xEditingArea' ) ;
281
 
1921 jp_milcent 282
		var eInnerElement = oCell.firstChild ;
283
		if ( eInnerElement )
1075 ddelon 284
		{
1921 jp_milcent 285
			eInnerElement.style.height = '0px' ;
286
			eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
1075 ddelon 287
		}
288
	}
289
}
290
 
291
	</script>
292
</head>
293
<body>
294
	<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
295
		<tr id="xToolbarRow" style="display: none">
296
			<td id="xToolbarSpace" style="overflow: hidden">
297
				<table width="100%" cellpadding="0" cellspacing="0">
298
					<tr id="xCollapsed" style="display: none">
299
						<td id="xExpandHandle" class="TB_Expand" colspan="3">
300
							<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
301
					</tr>
302
					<tr id="xExpanded" style="display: none">
303
						<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
304
						<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
305
							<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
306
						<td id="xToolbar" class="TB_ToolbarSet"></td>
307
						<td class="TB_SideBorder" style="width: 1px"></td>
308
					</tr>
309
				</table>
310
			</td>
311
		</tr>
1921 jp_milcent 312
		<tr>
313
			<td id="xEditingArea" valign="top" style="height: 100%"></td>
1075 ddelon 314
		</tr>
315
	</table>
316
</body>
317
</html>