import torrus 1.0.9
[freeside.git] / httemplate / elements / fckeditor / editor / dialog / fck_checkbox.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-2010 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  * Checkbox dialog window.\r
23 -->\r
24 <html>\r
25         <head>\r
26                 <title>Checkbox 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 dialog      = window.parent ;\r
33 var oEditor     = dialog.InnerDialogLoaded() ;\r
34 \r
35 // Gets the document DOM\r
36 var oDOM = oEditor.FCK.EditorDocument ;\r
37 \r
38 var oActiveEl = dialog.Selection.GetSelectedElement() ;\r
39 \r
40 window.onload = function()\r
41 {\r
42         // First of all, translate the dialog box texts\r
43         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
44 \r
45         if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' )\r
46         {\r
47                 GetE('txtName').value           = oActiveEl.name ;\r
48                 GetE('txtValue').value          = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;\r
49                 GetE('txtSelected').checked     = oActiveEl.checked ;\r
50         }\r
51         else\r
52                 oActiveEl = null ;\r
53 \r
54         dialog.SetOkButton( true ) ;\r
55         dialog.SetAutoSize( true ) ;\r
56         SelectField( 'txtName' ) ;\r
57 }\r
58 \r
59 function Ok()\r
60 {\r
61         oEditor.FCKUndo.SaveUndoStep() ;\r
62 \r
63         oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'checkbox' } ) ;\r
64 \r
65         if ( oEditor.FCKBrowserInfo.IsIE )\r
66                 oActiveEl.value = GetE('txtValue').value ;\r
67         else\r
68                 SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;\r
69 \r
70         var bIsChecked = GetE('txtSelected').checked ;\r
71         SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ;   // For Firefox\r
72         oActiveEl.checked = bIsChecked ;\r
73 \r
74         return true ;\r
75 }\r
76 \r
77                 </script>\r
78         </head>\r
79         <body style="OVERFLOW: hidden" scroll="no">\r
80                 <table height="100%" width="100%">\r
81                         <tr>\r
82                                 <td align="center">\r
83                                         <table border="0" cellpadding="0" cellspacing="0" width="80%">\r
84                                                 <tr>\r
85                                                         <td>\r
86                                                                 <span fckLang="DlgCheckboxName">Name</span><br>\r
87                                                                 <input type="text" size="20" id="txtName" style="WIDTH: 100%">\r
88                                                         </td>\r
89                                                 </tr>\r
90                                                 <tr>\r
91                                                         <td>\r
92                                                                 <span fckLang="DlgCheckboxValue">Value</span><br>\r
93                                                                 <input type="text" size="20" id="txtValue" style="WIDTH: 100%">\r
94                                                         </td>\r
95                                                 </tr>\r
96                                                 <tr>\r
97                                                         <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>\r
98                                                 </tr>\r
99                                         </table>\r
100                                 </td>\r
101                         </tr>\r
102                 </table>\r
103         </body>\r
104 </html>\r