source: sandbox/filemanager/tp/fckeditor/editor/fckeditor.original.html @ 1575

Revision 1575, 17.4 KB checked in by amuller, 14 years ago (diff)

Ticket #597 - Implentação, melhorias do modulo gerenciador de arquivos

  • 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-2009 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>
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        <!-- @Packager.RemoveLine
30        <meta http-equiv="Cache-Control" content="public">
31        @Packager.RemoveLine -->
32        <script type="text/javascript">
33
34// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
35// without security.fileuri.strict_origin_policy disabled.
36if ( document.location.protocol == 'file:' )
37{
38        try
39        {
40                window.parent.document.domain ;
41        }
42        catch ( e )
43        {
44                window.addEventListener( 'load', function()
45                        {
46                                document.body.innerHTML = '\
47                                        <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
48                                                <p>\
49                                                        <b>Your browser security settings don\'t allow FCKeditor to be opened from\
50                                                        the local filesystem.<\/b>\
51                                                <\/p>\
52                                                <p>\
53                                                        Please open the <b>about:config<\/b> page and disable the\
54                                                        &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\
55                                                <\/p>\
56                                                <p>\
57                                                        Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
58                                                        for more information.\
59                                                <\/p>\
60                                        <\/div>' ;
61                        }, false ) ;
62        }
63}
64
65// Save a reference to the default domain.
66var FCK_ORIGINAL_DOMAIN ;
67
68// Automatically detect the correct document.domain (#123).
69(function()
70{
71        var d = FCK_ORIGINAL_DOMAIN = document.domain ;
72
73        while ( true )
74        {
75                // Test if we can access a parent property.
76                try
77                {
78                        var test = window.parent.document.domain ;
79                        break ;
80                }
81                catch( e ) {}
82
83                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
84                d = d.replace( /.*?(?:\.|$)/, '' ) ;
85
86                if ( d.length == 0 )
87                        break ;         // It was not able to detect the domain.
88
89                try
90                {
91                        document.domain = d ;
92                }
93                catch (e)
94                {
95                        break ;
96                }
97        }
98})() ;
99
100// Save a reference to the detected runtime domain.
101var FCK_RUNTIME_DOMAIN = document.domain ;
102
103var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
104
105// Instead of loading scripts and CSSs using inline tags, all scripts are
106// loaded by code. In this way we can guarantee the correct processing order,
107// otherwise external scripts and inline scripts could be executed in an
108// unwanted order (IE).
109
110function LoadScript( url )
111{
112        document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
113}
114
115// Main editor scripts.
116var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
117
118/* @Packager.RemoveLine
119LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
120@Packager.RemoveLine */
121// @Packager.Remove.Start
122
123LoadScript( '_source/fckconstants.js' ) ;
124LoadScript( '_source/fckjscoreextensions.js' ) ;
125
126if ( sSuffix == 'ie' )
127        LoadScript( '_source/classes/fckiecleanup.js' ) ;
128
129LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
130LoadScript( '_source/internals/fckurlparams.js' ) ;
131LoadScript( '_source/classes/fckevents.js' ) ;
132LoadScript( '_source/classes/fckdataprocessor.js' ) ;
133LoadScript( '_source/internals/fck.js' ) ;
134LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
135LoadScript( '_source/internals/fckconfig.js' ) ;
136
137LoadScript( '_source/internals/fckdebug_empty.js' ) ;
138LoadScript( '_source/internals/fckdomtools.js' ) ;
139LoadScript( '_source/internals/fcktools.js' ) ;
140LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
141LoadScript( '_source/fckeditorapi.js' ) ;
142LoadScript( '_source/classes/fckimagepreloader.js' ) ;
143LoadScript( '_source/internals/fckregexlib.js' ) ;
144LoadScript( '_source/internals/fcklistslib.js' ) ;
145LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
146LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
147LoadScript( '_source/internals/fckxhtml.js' ) ;
148LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
149LoadScript( '_source/internals/fckcodeformatter.js' ) ;
150LoadScript( '_source/internals/fckundo.js' ) ;
151LoadScript( '_source/classes/fckeditingarea.js' ) ;
152LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
153
154LoadScript( 'dtd/fck_xhtml10transitional.js' ) ;
155LoadScript( '_source/classes/fckstyle.js' ) ;
156LoadScript( '_source/internals/fckstyles.js' ) ;
157
158LoadScript( '_source/internals/fcklisthandler.js' ) ;
159LoadScript( '_source/classes/fckelementpath.js' ) ;
160LoadScript( '_source/classes/fckdomrange.js' ) ;
161LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
162LoadScript( '_source/classes/fckw3crange.js' ) ;
163LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
164LoadScript( '_source/classes/fckdomrangeiterator.js' ) ;
165LoadScript( '_source/classes/fckenterkey.js' ) ;
166
167LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
168LoadScript( '_source/internals/fckselection.js' ) ;
169LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
170
171LoadScript( '_source/internals/fcktablehandler.js' ) ;
172LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
173LoadScript( '_source/classes/fckxml.js' ) ;
174LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
175
176LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
177LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
178LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
179LoadScript( '_source/commandclasses/fckshowblocks.js' ) ;
180LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
181LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
182LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
183LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
184LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
185LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
186LoadScript( '_source/commandclasses/fcklistcommands.js' ) ;
187LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ;
188LoadScript( '_source/commandclasses/fckindentcommands.js' ) ;
189LoadScript( '_source/commandclasses/fckblockquotecommand.js' ) ;
190LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ;
191LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ;
192LoadScript( '_source/internals/fckcommands.js' ) ;
193
194LoadScript( '_source/classes/fckpanel.js' ) ;
195LoadScript( '_source/classes/fckicon.js' ) ;
196LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
197LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
198LoadScript( '_source/classes/fckspecialcombo.js' ) ;
199LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
200LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
201LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
202LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
203LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
204LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
205LoadScript( '_source/internals/fckscayt.js' ) ;
206LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
207LoadScript( '_source/classes/fcktoolbar.js' ) ;
208LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
209LoadScript( '_source/internals/fcktoolbarset.js' ) ;
210LoadScript( '_source/internals/fckdialog.js' ) ;
211LoadScript( '_source/classes/fckmenuitem.js' ) ;
212LoadScript( '_source/classes/fckmenublock.js' ) ;
213LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
214LoadScript( '_source/classes/fckcontextmenu.js' ) ;
215LoadScript( '_source/internals/fck_contextmenu.js' ) ;
216LoadScript( '_source/classes/fckhtmliterator.js' ) ;
217LoadScript( '_source/classes/fckplugin.js' ) ;
218LoadScript( '_source/internals/fckplugins.js' ) ;
219
220// @Packager.Remove.End
221
222// Base configuration file.
223LoadScript( '../fckconfig.js' ) ;
224
225        </script>
226        <script type="text/javascript">
227
228// Adobe AIR compatibility file.
229if ( FCKBrowserInfo.IsAIR )
230        LoadScript( 'js/fckadobeair.js' ) ;
231
232if ( FCKBrowserInfo.IsIE )
233{
234        // Remove IE mouse flickering.
235        try
236        {
237                document.execCommand( 'BackgroundImageCache', false, true ) ;
238        }
239        catch (e)
240        {
241                // We have been reported about loading problems caused by the above
242                // line. For safety, let's just ignore errors.
243        }
244
245        // Create the default cleanup object used by the editor.
246        FCK.IECleanup = new FCKIECleanup( window ) ;
247        FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
248        FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
249}
250
251// The first function to be called on selection change must the the styles
252// change checker, because the result of its processing may be used by another
253// functions listening to the same event.
254FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
255
256// The config hidden field is processed immediately, because
257// CustomConfigurationsPath may be set in the page.
258FCKConfig.ProcessHiddenField() ;
259
260// Load the custom configurations file (if defined).
261if ( FCKConfig.CustomConfigurationsPath.length > 0 )
262        LoadScript( FCKConfig.CustomConfigurationsPath ) ;
263
264        </script>
265        <script type="text/javascript">
266
267// Load configurations defined at page level.
268FCKConfig_LoadPageConfig() ;
269
270FCKConfig_PreProcess() ;
271
272// Load the full debug script.
273if ( FCKConfig.Debug )
274        LoadScript( '_source/internals/fckdebug.js' ) ;
275
276        </script>
277        <script type="text/javascript">
278
279var FCK_InternalCSS                     = FCKConfig.BasePath + 'css/fck_internal.css' ;                                 // @Packager.RemoveLine
280var FCK_ShowTableBordersCSS     = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ;   // @Packager.RemoveLine
281/* @Packager.RemoveLine
282// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
283var FCK_InternalCSS                     = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
284var FCK_ShowTableBordersCSS     = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
285@Packager.RemoveLine */
286
287// Popup the debug window if debug mode is set to true. It guarantees that the
288// first debug message will not be lost.
289if ( FCKConfig.Debug )
290        FCKDebug._GetWindow() ;
291
292// Load the active skin CSS.
293document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
294
295// Load the language file.
296FCKLanguageManager.Initialize() ;
297LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
298
299        </script>
300        <script type="text/javascript">
301
302// Initialize the editing area context menu.
303FCK_ContextMenu_Init() ;
304
305FCKPlugins.Load() ;
306
307        </script>
308        <script type="text/javascript">
309
310// Set the editor interface direction.
311window.document.dir = FCKLang.Dir ;
312
313        </script>
314        <script type="text/javascript">
315
316window.onload = function()
317{
318        InitializeAPI() ;
319
320        if ( FCKBrowserInfo.IsIE )
321                FCK_PreloadImages() ;
322        else
323                LoadToolbarSetup() ;
324}
325
326function LoadToolbarSetup()
327{
328        FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
329}
330
331function LoadToolbar()
332{
333        var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
334
335        if ( oToolbarSet.IsLoaded )
336                StartEditor() ;
337        else
338        {
339                oToolbarSet.OnLoad = StartEditor ;
340                oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
341        }
342}
343
344function StartEditor()
345{
346        // Remove the onload listener.
347        FCK.ToolbarSet.OnLoad = null ;
348
349        FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
350
351        FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
352
353        // Start the editor.
354        FCK.StartEditor() ;
355}
356
357function WaitForActive( editorInstance, newStatus )
358{
359        if ( newStatus == FCK_STATUS_ACTIVE )
360        {
361                if ( FCKBrowserInfo.IsGecko )
362                        FCKTools.RunFunction( window.onresize ) ;
363
364                if ( !FCKConfig.PreventSubmitHandler )
365                        _AttachFormSubmitToAPI() ;
366
367                FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
368
369                // Call the special "FCKeditor_OnComplete" function that should be present in
370                // the HTML page where the editor is located.
371                if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
372                        window.parent.FCKeditor_OnComplete( FCK ) ;
373        }
374}
375
376// Gecko and Webkit browsers don't calculate well the IFRAME size so we must
377// recalculate it every time the window size changes.
378if ( FCKBrowserInfo.IsGecko || FCKBrowserInfo.IsSafari )
379{
380        window.onresize = function( e )
381        {
382                // Running in Firefox's chrome makes the window receive the event including subframes.
383                // we care only about this window. Ticket #1642.
384                // #2002: The originalTarget from the event can be the current document, the window, or the editing area.
385                if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
386                        return ;
387
388                var oCell = document.getElementById( 'xEditingArea' ) ;
389
390                var eInnerElement = oCell.firstChild ;
391                if ( eInnerElement )
392                {
393                        eInnerElement.style.height = '0px' ;
394                        eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
395                }
396        }
397}
398
399        </script>
400</head>
401<body>
402        <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
403                <tr id="xToolbarRow" style="display: none">
404                        <td id="xToolbarSpace" style="overflow: hidden">
405                                <table width="100%" cellpadding="0" cellspacing="0">
406                                        <tr id="xCollapsed" style="display: none">
407                                                <td id="xExpandHandle" class="TB_Expand" colspan="3">
408                                                        <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
409                                        </tr>
410                                        <tr id="xExpanded" style="display: none">
411                                                <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
412                                                <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
413                                                        <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
414                                                <td id="xToolbar" class="TB_ToolbarSet"></td>
415                                                <td class="TB_SideBorder" style="width: 1px"></td>
416                                        </tr>
417                                </table>
418                        </td>
419                </tr>
420                <tr>
421                        <td id="xEditingArea" valign="top" style="height: 100%"></td>
422                </tr>
423        </table>
424</body>
425</html>
Note: See TracBrowser for help on using the repository browser.