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