Subversion Repositories Applications.papyrus

Rev

Rev 521 | Go to most recent revision | Details | Compare with Previous | 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
875 ddelon 4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
431 ddelon 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
 *
521 ddelon 12
 * "Support Open Source software. What about a donation today?"
13
 *
431 ddelon 14
 * File Name: fck_textfield.html
15
 * 	Text field dialog window.
16
 *
17
 * File Authors:
18
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
19
-->
20
<html>
21
	<head>
22
		<title>Text Field 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
 
30
// Gets the document DOM
31
var oDOM = oEditor.FCK.EditorDocument ;
32
 
33
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
34
 
35
window.onload = function()
36
{
37
	// First of all, translate the dialog box texts
38
	oEditor.FCKLanguageManager.TranslatePage(document) ;
39
 
40
	if ( oActiveEl && oActiveEl.tagName == 'INPUT' && ( oActiveEl.type == 'text' || oActiveEl.type == 'password' ) )
41
	{
42
		GetE('txtName').value	= oActiveEl.name ;
43
		GetE('txtValue').value	= oActiveEl.value ;
44
		GetE('txtSize').value	= GetAttribute( oActiveEl, 'size' ) ;
45
		GetE('txtMax').value	= GetAttribute( oActiveEl, 'maxLength' ) ;
46
		GetE('txtType').value	= oActiveEl.type ;
47
 
48
		GetE('txtType').disabled = true ;
49
	}
50
	else
51
		oActiveEl = null ;
52
 
53
	window.parent.SetOkButton( true ) ;
54
}
55
 
56
function Ok()
57
{
58
	if ( isNaN( GetE('txtMax').value ) || GetE('txtMax').value < 0 )
59
	{
60
		alert( "Maximum characters must be a positive number." ) ;
61
		GetE('txtMax').focus() ;
62
		return false ;
63
	}
64
	else if( isNaN( GetE('txtSize').value ) || GetE('txtSize').value < 0 )
65
	{
66
		alert( "Width must be a positive number." ) ;
67
		GetE('txtSize').focus() ;
68
		return false ;
69
	}
70
 
71
	if ( !oActiveEl )
72
	{
73
		oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
74
		oActiveEl.type = GetE('txtType').value ;
75
		oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
76
	}
77
 
78
	oActiveEl.name = GetE('txtName').value ;
79
	SetAttribute( oActiveEl, 'value'	, GetE('txtValue').value ) ;
80
	SetAttribute( oActiveEl, 'size'		, GetE('txtSize').value ) ;
81
	SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
82
 
83
	return true ;
84
}
85
 
86
		</script>
87
	</head>
88
	<body style="OVERFLOW: hidden" scroll="no">
89
		<table height="100%" width="100%">
90
			<tr>
91
				<td align="center">
92
					<table cellSpacing="0" cellPadding="0" border="0">
93
						<tr>
94
							<td>
95
								<span fckLang="DlgTextName">Name</span><br>
96
								<input id="txtName" type="text" size="20">
97
							</td>
98
							<td></td>
99
							<td>
100
								<span fckLang="DlgTextValue">Value</span><br>
101
								<input id="txtValue" type="text" size="25">
102
							</td>
103
						</tr>
104
						<tr>
105
							<td>
106
								<span fckLang="DlgTextCharWidth">Character Width</span><br>
107
								<input id="txtSize" type="text" size="5">
108
							</td>
109
							<td></td>
110
							<td>
111
								<span fckLang="DlgTextMaxChars">Maximum Characters</span><br>
112
								<input id="txtMax" type="text" size="5">
113
							</td>
114
						</tr>
115
						<tr>
116
							<td>
117
								<span fckLang="DlgTextType">Type</span><br>
118
								<select id="txtType">
119
									<option value="text" selected fckLang="DlgTextTypeText">Text</option>
120
									<option value="password" fckLang="DlgTextTypePass">Password</option>
121
								</select>
122
							</td>
123
							<td>&nbsp;</td>
124
							<td></td>
125
						</tr>
126
					</table>
127
				</td>
128
			</tr>
129
		</table>
130
	</body>
131
</html>