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-2009 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 * Hidden Field dialog window.
23-->
24<html xmlns="http://www.w3.org/1999/xhtml">
25<head>
26	<title>Hidden Field Properties</title>
27	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28	<meta content="noindex, nofollow" name="robots" />
29	<script src="common/fck_dialog_common.js" type="text/javascript"></script>
30	<script type="text/javascript">
31
32var dialog	= window.parent ;
33var oEditor = dialog.InnerDialogLoaded() ;
34
35var FCK = oEditor.FCK ;
36
37// Gets the document DOM
38var oDOM = FCK.EditorDocument ;
39
40// Get the selected flash embed (if available).
41var oFakeImage = dialog.Selection.GetSelectedElement() ;
42var oActiveEl ;
43
44if ( oFakeImage )
45{
46	if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') )
47		oActiveEl = FCK.GetRealElement( oFakeImage ) ;
48	else
49		oFakeImage = null ;
50}
51
52window.onload = function()
53{
54	// First of all, translate the dialog box texts
55	oEditor.FCKLanguageManager.TranslatePage(document) ;
56
57	if ( oActiveEl )
58	{
59		GetE('txtName').value		= oActiveEl.name ;
60		GetE('txtValue').value		= oActiveEl.value ;
61	}
62
63	dialog.SetOkButton( true ) ;
64	dialog.SetAutoSize( true ) ;
65	SelectField( 'txtName' ) ;
66}
67
68
69function Ok()
70{
71	oEditor.FCKUndo.SaveUndoStep() ;
72
73	oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ;
74
75	SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
76
77	if ( !oFakeImage )
78	{
79		oFakeImage	= oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
80		oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
81
82		oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ;
83		oActiveEl.parentNode.removeChild( oActiveEl ) ;
84	}
85	else
86		oEditor.FCKUndo.SaveUndoStep() ;
87
88	return true ;
89}
90
91	</script>
92</head>
93<body style="overflow: hidden" scroll="no">
94	<table height="100%" width="100%">
95		<tr>
96			<td align="center">
97				<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
98					<tr>
99						<td>
100							<span fcklang="DlgHiddenName">Name</span><br />
101							<input type="text" size="20" id="txtName" style="width: 100%" />
102						</td>
103					</tr>
104					<tr>
105						<td>
106							<span fcklang="DlgHiddenValue">Value</span><br />
107							<input type="text" size="30" id="txtValue" style="width: 100%" />
108						</td>
109					</tr>
110				</table>
111			</td>
112		</tr>
113	</table>
114</body>
115</html>
116