Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
431 ddelon 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2
<!--
3
 * FCKeditor - The text editor for internet
4
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
5
 *
6
 * Licensed under the terms of the GNU Lesser General Public License:
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
8
 *
9
 * For further information visit:
10
 * 		http://www.fckeditor.net/
11
 *
12
 * File Name: fck_anchor.html
13
 * 	Anchor dialog window.
14
 *
15
 * File Authors:
16
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
17
-->
18
<html>
19
	<head>
20
		<title>Anchor Properties</title>
21
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22
		<meta content="noindex, nofollow" name="robots">
23
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
24
		<script type="text/javascript">
25
 
26
var oEditor	= window.parent.InnerDialogLoaded() ;
27
var FCK		= oEditor.FCK ;
28
 
29
// Gets the document DOM
30
var oDOM = oEditor.FCK.EditorDocument ;
31
 
32
var oFakeImage = FCK.Selection.GetSelectedElement() ;
33
var oAnchor ;
34
 
35
if ( oFakeImage )
36
{
37
	if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') )
38
		oAnchor = FCK.GetRealElement( oFakeImage ) ;
39
	else
40
		oFakeImage = null ;
41
}
42
 
43
window.onload = function()
44
{
45
	// First of all, translate the dialog box texts
46
	oEditor.FCKLanguageManager.TranslatePage(document) ;
47
 
48
	if ( oAnchor )
49
		GetE('txtName').value = oAnchor.name ;
50
	else
51
		oAnchor = null ;
52
 
53
	window.parent.SetOkButton( true ) ;
54
}
55
 
56
function Ok()
57
{
58
	if ( GetE('txtName').value.length == 0 )
59
	{
60
		alert( oEditor.FCKLang.DlgAnchorErrorName ) ;
61
		return false ;
62
	}
63
 
64
	oEditor.FCKUndo.SaveUndoStep() ;
65
 
66
	oAnchor		= FCK.EditorDocument.createElement( 'DIV' ) ;
67
	oAnchor.innerHTML = '<a name="' + GetE('txtName').value + '"><\/a>' ;
68
	oAnchor = oAnchor.firstChild ;
69
 
70
	oFakeImage	= oEditor.FCKDocumentProcessors_CreateFakeImage( 'FCK__Anchor', oAnchor ) ;
71
	oFakeImage.setAttribute( '_fckanchor', 'true', 0 ) ;
72
	oFakeImage	= FCK.InsertElementAndGetIt( oFakeImage ) ;
73
 
74
//	oEditor.FCK.InsertHtml( '<a name="' + GetE('txtName').value + '"><\/a>' ) ;
75
	return true ;
76
}
77
 
78
		</script>
79
	</head>
80
	<body style="OVERFLOW: hidden" scroll="no">
81
		<table height="100%" width="100%">
82
			<tr>
83
				<td align="center">
84
					<table border="0" cellpadding="0" cellspacing="0" width="80%">
85
						<tr>
86
							<td>
87
								<span fckLang="DlgAnchorName">Anchor Name</span><BR>
88
								<input id="txtName" style="WIDTH: 100%" type="text">
89
							</td>
90
						</tr>
91
					</table>
92
				</td>
93
			</tr>
94
		</table>
95
	</body>
96
</html>