source: branches/1.2/workflow/js/fckeditor/editor/dialog/fck_hiddenfield.html @ 1349

Revision 1349, 2.9 KB checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2<!--
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5 *
6 * == BEGIN LICENSE ==
7 *
8 * Licensed under the terms of any of the following licenses at your
9 * choice:
10 *
11 *  - GNU General Public License Version 2 or later (the "GPL")
12 *    http://www.gnu.org/licenses/gpl.html
13 *
14 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15 *    http://www.gnu.org/licenses/lgpl.html
16 *
17 *  - Mozilla Public License Version 1.1 or later (the "MPL")
18 *    http://www.mozilla.org/MPL/MPL-1.1.html
19 *
20 * == END LICENSE ==
21 *
22 * Hidden Field dialog window.
23-->
24<html xmlns="http://www.w3.org/1999/xhtml">
25<head>
26        <title>Hidden Field 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">
31
32var oEditor = window.parent.InnerDialogLoaded() ;
33var FCK = oEditor.FCK ;
34
35// Gets the document DOM
36var oDOM = FCK.EditorDocument ;
37
38// Get the selected flash embed (if available).
39var oFakeImage = FCK.Selection.GetSelectedElement() ;
40var oActiveEl ;
41
42if ( oFakeImage )
43{
44        if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') )
45                oActiveEl = FCK.GetRealElement( oFakeImage ) ;
46        else
47                oFakeImage = null ;
48}
49
50window.onload = function()
51{
52        // First of all, translate the dialog box texts
53        oEditor.FCKLanguageManager.TranslatePage(document) ;
54
55        if ( oActiveEl )
56        {
57                GetE('txtName').value           = oActiveEl.name ;
58                GetE('txtValue').value          = oActiveEl.value ;
59        }
60
61        window.parent.SetOkButton( true ) ;
62}
63
64
65function Ok()
66{
67        if ( !oActiveEl )
68        {
69                oActiveEl = FCK.EditorDocument.createElement( 'INPUT' ) ;
70                oActiveEl.type = 'hidden' ;
71
72                oFakeImage = null ;
73        }
74
75        oActiveEl.name = GetE('txtName').value ;
76        SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
77
78        if ( !oFakeImage )
79        {
80                oFakeImage      = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
81                oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
82                oFakeImage      = FCK.InsertElementAndGetIt( oFakeImage ) ;
83        }
84        else
85                oEditor.FCKUndo.SaveUndoStep() ;
86
87        oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oActiveEl ) ;
88
89        return true ;
90}
91
92        </script>
93</head>
94<body style="overflow: hidden" scroll="no">
95        <table height="100%" width="100%">
96                <tr>
97                        <td align="center">
98                                <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
99                                        <tr>
100                                                <td>
101                                                        <span fcklang="DlgHiddenName">Name</span><br />
102                                                        <input type="text" size="20" id="txtName" style="width: 100%" />
103                                                </td>
104                                        </tr>
105                                        <tr>
106                                                <td>
107                                                        <span fcklang="DlgHiddenValue">Value</span><br />
108                                                        <input type="text" size="30" id="txtValue" style="width: 100%" />
109                                                </td>
110                                        </tr>
111                                </table>
112                        </td>
113                </tr>
114        </table>
115</body>
116</html>
Note: See TracBrowser for help on using the repository browser.