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