1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!--
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2007 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 * Placeholder Plugin.
23-->
24<html>
25	<head>
26		<title>Placeholder Properties</title>
27		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
28		<meta content="noindex, nofollow" name="robots">
29		<script language="javascript">
30
31var oEditor = window.parent.InnerDialogLoaded() ;
32var FCKLang = oEditor.FCKLang ;
33var FCKPlaceholders = oEditor.FCKPlaceholders ;
34
35window.onload = function ()
36{
37	// First of all, translate the dialog box texts
38	oEditor.FCKLanguageManager.TranslatePage( document ) ;
39
40	LoadSelected() ;
41
42	// Show the "Ok" button.
43	window.parent.SetOkButton( true ) ;
44}
45
46var eSelected = oEditor.FCKSelection.GetSelectedElement() ;
47
48function LoadSelected()
49{
50	if ( !eSelected )
51		return ;
52
53	if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder )
54		document.getElementById('txtName').value = eSelected._fckplaceholder ;
55	else
56		eSelected == null ;
57}
58
59function Ok()
60{
61	var sValue = document.getElementById('txtName').value ;
62
63	if ( eSelected && eSelected._fckplaceholder == sValue )
64		return true ;
65
66	if ( sValue.length == 0 )
67	{
68		alert( FCKLang.PlaceholderErrNoName ) ;
69		return false ;
70	}
71
72	if ( FCKPlaceholders.Exist( sValue ) )
73	{
74		alert( FCKLang.PlaceholderErrNameInUse ) ;
75		return false ;
76	}
77
78	FCKPlaceholders.Add( sValue ) ;
79	return true ;
80}
81
82		</script>
83	</head>
84	<body scroll="no" style="OVERFLOW: hidden">
85		<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
86			<tr>
87				<td>
88					<table cellSpacing="0" cellPadding="0" align="center" border="0">
89						<tr>
90							<td>
91								<span fckLang="PlaceholderDlgName">Placeholder Name</span><br>
92								<input id="txtName" type="text">
93							</td>
94						</tr>
95					</table>
96				</td>
97			</tr>
98		</table>
99	</body>
100</html>