Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2
<!--
2
<!--
3
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
5
 * 
7
 *
6
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
9
 * choice:
8
 * 
10
 *
9
 * For further information visit:
11
 *  - GNU General Public License Version 2 or later (the "GPL")
10
 * 		http://www.fckeditor.net/
12
 *    http://www.gnu.org/licenses/gpl.html
11
 * 
13
 *
12
 * "Support Open Source software. What about a donation today?"
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
-
 
15
 *    http://www.gnu.org/licenses/lgpl.html
13
 * 
16
 *
14
 * File Name: fck_select.html
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
15
 * 	Select dialog window.
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
16
 * 
19
 *
17
 * File Authors:
20
 * == END LICENSE ==
-
 
21
 *
18
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
22
 * Select dialog window.
19
-->
23
-->
20
<html>
24
<html>
21
	<head>
25
	<head>
22
		<title>Select Properties</title>
26
		<title>Select Properties</title>
23
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
27
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
		<meta content="noindex, nofollow" name="robots">
28
		<meta content="noindex, nofollow" name="robots">
25
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
29
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
26
		<script type="text/javascript" src="fck_select/fck_select.js"></script>
30
		<script type="text/javascript" src="fck_select/fck_select.js"></script>
27
		<script type="text/javascript">
31
		<script type="text/javascript">
-
 
32
 
28
 
33
var dialog	= window.parent ;
29
var oEditor = window.parent.InnerDialogLoaded() ;
34
var oEditor = dialog.InnerDialogLoaded() ;
30
 
35
 
31
// Gets the document DOM
36
// Gets the document DOM
32
var oDOM = oEditor.FCK.EditorDocument ;
37
var oDOM = oEditor.FCK.EditorDocument ;
33
 
38
 
34
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
39
var oActiveEl = dialog.Selection.GetSelectedElement() ;
35
 
40
 
36
var oListText ;
41
var oListText ;
37
var oListValue ;
42
var oListValue ;
38
 
43
 
39
window.onload = function()
44
window.onload = function()
40
{
45
{
41
	// First of all, translate the dialog box texts
46
	// First of all, translate the dialog box texts
42
	oEditor.FCKLanguageManager.TranslatePage(document) ;
47
	oEditor.FCKLanguageManager.TranslatePage(document) ;
43
 
48
 
44
	oListText	= document.getElementById( 'cmbText' ) ;
49
	oListText	= document.getElementById( 'cmbText' ) ;
45
	oListValue	= document.getElementById( 'cmbValue' ) ;
50
	oListValue	= document.getElementById( 'cmbValue' ) ;
-
 
51
 
-
 
52
	// Fix the lists widths. (Bug #970)
-
 
53
	oListText.style.width = oListText.offsetWidth ;
-
 
54
	oListValue.style.width = oListValue.offsetWidth ;
46
 
55
 
47
	if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
56
	if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
48
	{
57
	{
49
		GetE('txtName').value		= oActiveEl.name ;
58
		GetE('txtName').value		= oActiveEl.name ;
50
		GetE('txtSelValue').value	= oActiveEl.value ;
59
		GetE('txtSelValue').value	= oActiveEl.value ;
51
		GetE('txtLines').value		= GetAttribute( oActiveEl, 'size' ) ;
60
		GetE('txtLines').value		= GetAttribute( oActiveEl, 'size' ) ;
52
		GetE('chkMultiple').checked	= oActiveEl.multiple ;
61
		GetE('chkMultiple').checked	= oActiveEl.multiple ;
53
 
62
 
54
		// Load the actual options
63
		// Load the actual options
55
		for ( var i = 0 ; i < oActiveEl.options.length ; i++ )
64
		for ( var i = 0 ; i < oActiveEl.options.length ; i++ )
56
		{
65
		{
57
			var sText	= oActiveEl.options[i].innerHTML ;
66
			var sText	= HTMLDecode( oActiveEl.options[i].innerHTML ) ;
58
			var sValue	= oActiveEl.options[i].value ;
67
			var sValue	= oActiveEl.options[i].value ;
59
 
68
 
60
			AddComboOption( oListText, sText, sText ) ;
69
			AddComboOption( oListText, sText, sText ) ;
61
			AddComboOption( oListValue, sValue, sValue ) ;
70
			AddComboOption( oListValue, sValue, sValue ) ;
62
		}
71
		}
63
	}
72
	}
64
	else
73
	else
65
		oActiveEl = null ;
74
		oActiveEl = null ;
66
 
75
 
-
 
76
	dialog.SetOkButton( true ) ;
-
 
77
	dialog.SetAutoSize( true ) ;
67
	window.parent.SetOkButton( true ) ;
78
	SelectField( 'txtName' ) ;
68
}
79
}
69
 
80
 
70
function Ok()
81
function Ok()
71
{
82
{
-
 
83
	oEditor.FCKUndo.SaveUndoStep() ;
-
 
84
 
72
	var sSize = GetE('txtLines').value ;
85
	var sSize = GetE('txtLines').value ;
73
	if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
86
	if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
74
		sSize = '' ;
87
		sSize = '' ;
75
 
-
 
76
	if ( !oActiveEl )
-
 
77
	{
88
 
78
		oActiveEl = oEditor.FCK.EditorDocument.createElement( 'SELECT' ) ;
-
 
79
		oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
-
 
80
	}
-
 
81
 
89
	oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'SELECT', {name: GetE('txtName').value} ) ;
82
	SetAttribute( oActiveEl, 'name'	, GetE('txtName').value ) ;
90
 
83
	SetAttribute( oActiveEl, 'size'	, sSize ) ;
91
	SetAttribute( oActiveEl, 'size'	, sSize ) ;
84
	oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
92
	oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
85
 
93
 
86
	// Remove all options.
94
	// Remove all options.
87
	while ( oActiveEl.options.length > 0 )
95
	while ( oActiveEl.options.length > 0 )
88
		oActiveEl.remove(0) ;
96
		oActiveEl.remove(0) ;
89
 
97
 
90
	// Add all available options.
98
	// Add all available options.
91
	for ( var i = 0 ; i < oListText.options.length ; i++ )
99
	for ( var i = 0 ; i < oListText.options.length ; i++ )
92
	{
100
	{
93
		var sText	= oListText.options[i].value ;
101
		var sText	= oListText.options[i].value ;
94
		var sValue	= oListValue.options[i].value ;
102
		var sValue	= oListValue.options[i].value ;
95
		if ( sValue.length == 0 ) sValue = sText ;
103
		if ( sValue.length == 0 ) sValue = sText ;
96
 
104
 
97
		var oOption = AddComboOption( oActiveEl, sText, sValue, oDOM ) ;
105
		var oOption = AddComboOption( oActiveEl, sText, sValue, oDOM ) ;
98
 
106
 
99
		if ( sValue == GetE('txtSelValue').value )
107
		if ( sValue == GetE('txtSelValue').value )
100
		{
108
		{
101
			SetAttribute( oOption, 'selected', 'selected' ) ;
109
			SetAttribute( oOption, 'selected', 'selected' ) ;
102
			oOption.selected = true ;
110
			oOption.selected = true ;
103
		}
111
		}
104
	}
112
	}
105
 
113
 
106
	return true ;
114
	return true ;
107
}
115
}
108
 
116
 
109
		</script>
117
		</script>
110
	</head>
118
	</head>
111
	<body style='OVERFLOW: hidden' scroll='no'>
119
	<body style="overflow: hidden">
112
		<table width="100%" height="100%">
120
		<table width="100%" height="100%">
113
			<tr>
121
			<tr>
114
				<td>
122
				<td>
115
					<table width="100%">
123
					<table width="100%">
116
						<tr>
124
						<tr>
117
							<td nowrap><span fckLang="DlgSelectName">Name</span>&nbsp;</td>
125
							<td nowrap><span fckLang="DlgSelectName">Name</span>&nbsp;</td>
118
							<td width="100%" colSpan="2"><input id="txtName" style="WIDTH: 100%" type="text"></td>
126
							<td width="100%" colSpan="2"><input id="txtName" style="WIDTH: 100%" type="text"></td>
119
						</tr>
127
						</tr>
120
						<tr>
128
						<tr>
121
							<td nowrap><span fckLang="DlgSelectValue">Value</span>&nbsp;</td>
129
							<td nowrap><span fckLang="DlgSelectValue">Value</span>&nbsp;</td>
122
							<td width="100%" colSpan="2"><input id="txtSelValue" style="WIDTH: 100%; BACKGROUND-COLOR: buttonface" type="text" readonly></td>
130
							<td width="100%" colSpan="2"><input id="txtSelValue" style="WIDTH: 100%; BACKGROUND-COLOR: buttonface" type="text" readonly></td>
123
						</tr>
131
						</tr>
124
						<tr>
132
						<tr>
125
							<td nowrap><span fckLang="DlgSelectSize">Size</span>&nbsp;</td>
133
							<td nowrap><span fckLang="DlgSelectSize">Size</span>&nbsp;</td>
126
							<td nowrap><input id="txtLines" type="text" size="2" value="">&nbsp;<span fckLang="DlgSelectLines">lines</span></td>
134
							<td nowrap><input id="txtLines" type="text" size="2" value="">&nbsp;<span fckLang="DlgSelectLines">lines</span></td>
127
							<td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
135
							<td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
128
									multiple selections</label></td>
136
									multiple selections</label></td>
129
						</tr>
137
						</tr>
130
					</table>
138
					</table>
131
					<br>
139
					<br>
132
					<hr style="POSITION: absolute">
140
					<hr style="POSITION: absolute">
133
					<span style="LEFT: 10px; POSITION: relative; TOP: -7px" class="BackColor">&nbsp;<span fckLang="DlgSelectOpAvail">Available
141
					<span style="LEFT: 10px; POSITION: relative; TOP: -7px" class="BackColor">&nbsp;<span fckLang="DlgSelectOpAvail">Available
134
							Options</span>&nbsp;</span>
142
							Options</span>&nbsp;</span>
135
					<table width="100%">
143
					<table width="100%">
136
						<tr>
144
						<tr>
137
							<td width="50%"><span fckLang="DlgSelectOpText">Text</span><br>
145
							<td width="50%"><span fckLang="DlgSelectOpText">Text</span><br>
138
								<input id="txtText" style="WIDTH: 100%" type="text" name="txtText">
146
								<input id="txtText" style="WIDTH: 100%" type="text" name="txtText">
139
							</td>
147
							</td>
140
							<td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br>
148
							<td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br>
141
								<input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue">
149
								<input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue">
142
							</td>
150
							</td>
143
							<td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td>
151
							<td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td>
144
							<td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td>
152
							<td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td>
145
						</tr>
153
						</tr>
146
						<tr>
154
						<tr>
147
							<td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);"
155
							<td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);"
148
									size="5" name="cmbText"></select>
156
									size="5" name="cmbText"></select>
149
							</td>
157
							</td>
150
							<td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);"
158
							<td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);"
151
									size="5" name="cmbValue"></select>
159
									size="5" name="cmbValue"></select>
152
							</td>
160
							</td>
153
							<td vAlign="top" colSpan="2">
161
							<td vAlign="top" colSpan="2">
154
							</td>
162
							</td>
155
						</tr>
163
						</tr>
156
						<tr>
164
						<tr>
157
							<td vAlign="bottom" colSpan="2"><input style="WIDTH: 100%" onclick="Move(-1);" type="button" fckLang="DlgSelectBtnUp" value="Up">
165
							<td vAlign="bottom" colSpan="2"><input style="WIDTH: 100%" onclick="Move(-1);" type="button" fckLang="DlgSelectBtnUp" value="Up">
158
								<br>
166
								<br>
159
								<input style="WIDTH: 100%" onclick="Move(1);" type="button" fckLang="DlgSelectBtnDown"
167
								<input style="WIDTH: 100%" onclick="Move(1);" type="button" fckLang="DlgSelectBtnDown"
160
									value="Down">
168
									value="Down">
161
							</td>
169
							</td>
162
						</tr>
170
						</tr>
163
						<TR>
171
						<TR>
164
							<TD vAlign="bottom" colSpan="4"><INPUT onclick="SetSelectedValue();" type="button" fckLang="DlgSelectBtnSetValue" value="Set as selected value">&nbsp;&nbsp;
172
							<TD vAlign="bottom" colSpan="4"><INPUT onclick="SetSelectedValue();" type="button" fckLang="DlgSelectBtnSetValue" value="Set as selected value">&nbsp;&nbsp;
165
								<input onclick="Delete();" type="button" fckLang="DlgSelectBtnDelete" value="Delete"></TD>
173
								<input onclick="Delete();" type="button" fckLang="DlgSelectBtnDelete" value="Delete"></TD>
166
						</TR>
174
						</TR>
167
					</table>
175
					</table>
168
				</td>
176
				</td>
169
			</tr>
177
			</tr>
170
		</table>
178
		</table>
171
	</body>
179
	</body>
172
</html>
180
</html>