~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/FCK/editor/fckeditor.html

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 * Main page that holds the editor.
 
23
-->
 
24
<html xmlns="http://www.w3.org/1999/xhtml">
 
25
<head>
 
26
        <title>FCKeditor</title>
 
27
        <meta name="robots" content="noindex, nofollow" />
 
28
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
29
        <meta http-equiv="Cache-Control" content="public" />
 
30
        <script type="text/javascript">
 
31
 
 
32
// Instead of loading scripts and CSSs using inline tags, all scripts are
 
33
// loaded by code. In this way we can guarantee the correct processing order,
 
34
// otherwise external scripts and inline scripts could be executed in an
 
35
// unwanted order (IE).
 
36
 
 
37
function LoadScript( url )
 
38
{
 
39
        document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ;
 
40
}
 
41
 
 
42
function LoadCss( url )
 
43
{
 
44
        document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
 
45
}
 
46
 
 
47
// Main editor scripts.
 
48
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
 
49
 
 
50
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
 
51
 
 
52
// Base configuration file.
 
53
LoadScript( '../fckconfig.js' ) ;
 
54
 
 
55
        </script>
 
56
        <script type="text/javascript">
 
57
 
 
58
if ( FCKBrowserInfo.IsIE )
 
59
{
 
60
        // Remove IE mouse flickering.
 
61
        try
 
62
        {
 
63
                document.execCommand( 'BackgroundImageCache', false, true ) ;
 
64
        }
 
65
        catch (e)
 
66
        {
 
67
                // We have been reported about loading problems caused by the above
 
68
                // line. For safety, let's just ignore errors.
 
69
        }
 
70
 
 
71
        // Create the default cleanup object used by the editor.
 
72
        FCK.IECleanup = new FCKIECleanup( window ) ;
 
73
        FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
 
74
        FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
 
75
}
 
76
 
 
77
// The config hidden field is processed immediately, because
 
78
// CustomConfigurationsPath may be set in the page.
 
79
FCKConfig.ProcessHiddenField() ;
 
80
 
 
81
// Load the custom configurations file (if defined).
 
82
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
 
83
        LoadScript( FCKConfig.CustomConfigurationsPath ) ;
 
84
 
 
85
        </script>
 
86
        <script type="text/javascript">
 
87
 
 
88
// Load configurations defined at page level.
 
89
FCKConfig_LoadPageConfig() ;
 
90
 
 
91
FCKConfig_PreProcess() ;
 
92
 
 
93
// Load the active skin CSS.
 
94
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
 
95
 
 
96
// Load the language file.
 
97
FCKLanguageManager.Initialize() ;
 
98
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
 
99
 
 
100
        </script>
 
101
        <script type="text/javascript">
 
102
 
 
103
// Initialize the editing area context menu.
 
104
FCK_ContextMenu_Init() ;
 
105
 
 
106
FCKPlugins.Load() ;
 
107
 
 
108
        </script>
 
109
        <script type="text/javascript">
 
110
 
 
111
// Set the editor interface direction.
 
112
window.document.dir = FCKLang.Dir ;
 
113
 
 
114
// Activate pasting operations.
 
115
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
 
116
        FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;
 
117
 
 
118
        </script>
 
119
        <script type="text/javascript">
 
120
 
 
121
window.onload = function()
 
122
{
 
123
        InitializeAPI() ;
 
124
 
 
125
        if ( FCKBrowserInfo.IsIE )
 
126
                FCK_PreloadImages() ;
 
127
        else
 
128
                LoadToolbarSetup() ;
 
129
}
 
130
 
 
131
function LoadToolbarSetup()
 
132
{
 
133
        FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
 
134
}
 
135
 
 
136
function LoadToolbar()
 
137
{
 
138
        var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
 
139
 
 
140
        if ( oToolbarSet.IsLoaded )
 
141
                StartEditor() ;
 
142
        else
 
143
        {
 
144
                oToolbarSet.OnLoad = StartEditor ;
 
145
                oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
 
146
        }
 
147
}
 
148
 
 
149
function StartEditor()
 
150
{
 
151
        // Remove the onload listener.
 
152
        FCK.ToolbarSet.OnLoad = null ;
 
153
 
 
154
        FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
 
155
 
 
156
        FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
 
157
 
 
158
        // Start the editor.
 
159
        FCK.StartEditor() ;
 
160
}
 
161
 
 
162
function WaitForActive( editorInstance, newStatus )
 
163
{
 
164
        if ( newStatus == FCK_STATUS_ACTIVE )
 
165
        {
 
166
                if ( FCKBrowserInfo.IsGecko )
 
167
                        FCKTools.RunFunction( window.onresize ) ;
 
168
 
 
169
                _AttachFormSubmitToAPI() ;
 
170
 
 
171
                FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
 
172
 
 
173
                // Call the special "FCKeditor_OnComplete" function that should be present in
 
174
                // the HTML page where the editor is located.
 
175
                if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
 
176
                        window.parent.FCKeditor_OnComplete( FCK ) ;
 
177
        }
 
178
}
 
179
 
 
180
// Gecko browsers doens't calculate well that IFRAME size so we must
 
181
// recalculate it every time the window size changes.
 
182
if ( FCKBrowserInfo.IsGecko )
 
183
{
 
184
        function Window_OnResize()
 
185
        {
 
186
                if ( FCKBrowserInfo.IsOpera )
 
187
                        return ;
 
188
 
 
189
                var oCell = document.getElementById( 'xEditingArea' ) ;
 
190
 
 
191
                var eInnerElement = oCell.firstChild ;
 
192
                if ( eInnerElement )
 
193
                {
 
194
                        eInnerElement.style.height = 0 ;
 
195
                        eInnerElement.style.height = oCell.scrollHeight - 2 ;
 
196
                }
 
197
        }
 
198
        window.onresize = Window_OnResize ;
 
199
}
 
200
 
 
201
        </script>
 
202
</head>
 
203
<body>
 
204
        <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
 
205
                <tr id="xToolbarRow" style="display: none">
 
206
                        <td id="xToolbarSpace" style="overflow: hidden">
 
207
                                <table width="100%" cellpadding="0" cellspacing="0">
 
208
                                        <tr id="xCollapsed" style="display: none">
 
209
                                                <td id="xExpandHandle" class="TB_Expand" colspan="3">
 
210
                                                        <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
 
211
                                        </tr>
 
212
                                        <tr id="xExpanded" style="display: none">
 
213
                                                <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
 
214
                                                <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
 
215
                                                        <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
 
216
                                                <td id="xToolbar" class="TB_ToolbarSet"></td>
 
217
                                                <td class="TB_SideBorder" style="width: 1px"></td>
 
218
                                        </tr>
 
219
                                </table>
 
220
                        </td>
 
221
                </tr>
 
222
                <tr>
 
223
                        <td id="xEditingArea" valign="top" style="height: 100%"></td>
 
224
                </tr>
 
225
        </table>
 
226
</body>
 
227
</html>