Subversion Repositories Applications.papyrus

Rev

Rev 1688 | 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_radiobutton.html
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
15
 * 	Radio Button 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
 * Radio Button dialog window.
19
-->
23
-->
20
<html>
24
<html>
21
	<head>
25
	<head>
22
		<title>Radio Button Properties</title>
26
		<title>Radio Button 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">
30
		<script type="text/javascript">
-
 
31
 
27
 
32
var dialog	= window.parent ;
28
var oEditor = window.parent.InnerDialogLoaded() ;
33
var oEditor = dialog.InnerDialogLoaded() ;
29
 
34
 
30
// Gets the document DOM
35
// Gets the document DOM
31
var oDOM = oEditor.FCK.EditorDocument ;
36
var oDOM = oEditor.FCK.EditorDocument ;
32
 
37
 
33
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
38
var oActiveEl = dialog.Selection.GetSelectedElement() ;
34
 
39
 
35
window.onload = function()
40
window.onload = function()
36
{
41
{
37
	// First of all, translate the dialog box texts
42
	// First of all, translate the dialog box texts
38
	oEditor.FCKLanguageManager.TranslatePage(document) ;
43
	oEditor.FCKLanguageManager.TranslatePage(document) ;
39
 
44
 
40
	if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
45
	if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
41
	{
46
	{
42
		GetE('txtName').value		= oActiveEl.name ;
47
		GetE('txtName').value		= oActiveEl.name ;
43
		GetE('txtValue').value		= oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
48
		GetE('txtValue').value		= oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
44
		GetE('txtSelected').checked	= oActiveEl.checked ;
49
		GetE('txtSelected').checked	= oActiveEl.checked ;
45
	}
50
	}
46
	else
51
	else
47
		oActiveEl = null ;
52
		oActiveEl = null ;
48
 
53
 
-
 
54
	dialog.SetOkButton( true ) ;
-
 
55
	dialog.SetAutoSize( true ) ;
49
	window.parent.SetOkButton( true ) ;
56
	SelectField( 'txtName' ) ;
50
}
57
}
51
 
58
 
52
function Ok()
59
function Ok()
53
{
60
{
54
	if ( !oActiveEl )
61
	oEditor.FCKUndo.SaveUndoStep() ;
55
	{
62
 
56
		oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
63
	oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ;
57
		oActiveEl.type = 'radio' ;
-
 
58
		oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
-
 
59
	}
-
 
60
 
-
 
61
	if ( GetE('txtName').value.length > 0 )
-
 
62
		oActiveEl.name = GetE('txtName').value ;
-
 
63
		
64
 
64
	if ( oEditor.FCKBrowserInfo.IsIE )
65
	if ( oEditor.FCKBrowserInfo.IsIE )
65
		oActiveEl.value = GetE('txtValue').value ;
66
		oActiveEl.value = GetE('txtValue').value ;
66
	else
67
	else
67
		SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
68
		SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
68
 
69
 
69
	var bIsChecked = GetE('txtSelected').checked ;
70
	var bIsChecked = GetE('txtSelected').checked ;
70
	SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ;	// For Firefox
71
	SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ;	// For Firefox
71
	oActiveEl.checked = bIsChecked ;
72
	oActiveEl.checked = bIsChecked ;
72
 
73
 
73
	return true ;
74
	return true ;
74
}
75
}
75
 
76
 
76
		</script>
77
		</script>
77
	</head>
78
	</head>
78
	<body style="OVERFLOW: hidden" scroll="no">
79
	<body style="OVERFLOW: hidden" scroll="no">
79
		<table height="100%" width="100%">
80
		<table height="100%" width="100%">
80
			<tr>
81
			<tr>
81
				<td align="center">
82
				<td align="center">
82
					<table border="0" cellpadding="0" cellspacing="0" width="80%">
83
					<table border="0" cellpadding="0" cellspacing="0" width="80%">
83
						<tr>
84
						<tr>
84
							<td>
85
							<td>
85
								<span fckLang="DlgCheckboxName">Name</span><br>
86
								<span fckLang="DlgCheckboxName">Name</span><br>
86
								<input type="text" size="20" id="txtName" style="WIDTH: 100%">
87
								<input type="text" size="20" id="txtName" style="WIDTH: 100%">
87
							</td>
88
							</td>
88
						</tr>
89
						</tr>
89
						<tr>
90
						<tr>
90
							<td>
91
							<td>
91
								<span fckLang="DlgCheckboxValue">Value</span><br>
92
								<span fckLang="DlgCheckboxValue">Value</span><br>
92
								<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
93
								<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
93
							</td>
94
							</td>
94
						</tr>
95
						</tr>
95
						<tr>
96
						<tr>
96
							<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
97
							<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
97
						</tr>
98
						</tr>
98
					</table>
99
					</table>
99
				</td>
100
				</td>
100
			</tr>
101
			</tr>
101
		</table>
102
		</table>
102
	</body>
103
	</body>
103
</html>
104
</html>