1075 |
ddelon |
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_button.html
|
|
|
15 |
* Button dialog window.
|
|
|
16 |
*
|
|
|
17 |
* File Authors:
|
|
|
18 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
19 |
-->
|
|
|
20 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
21 |
<head>
|
|
|
22 |
<title>Button 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 |
|
|
|
28 |
var oEditor = window.parent.InnerDialogLoaded() ;
|
|
|
29 |
|
|
|
30 |
// Gets the document DOM
|
|
|
31 |
var oDOM = oEditor.FCK.EditorDocument ;
|
|
|
32 |
|
|
|
33 |
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
|
|
34 |
|
|
|
35 |
window.onload = function()
|
|
|
36 |
{
|
|
|
37 |
// First of all, translate the dialog box texts
|
|
|
38 |
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
|
|
39 |
|
|
|
40 |
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == "INPUT" && ( oActiveEl.type == "button" || oActiveEl.type == "submit" || oActiveEl.type == "reset" ) )
|
|
|
41 |
{
|
|
|
42 |
GetE('txtName').value = oActiveEl.name ;
|
|
|
43 |
GetE('txtValue').value = oActiveEl.value ;
|
|
|
44 |
GetE('txtType').value = oActiveEl.type ;
|
|
|
45 |
|
|
|
46 |
GetE('txtType').disabled = true ;
|
|
|
47 |
}
|
|
|
48 |
else
|
|
|
49 |
oActiveEl = null ;
|
|
|
50 |
|
|
|
51 |
window.parent.SetOkButton( true ) ;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
function Ok()
|
|
|
55 |
{
|
|
|
56 |
if ( !oActiveEl )
|
|
|
57 |
{
|
|
|
58 |
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
|
|
59 |
oActiveEl.type = GetE('txtType').value ;
|
|
|
60 |
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
oActiveEl.name = GetE('txtName').value ;
|
|
|
64 |
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
|
|
65 |
|
|
|
66 |
return true ;
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
</script>
|
|
|
70 |
</head>
|
|
|
71 |
<body style="overflow: hidden">
|
|
|
72 |
<table width="100%" style="height: 100%">
|
|
|
73 |
<tr>
|
|
|
74 |
<td align="center">
|
|
|
75 |
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
|
|
76 |
<tr>
|
|
|
77 |
<td colspan="">
|
|
|
78 |
<span fcklang="DlgCheckboxName">Name</span><br />
|
|
|
79 |
<input type="text" size="20" id="txtName" style="width: 100%" />
|
|
|
80 |
</td>
|
|
|
81 |
</tr>
|
|
|
82 |
<tr>
|
|
|
83 |
<td>
|
|
|
84 |
<span fcklang="DlgButtonText">Text (Value)</span><br />
|
|
|
85 |
<input type="text" id="txtValue" style="width: 100%" />
|
|
|
86 |
</td>
|
|
|
87 |
</tr>
|
|
|
88 |
<tr>
|
|
|
89 |
<td>
|
|
|
90 |
<span fcklang="DlgButtonType">Type</span><br />
|
|
|
91 |
<select id="txtType">
|
|
|
92 |
<option fcklang="DlgButtonTypeBtn" value="button" selected="selected">Button</option>
|
|
|
93 |
<option fcklang="DlgButtonTypeSbm" value="submit">Submit</option>
|
|
|
94 |
<option fcklang="DlgButtonTypeRst" value="reset">Reset</option>
|
|
|
95 |
</select>
|
|
|
96 |
</td>
|
|
|
97 |
</tr>
|
|
|
98 |
</table>
|
|
|
99 |
</td>
|
|
|
100 |
</tr>
|
|
|
101 |
</table>
|
|
|
102 |
</body>
|
|
|
103 |
</html>
|