event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / fckeditor / editor / dialog / fck_radiobutton.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >\r
2 <!--\r
3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
4  * Copyright (C) 2003-2007 Frederico Caldeira Knabben\r
5  *\r
6  * == BEGIN LICENSE ==\r
7  *\r
8  * Licensed under the terms of any of the following licenses at your\r
9  * choice:\r
10  *\r
11  *  - GNU General Public License Version 2 or later (the "GPL")\r
12  *    http://www.gnu.org/licenses/gpl.html\r
13  *\r
14  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
15  *    http://www.gnu.org/licenses/lgpl.html\r
16  *\r
17  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
18  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
19  *\r
20  * == END LICENSE ==\r
21  *\r
22  * Radio Button dialog window.\r
23 -->\r
24 <html>\r
25         <head>\r
26                 <title>Radio Button Properties</title>\r
27                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
28                 <meta content="noindex, nofollow" name="robots">\r
29                 <script src="common/fck_dialog_common.js" type="text/javascript"></script>\r
30                 <script type="text/javascript">\r
31 \r
32 var oEditor = window.parent.InnerDialogLoaded() ;\r
33 \r
34 // Gets the document DOM\r
35 var oDOM = oEditor.FCK.EditorDocument ;\r
36 \r
37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;\r
38 \r
39 window.onload = function()\r
40 {\r
41         // First of all, translate the dialog box texts\r
42         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
43 \r
44         if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )\r
45         {\r
46                 GetE('txtName').value           = oActiveEl.name ;\r
47                 GetE('txtValue').value          = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;\r
48                 GetE('txtSelected').checked     = oActiveEl.checked ;\r
49         }\r
50         else\r
51                 oActiveEl = null ;\r
52 \r
53         window.parent.SetOkButton( true ) ;\r
54 }\r
55 \r
56 function Ok()\r
57 {\r
58         if ( !oActiveEl )\r
59         {\r
60                 oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;\r
61                 oActiveEl.type = 'radio' ;\r
62                 oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;\r
63         }\r
64 \r
65         if ( GetE('txtName').value.length > 0 )\r
66                 oActiveEl.name = GetE('txtName').value ;\r
67 \r
68         if ( oEditor.FCKBrowserInfo.IsIE )\r
69                 oActiveEl.value = GetE('txtValue').value ;\r
70         else\r
71                 SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;\r
72 \r
73         var bIsChecked = GetE('txtSelected').checked ;\r
74         SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ;   // For Firefox\r
75         oActiveEl.checked = bIsChecked ;\r
76 \r
77         return true ;\r
78 }\r
79 \r
80                 </script>\r
81         </head>\r
82         <body style="OVERFLOW: hidden" scroll="no">\r
83                 <table height="100%" width="100%">\r
84                         <tr>\r
85                                 <td align="center">\r
86                                         <table border="0" cellpadding="0" cellspacing="0" width="80%">\r
87                                                 <tr>\r
88                                                         <td>\r
89                                                                 <span fckLang="DlgCheckboxName">Name</span><br>\r
90                                                                 <input type="text" size="20" id="txtName" style="WIDTH: 100%">\r
91                                                         </td>\r
92                                                 </tr>\r
93                                                 <tr>\r
94                                                         <td>\r
95                                                                 <span fckLang="DlgCheckboxValue">Value</span><br>\r
96                                                                 <input type="text" size="20" id="txtValue" style="WIDTH: 100%">\r
97                                                         </td>\r
98                                                 </tr>\r
99                                                 <tr>\r
100                                                         <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>\r
101                                                 </tr>\r
102                                         </table>\r
103                                 </td>\r
104                         </tr>\r
105                 </table>\r
106         </body>\r
107 </html>\r