Subversion Repositories Applications.papyrus

Rev

Rev 431 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 521
Line 6... Line 6...
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 
7
 * 
8
 * For further information visit:
8
 * For further information visit:
9
 * 		http://www.fckeditor.net/
9
 * 		http://www.fckeditor.net/
10
 * 
10
 * 
-
 
11
 * "Support Open Source software. What about a donation today?"
-
 
12
 * 
11
 * File Name: fckdialog.html
13
 * File Name: fckdialog.html
12
 * 	This page is used by all dialog box as the container.
14
 * 	This page is used by all dialog box as the container.
13
 * 
15
 * 
14
 * File Authors:
16
 * File Authors:
15
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
17
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
Line 21... Line 23...
21
		<meta name="robots" content="noindex, nofollow" />
23
		<meta name="robots" content="noindex, nofollow" />
22
		<script type="text/javascript">
24
		<script type="text/javascript">
Line 23... Line 25...
23
 
25
 
24
// On some Gecko browsers (probably over slow connections) the
26
// On some Gecko browsers (probably over slow connections) the
25
// "dialogArguments" are not set so we must get it from the opener window.
27
// "dialogArguments" are not set so we must get it from the opener window.
26
if ( !dialogArguments )
28
if ( !window.dialogArguments )
Line 27... Line 29...
27
	dialogArguments = window.opener.FCKLastDialogInfo ;
29
	window.dialogArguments = window.opener.FCKLastDialogInfo ;
28
 
30
 
Line 29... Line 31...
29
// Sets the Skin CSS
31
// Sets the Skin CSS
30
document.write( '<link href="' + dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
32
document.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
Line 31... Line 33...
31
 
33
 
32
// Sets the language direction.
34
// Sets the language direction.
Line 33... Line 35...
33
window.document.dir = dialogArguments.Editor.FCKLang.Dir ;
35
window.document.dir = window.dialogArguments.Editor.FCKLang.Dir ;
34
 
36
 
35
var sTitle = dialogArguments.Title ;
37
var sTitle = window.dialogArguments.Title ;
36
document.write( '<title>' + sTitle + '</title>' ) ;
38
document.write( '<title>' + sTitle + '<\/title>' ) ;
Line 37... Line 39...
37
 
39
 
38
function LoadInnerDialog()
40
function LoadInnerDialog()
Line 39... Line 41...
39
{
41
{
40
	if ( window.onresize )
42
	if ( window.onresize )
Line 41... Line 43...
41
		window.onresize() ;
43
		window.onresize() ;
42
 
44
 
43
	// First of all, translate the dialog box contents.
45
	// First of all, translate the dialog box contents.
Line 44... Line 46...
44
	dialogArguments.Editor.FCKLanguageManager.TranslatePage( document ) ;
46
	window.dialogArguments.Editor.FCKLanguageManager.TranslatePage( document ) ;
45
 
47
 
Line 46... Line 48...
46
	window.frames["frmMain"].document.location.href = dialogArguments.Page ;
48
	window.frames["frmMain"].document.location.href = window.dialogArguments.Page ;
47
}
49
}
Line 48... Line 50...
48
 
50
 
49
function InnerDialogLoaded()
51
function InnerDialogLoaded()
Line 50... Line 52...
50
{
52
{
51
	var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
53
	var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
Line 52... Line 54...
52
 
54
 
53
	// Set the language direction.
55
	// Set the language direction.
54
	oInnerDoc.dir = dialogArguments.Editor.FCKLang.Dir ;
56
	oInnerDoc.dir = window.dialogArguments.Editor.FCKLang.Dir ;
Line 79... Line 81...
79
{
81
{
80
	if ( bAutoSize )
82
	if ( bAutoSize )
81
	{
83
	{
82
		var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
84
		var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
Line -... Line 85...
-
 
85
 
83
 
86
		var iFrameHeight ;
84
		if ( document.all )
87
		if ( document.all )
85
			var iFrameHeight	= oInnerDoc.body.offsetHeight ;
88
			iFrameHeight = oInnerDoc.body.offsetHeight ;
86
		else
89
		else
Line 87... Line 90...
87
			var iFrameHeight	= document.getElementById('frmMain').contentWindow.innerHeight ;
90
			iFrameHeight = document.getElementById('frmMain').contentWindow.innerHeight ;
Line 88... Line 91...
88
 
91
 
Line 89... Line 92...
89
		var iInnerHeight	= oInnerDoc.body.scrollHeight ;
92
		var iInnerHeight = oInnerDoc.body.scrollHeight ;
90
 
93
 
Line 136... Line 139...
136
	oDiv.onclick = TabDiv_OnClick ;
139
	oDiv.onclick = TabDiv_OnClick ;
Line 137... Line 140...
137
 
140
 
138
	if ( startHidden )
141
	if ( startHidden )
Line 139... Line 142...
139
		oDiv.style.display = 'none' ;
142
		oDiv.style.display = 'none' ;
Line 140... Line 143...
140
 
143
 
Line 141... Line 144...
141
	var eTabsRow = document.getElementById( 'TabsRow' ) ;
144
	eTabsRow = document.getElementById( 'TabsRow' ) ;
142
 
145
 
Line 148... Line 151...
148
		eTitleArea.className = 'PopupTitle' ;
151
		eTitleArea.className = 'PopupTitle' ;
Line 149... Line 152...
149
 
152
 
150
		oDiv.className = 'PopupTabSelected' ;
153
		oDiv.className = 'PopupTabSelected' ;
Line 151... Line 154...
151
		eTabsRow.style.display = '' ;
154
		eTabsRow.style.display = '' ;
152
 
155
 
153
		if ( ! dialogArguments.Editor.FCKBrowserInfo.IsIE )
156
		if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
Line 154... Line 157...
154
			window.onresize() ;
157
			window.onresize() ;
155
	}
158
	}
Line 192... Line 195...
192
 
195
 
193
function SetOnKeyDown( targetDocument )
196
function SetOnKeyDown( targetDocument )
194
{
197
{
195
	targetDocument.onkeydown = function ( e )
198
	targetDocument.onkeydown = function ( e )
196
	{
199
	{
197
		var e = e || event || this.parentWindow.event ;
200
		e = e || event || this.parentWindow.event ;
198
		switch ( e.keyCode )
201
		switch ( e.keyCode )
199
		{
202
		{
200
			case 13 :		// ENTER
203
			case 13 :		// ENTER
201
				var oTarget = e.srcElement || e.target ;
204
				var oTarget = e.srcElement || e.target ;
Line 205... Line 208...
205
			case 27 :		// ESC
208
			case 27 :		// ESC
206
				Cancel() ;
209
				Cancel() ;
207
				return false ;
210
				return false ;
208
				break ;
211
				break ;
209
		}
212
		}
-
 
213
		return true ;
210
	}
214
	}
211
}
215
}
212
SetOnKeyDown( document ) ;
216
SetOnKeyDown( document ) ;
Line 213... Line 217...
213
 
217
 
214
function DisableContextMenu( targetDocument )
218
function DisableContextMenu( targetDocument )
215
{
219
{
Line 216... Line 220...
216
	if ( dialogArguments.Editor.FCKBrowserInfo.IsIE ) return ;
220
	if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) return ;
217
 
221
 
218
	// Disable Right-Click
222
	// Disable Right-Click
219
	var oOnContextMenu = function( e )
223
	var oOnContextMenu = function( e )
Line 224... Line 228...
224
	}
228
	}
225
	targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
229
	targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
226
}
230
}
227
DisableContextMenu( document ) ;
231
DisableContextMenu( document ) ;
Line 228... Line 232...
228
 
232
 
229
if ( ! dialogArguments.Editor.FCKBrowserInfo.IsIE )
233
if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
230
{
234
{
231
	window.onresize = function()
235
	window.onresize = function()
232
	{
236
	{
Line 247... Line 251...
247
window.onfocus = function()
251
window.onfocus = function()
248
{
252
{
249
	document.getElementById('frmMain').contentWindow.focus() ;
253
	document.getElementById('frmMain').contentWindow.focus() ;
250
}
254
}
Line 251... Line 255...
251
 
255
 
252
if ( dialogArguments.Editor.FCKBrowserInfo.IsIE )
256
if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
253
{
257
{
254
	function Window_OnBeforeUnload()
258
	function Window_OnBeforeUnload()
255
	{
259
	{
256
		for ( var t in oTabs )
260
		for ( var t in oTabs )
Line 257... Line 261...
257
			oTabs[t] = null ;
261
			oTabs[t] = null ;
258
 
262
 
259
		dialogArguments.Editor = null ;
263
		window.dialogArguments.Editor = null ;
260
	}
264
	}
Line 261... Line 265...
261
	window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;
265
	window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;