source: trunk/admin/inc/FCKeditor/editor/dialog/fck_checkbox.html@ 214

Last change on this file since 214 was 2, checked in by root, 15 years ago

importo il progetto

File size: 2.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2<!--
3 * FCKeditor - The text editor for internet
4 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
5 *
6 * Licensed under the terms of the GNU Lesser General Public License:
7 * http://www.opensource.org/licenses/lgpl-license.php
8 *
9 * For further information visit:
10 * http://www.fckeditor.net/
11 *
12 * "Support Open Source software. What about a donation today?"
13 *
14 * File Name: fck_checkbox.html
15 * Checkbox dialog window.
16 *
17 * File Authors:
18 * Frederico Caldeira Knabben (fredck@fckeditor.net)
19-->
20<html>
21 <head>
22 <title>Checkbox Properties</title>
23 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24 <meta content="noindex, nofollow" name="robots">
25 <script src="common/fck_dialog_common.js" type="text/javascript"></script>
26 <script type="text/javascript">
27
28var oEditor = window.parent.InnerDialogLoaded() ;
29
30// Gets the document DOM
31var oDOM = oEditor.FCK.EditorDocument ;
32
33var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
34
35window.onload = function()
36{
37 // First of all, translate the dialog box texts
38 oEditor.FCKLanguageManager.TranslatePage(document) ;
39
40 if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' )
41 {
42 GetE('txtName').value = oActiveEl.name ;
43 GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
44 GetE('txtSelected').checked = oActiveEl.checked ;
45 }
46 else
47 oActiveEl = null ;
48
49 window.parent.SetOkButton( true ) ;
50}
51
52function Ok()
53{
54 if ( !oActiveEl )
55 {
56 oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
57 oActiveEl.type = 'checkbox' ;
58 oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
59 }
60
61 if ( GetE('txtName').value.length > 0 )
62 oActiveEl.name = GetE('txtName').value ;
63
64 if ( oEditor.FCKBrowserInfo.IsIE )
65 oActiveEl.value = GetE('txtValue').value ;
66 else
67 SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
68
69 var bIsChecked = GetE('txtSelected').checked ;
70 SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
71 oActiveEl.checked = bIsChecked ;
72
73 return true ;
74}
75
76 </script>
77 </head>
78 <body style="OVERFLOW: hidden" scroll="no">
79 <table height="100%" width="100%">
80 <tr>
81 <td align="center">
82 <table border="0" cellpadding="0" cellspacing="0" width="80%">
83 <tr>
84 <td>
85 <span fckLang="DlgCheckboxName">Name</span><br>
86 <input type="text" size="20" id="txtName" style="width: 100%">
87 </td>
88 </tr>
89 <tr>
90 <td>
91 <span fckLang="DlgCheckboxValue">Value</span><br>
92 <input type="text" size="20" id="txtValue" style="width: 100%">
93 </td>
94 </tr>
95 <tr>
96 <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
97 </tr>
98 </table>
99 </td>
100 </tr>
101 </table>
102 </body>
103</html>
Note: See TracBrowser for help on using the repository browser.