1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
8 * Licensed under the terms of any of the following licenses at your
11 * - GNU General Public License Version 2 or later (the "GPL")
12 * http://www.gnu.org/licenses/gpl.html
14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15 * http://www.gnu.org/licenses/lgpl.html
17 * - Mozilla Public License Version 1.1 or later (the "MPL")
18 * http://www.mozilla.org/MPL/MPL-1.1.html
22 * Radio Button dialog window.
26 <title>Radio Button 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">
32 var dialog = window.parent ;
33 var oEditor = dialog.InnerDialogLoaded() ;
35 // Gets the document DOM
36 var oDOM = oEditor.FCK.EditorDocument ;
38 var oActiveEl = dialog.Selection.GetSelectedElement() ;
40 window.onload = function()
42 // First of all, translate the dialog box texts
43 oEditor.FCKLanguageManager.TranslatePage(document) ;
45 if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
47 GetE('txtName').value = oActiveEl.name ;
48 GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
49 GetE('txtSelected').checked = oActiveEl.checked ;
54 dialog.SetOkButton( true ) ;
55 dialog.SetAutoSize( true ) ;
56 SelectField( 'txtName' ) ;
61 oEditor.FCKUndo.SaveUndoStep() ;
63 oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ;
65 if ( oEditor.FCKBrowserInfo.IsIE )
66 oActiveEl.value = GetE('txtValue').value ;
68 SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
70 var bIsChecked = GetE('txtSelected').checked ;
71 SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
72 oActiveEl.checked = bIsChecked ;
79 <body style="OVERFLOW: hidden" scroll="no">
80 <table height="100%" width="100%">
83 <table border="0" cellpadding="0" cellspacing="0" width="80%">
86 <span fckLang="DlgCheckboxName">Name</span><br>
87 <input type="text" size="20" id="txtName" style="WIDTH: 100%">
92 <span fckLang="DlgCheckboxValue">Value</span><br>
93 <input type="text" size="20" id="txtValue" style="WIDTH: 100%">
97 <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>