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 1... Line 1...
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<!--
2
<!--
3
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
5
 * 
7
 *
6
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
9
 * choice:
8
 * 
10
 *
9
 * For further information visit:
11
 *  - GNU General Public License Version 2 or later (the "GPL")
10
 * 		http://www.fckeditor.net/
12
 *    http://www.gnu.org/licenses/gpl.html
11
 * 
13
 *
12
 * "Support Open Source software. What about a donation today?"
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
-
 
15
 *    http://www.gnu.org/licenses/lgpl.html
13
 * 
16
 *
14
 * File Name: fck_docprops.html
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
15
 * 	Link dialog window.
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
16
 * 
19
 *
17
 * File Authors:
20
 * == END LICENSE ==
-
 
21
 *
18
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
22
 * Link dialog window.
19
-->
23
-->
20
<html xmlns="http://www.w3.org/1999/xhtml">
24
<html xmlns="http://www.w3.org/1999/xhtml">
21
<head>
25
<head>
22
	<title></title>
26
	<title></title>
23
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
27
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Line 61... Line 65...
61
 
65
 
62
// This object contains all META tags defined in the document.
66
// This object contains all META tags defined in the document.
Line 63... Line 67...
63
var oMetaTags = new Object() ;
67
var oMetaTags = new Object() ;
64
 
68
 
-
 
69
// Get all META tags defined in the document.
Line 65... Line 70...
65
// Get all META tags defined in the document.
70
AppendMetaCollection( oMetaTags, oHead.getElementsByTagName('meta') ) ;
66
var aMetas = oHead.getElementsByTagName('meta') ;
-
 
67
 
71
AppendMetaCollection( oMetaTags, oHead.getElementsByTagName('fck:meta') ) ;
68
// Loop throw all METAs and put it in the HashTable.
72
 
69
for ( var i = 0 ; i < aMetas.length ; i++ )
-
 
70
{
-
 
71
	// Try to get the "name" attribute.
73
function AppendMetaCollection( targetObject, metaCollection )
72
	var sName = GetAttribute( aMetas[i], 'name', GetAttribute( aMetas[i], '___fcktoreplace:name', '' ) ) ;
-
 
73
 
74
{
-
 
75
	// Loop throw all METAs and put it in the HashTable.
-
 
76
	for ( var i = 0 ; i < metaCollection.length ; i++ )
-
 
77
	{
-
 
78
		// Try to get the "name" attribute.
74
	// If no "name", try with the "http-equiv" attribute.
79
		var sName = GetAttribute( metaCollection[i], 'name', GetAttribute( metaCollection[i], '___fcktoreplace:name', '' ) ) ;
75
	if ( sName.length == 0 )
80
 
-
 
81
		// If no "name", try with the "http-equiv" attribute.
-
 
82
		if ( sName.length == 0 )
76
	{
83
		{
77
		if ( document.all )
84
			if ( oEditor.FCKBrowserInfo.IsIE )
78
		{
85
			{
79
			// Get the http-equiv value from the outerHTML.
86
				// Get the http-equiv value from the outerHTML.
-
 
87
				var oHttpEquivMatch = metaCollection[i].outerHTML.match( oEditor.FCKRegexLib.MetaHttpEquiv ) ;
-
 
88
				if ( oHttpEquivMatch )
-
 
89
					sName = oHttpEquivMatch[1] ;
80
			var oHttpEquivMatch = aMetas[i].outerHTML.match( oEditor.FCKRegexLib.MetaHttpEquiv ) ;
90
			}
81
			if ( oHttpEquivMatch )
-
 
82
				sName = oHttpEquivMatch[1] ;
-
 
83
		}
-
 
Line 84... Line 91...
84
		else
91
			else
85
			sName = GetAttribute( aMetas[i], 'http-equiv', '' ) ;
92
				sName = GetAttribute( metaCollection[i], 'http-equiv', '' ) ;
-
 
93
		}
86
	}
94
 
Line 87... Line 95...
87
 
95
		if ( sName.length > 0 )
Line 88... Line 96...
88
	if ( sName.length > 0 )
96
			targetObject[ sName.toLowerCase() ] = metaCollection[i] ;
Line 111... Line 119...
111
		else
119
		else
112
		{
120
		{
113
			// On IE, it is not possible to set the "name" attribute of the META tag.
121
			// On IE, it is not possible to set the "name" attribute of the META tag.
114
			// So a temporary attribute is used and it is replaced when getting the
122
			// So a temporary attribute is used and it is replaced when getting the
115
			// editor's HTML/XHTML value. This is sad, I know :(
123
			// editor's HTML/XHTML value. This is sad, I know :(
116
			if ( document.all )
124
			if ( oEditor.FCKBrowserInfo.IsIE )
117
				SetAttribute( oMeta, '___fcktoreplace:name', name ) ;
125
				SetAttribute( oMeta, '___fcktoreplace:name', name ) ;
118
			else
126
			else
119
				SetAttribute( oMeta, 'name', name ) ;
127
				SetAttribute( oMeta, 'name', name ) ;
120
		}
128
		}
Line 121... Line 129...
121
 
129
 
122
		oMetaTags[ name.toLowerCase() ] = oMeta ;
130
		oMetaTags[ name.toLowerCase() ] = oMeta ;
Line -... Line 131...
-
 
131
	}
123
	}
132
 
124
 
133
	SetAttribute( oMeta, 'content', content ) ;
Line 125... Line 134...
125
	oMeta.content = content ;
134
//	oMeta.content = content ;
126
}
135
}
127
 
136
 
Line 139... Line 148...
139
function GetMetadata( name )
148
function GetMetadata( name )
140
{
149
{
141
	var oMeta = oMetaTags[ name.toLowerCase() ] ;
150
	var oMeta = oMetaTags[ name.toLowerCase() ] ;
Line 142... Line 151...
142
 
151
 
143
	if ( oMeta && oMeta != null )
152
	if ( oMeta && oMeta != null )
144
		return oMeta.content ;
153
		return oMeta.getAttribute( 'content', 2 ) ;
145
	else
154
	else
146
		return '' ;
155
		return '' ;
Line 147... Line 156...
147
}
156
}
Line 171... Line 180...
171
 
180
 
172
	GetE('selDirection').value	= GetAttribute( oHTML, 'dir', '' ) ;
181
	GetE('selDirection').value	= GetAttribute( oHTML, 'dir', '' ) ;
Line 173... Line 182...
173
	GetE('txtLang').value		= GetAttribute( oHTML, 'xml:lang', GetAttribute( oHTML, 'lang', '' ) ) ;	// "xml:lang" takes precedence to "lang".
182
	GetE('txtLang').value		= GetAttribute( oHTML, 'xml:lang', GetAttribute( oHTML, 'lang', '' ) ) ;	// "xml:lang" takes precedence to "lang".
174
 
183
 
175
	// Character Set Encoding.
184
	// Character Set Encoding.
176
//	if ( document.all )
185
//	if ( oEditor.FCKBrowserInfo.IsIE )
177
//		var sCharSet = FCK.EditorDocument.charset ;
186
//		var sCharSet = FCK.EditorDocument.charset ;
Line 178... Line 187...
178
//	else
187
//	else
179
		var sCharSet = GetMetadata( 'Content-Type' ) ;
188
		var sCharSet = GetMetadata( 'Content-Type' ) ;
180
 
189
 
181
	if ( sCharSet != null && sCharSet.length > 0 )
190
	if ( sCharSet != null && sCharSet.length > 0 )
Line 182... Line 191...
182
	{
191
	{
Line 183... Line 192...
183
//		if ( !document.all )
192
//		if ( !oEditor.FCKBrowserInfo.IsIE )
Line 253... Line 262...
253
		sCharSet = GetE('txtCustomCharSet').value ;
262
		sCharSet = GetE('txtCustomCharSet').value ;
Line 254... Line 263...
254
 
263
 
255
	if ( sCharSet.length > 0 )
264
	if ( sCharSet.length > 0 )
Line 256... Line 265...
256
			sCharSet = 'text/html; charset=' + sCharSet ;
265
			sCharSet = 'text/html; charset=' + sCharSet ;
257
 
266
 
258
//	if ( document.all )
267
//	if ( oEditor.FCKBrowserInfo.IsIE )
259
//		FCK.EditorDocument.charset = sCharSet ;
268
//		FCK.EditorDocument.charset = sCharSet ;
Line 260... Line 269...
260
//	else
269
//	else
Line 271... Line 280...
271
	if ( GetE('chkIncXHTMLDecl').checked )
280
	if ( GetE('chkIncXHTMLDecl').checked )
272
	{
281
	{
273
		if ( sCharSet.length == 0 )
282
		if ( sCharSet.length == 0 )
274
			sCharSet = 'utf-8' ;
283
			sCharSet = 'utf-8' ;
Line 275... Line 284...
275
 
284
 
Line 276... Line 285...
276
		FCK.XmlDeclaration = '<?xml version="1.0" encoding="' + sCharSet + '"?>' ;
285
		FCK.XmlDeclaration = '<' + '?xml version="1.0" encoding="' + sCharSet + '"?>' ;
277
 
286
 
278
		SetAttribute( oHTML, 'xmlns', 'http://www.w3.org/1999/xhtml' ) ;
287
		SetAttribute( oHTML, 'xmlns', 'http://www.w3.org/1999/xhtml' ) ;
279
	}
288
	}
Line 347... Line 356...
347
 
356
 
348
	GetE(txtField).style.backgroundColor = ( bNotOther ? '#cccccc' : '' ) ;
357
	GetE(txtField).style.backgroundColor = ( bNotOther ? '#cccccc' : '' ) ;
349
	GetE(txtField).disabled = bNotOther ;
358
	GetE(txtField).disabled = bNotOther ;
Line 350... Line 359...
350
}
359
}
351
 
360
 
352
function SetColor( inputId, color ) 
361
function SetColor( inputId, color )
353
{
362
{
354
	GetE( inputId ).value = color + '' ; 
363
	GetE( inputId ).value = color + '' ;
Line 355... Line 364...
355
	UpdatePreview() ;
364
	UpdatePreview() ;
356
}
365
}
Line 363... Line 372...
363
 
372
 
364
function SelectColor( wich )
373
function SelectColor( wich )
365
{
374
{
366
	switch ( wich )
375
	switch ( wich )
367
	{
376
	{
368
		case 'Back'			: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectBackColor, window ) ; return ;
377
		case 'Back'			: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor, window ) ; return ;
369
		case 'ColorText'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorText, window ) ; return ;
378
		case 'ColorText'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText, window ) ; return ;
370
		case 'ColorLink'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorLink, window ) ; return ;
379
		case 'ColorLink'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink, window ) ; return ;
371
		case 'ColorVisited'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorVisited, window ) ; return ;
380
		case 'ColorVisited'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited, window ) ; return ;
372
		case 'ColorActive'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorActive, window ) ; return ;
381
		case 'ColorActive'	: oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive, window ) ; return ;
373
	}
382
	}
Line 374... Line 383...
374
}
383
}
375
 
384