Ticket #1886: 1886_2.patch
File 1886_2.patch, 17.1 KB (added by , 16 years ago) |
---|
-
_dev/fckreleaser.xml
28 28 <IgnoreDir path="_testcases" /> 29 29 30 30 <!-- 31 The following directoryshould not existing in the development version,31 The following files should not existing in the development version, 32 32 but we leave it here just in case the packager has been run by mistake. 33 33 --> 34 <IgnoreDir path="editor/js" /> 34 <IgnoreFile path="editor/js/fckeditorcode_ie.js" /> 35 <IgnoreFile path="editor/js/fckeditorcode_gecko.js" /> 35 36 36 37 <!-- 37 <Ignore File path="anyfile.xxx" />38 <IgnoreDir path="dir/path" /> 38 39 --> 39 40 40 41 </Release> -
_samples/adobeair/application.xml
1 <?xml version="1.0" encoding="utf-8" ?> 2 <application xmlns="http://ns.adobe.com/air/application/1.0.M6"> 3 <!-- AIR Application Descriptor File. See http://www.adobe.com/go/air_1.0_application_descriptor. --> 4 <id>net.fckeditor.air.samples.sample01</id> 5 <name>FCKeditor Sample Application 1.0</name> 6 <version>1.0</version> 7 <filename>FCKeditor AIR Sample</filename> 8 <description>This is a sample AIR application including FCKeditor.</description> 9 <copyright>Copyright (C) 2003-2008 Frederico Caldeira Knabben</copyright> 10 <initialWindow> 11 <content>_samples/adobeair/sample01.html</content> 12 <title>FCKeditor AIR Sample</title> 13 <systemChrome>standard</systemChrome> 14 <transparent>false</transparent> 15 <visible>true</visible> 16 <minimizable>true</minimizable> 17 <maximizable>true</maximizable> 18 <resizable>true</resizable> 19 <x>100</x> 20 <y>80</y> 21 <width>820</width> 22 <height>600</height> 23 <minSize>600 400</minSize> 24 </initialWindow> 25 <installFolder>FCKeditor/AIR Samples/Sample01</installFolder> 26 <programMenuFolder>FCKeditor/AIR Samples</programMenuFolder> 27 <icon> 28 <image16x16>_samples/adobeair/icons/16.png</image16x16> 29 <image32x32>_samples/adobeair/icons/32.png</image32x32> 30 <image48x48>_samples/adobeair/icons/48.png</image48x48> 31 <image128x128>_samples/adobeair/icons/128.png</image128x128> 32 </icon> 33 <customUpdateUI>false</customUpdateUI> 34 <allowBrowserInvocation>false</allowBrowserInvocation> 35 </application> -
_samples/adobeair/package.bat
1 @ECHO OFF 2 3 :: 4 :: FCKeditor - The text editor for Internet - http://www.fckeditor.net 5 :: Copyright (C) 2003-2008 Frederico Caldeira Knabben 6 :: 7 :: == BEGIN LICENSE == 8 :: 9 :: Licensed under the terms of any of the following licenses at your 10 :: choice: 11 :: 12 :: - GNU General Public License Version 2 or later (the "GPL") 13 :: http://www.gnu.org/licenses/gpl.html 14 :: 15 :: - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 16 :: http://www.gnu.org/licenses/lgpl.html 17 :: 18 :: - Mozilla Public License Version 1.1 or later (the "MPL") 19 :: http://www.mozilla.org/MPL/MPL-1.1.html 20 :: 21 :: == END LICENSE == 22 :: 23 24 :: adt -package SIGNING_OPTIONS air_file app_xml [file_or_dir | -C dir file_or_dir | -e file dir ...] ... 25 26 "C:\Adobe AIR SDK\bin\adt" -package -storetype pkcs12 -keystore sample01_cert.pfx -storepass 123abc FCKeditor.air application.xml -C ../../ . 27 -
_samples/adobeair/run.bat
1 @ECHO OFF 2 3 :: 4 :: FCKeditor - The text editor for Internet - http://www.fckeditor.net 5 :: Copyright (C) 2003-2008 Frederico Caldeira Knabben 6 :: 7 :: == BEGIN LICENSE == 8 :: 9 :: Licensed under the terms of any of the following licenses at your 10 :: choice: 11 :: 12 :: - GNU General Public License Version 2 or later (the "GPL") 13 :: http://www.gnu.org/licenses/gpl.html 14 :: 15 :: - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 16 :: http://www.gnu.org/licenses/lgpl.html 17 :: 18 :: - Mozilla Public License Version 1.1 or later (the "MPL") 19 :: http://www.mozilla.org/MPL/MPL-1.1.html 20 :: 21 :: == END LICENSE == 22 :: 23 24 :: adl [-runtime runtime-directory] [-pubId publisher-id] [-nodebug] application.xml [rootdirectory] [-- arguments] 25 26 "C:\Adobe AIR SDK\bin\adl" application.xml ../../ -
_samples/adobeair/sample01.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <!-- 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2008 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 * Sample Adobe AIR application. 23 --> 24 <html xmlns="http://www.w3.org/1999/xhtml"> 25 <head> 26 <title>FCKeditor - Adobe AIR Sample</title> 27 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 28 <meta name="robots" content="noindex, nofollow" /> 29 <link href="../sample.css" rel="stylesheet" type="text/css" /> 30 <script type="text/javascript" src="../../fckeditor.js"></script> 31 <style type="text/css"> 32 body { margin: 10px ; } 33 </style> 34 </head> 35 <body> 36 <h1> 37 FCKeditor - Adobe AIR Sample 38 </h1> 39 <div> 40 This sample loads FCKeditor with full features enabled. 41 </div> 42 <hr /> 43 <script type="text/javascript"> 44 45 // Automatically calculates the editor base path based on the _samples directory. 46 // This is usefull only for these samples. A real application should use something like this: 47 // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. 48 var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; 49 50 var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; 51 oFCKeditor.BasePath = sBasePath ; 52 oFCKeditor.Height = 400 ; 53 oFCKeditor.Value = '<p>FCKeditor is in the <strong>AIR</strong>!<\/p>' ; 54 oFCKeditor.Create() ; 55 56 </script> 57 </body> 58 </html> -
_whatsnew.html
37 37 <p> 38 38 New Features and Improvements:</p> 39 39 <ul> 40 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1886">#1886</a>] <strong> 41 Adobe AIR</strong> compatibility.</li> 40 42 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/123">#123</a>] Full support 41 43 for <strong>document.domain</strong> with automatic domain detection.</li> 42 44 <li>New language file for <strong>Canadian French</strong>.</li> -
editor/_source/classes/fckeditingarea.js
133 133 oDoc.close() ; 134 134 } 135 135 136 if ( FCKBrowserInfo.IsAIR ) 137 FCKAdobeAIR.EditingArea_Start( oDoc, html ) ; 138 136 139 // Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it 137 140 // will magically work. 138 141 if ( FCKBrowserInfo.IsGecko10 && !secondCall ) -
editor/_source/classes/fckpanel.js
80 80 oDocument.write( '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ; 81 81 oDocument.close() ; 82 82 83 if( FCKBrowserInfo.IsAIR ) 84 FCKAdobeAIR.Panel_Contructor( oDocument, window.document.location ) ; 85 83 86 FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ; 84 87 FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ; 85 88 } -
editor/_source/fckeditorapi.js
39 39 // code (like JSON) can extend the Object prototype and we get then extra oEditor 40 40 // objects that aren't really FCKeditor instances. 41 41 var sScript = 42 ' varFCKeditorAPI = {' +42 'window.FCKeditorAPI = {' + 43 43 'Version : "[Development]",' + 44 44 'VersionBuild : "[DEV]",' + 45 45 '__Instances : new Object(),' + … … 111 111 // following seams to work well. 112 112 eval.call( oParentWindow, sScript ) ; 113 113 } 114 else if( FCKBrowserInfo.IsAIR ) 115 { 116 FCKAdobeAIR.FCKeditorAPI_Evaluate( oParentWindow, sScript ) ; 117 } 114 118 else if ( FCKBrowserInfo.IsSafari || FCKBrowserInfo.IsGecko19 ) 115 119 { 116 120 // oParentWindow.eval in Safari and Gran Paradiso executes in the calling window -
editor/_source/internals/fckbrowserinfo.js
31 31 IsGecko : s.Contains('gecko/'), 32 32 IsSafari : s.Contains(' applewebkit/'), // Read "IsWebKit" 33 33 IsOpera : !!window.opera, 34 IsAIR : s.Contains(' adobeair/'), 34 35 IsMac : s.Contains('macintosh') 35 36 } ; 36 37 -
editor/_source/internals/fcktoolbarset.js
50 50 var oOutMatch = sLocation.match( /^Out:(.+)\((\w+)\)$/ ) ; 51 51 if ( oOutMatch ) 52 52 { 53 eToolbarTarget = eval( 'parent.' + oOutMatch[1] ).document.getElementById( oOutMatch[2] ) ; 53 if ( FCKBrowserInfo.IsAIR ) 54 FCKAdobeAIR.ToolbarSet_GetOutElement( window, oOutMatch ) ; 55 else 56 eToolbarTarget = eval( 'parent.' + oOutMatch[1] ).document.getElementById( oOutMatch[2] ) ; 54 57 } 55 58 else 56 59 { … … 111 114 + '</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ; 112 115 eTargetDocument.close() ; 113 116 117 if( FCKBrowserInfo.IsAIR ) 118 FCKAdobeAIR.ToolbarSet_InitOutFrame( eTargetDocument ) ; 119 114 120 FCKTools.AddEventListener( eTargetDocument, 'contextmenu', FCKTools.CancelEvent ) ; 115 121 116 122 // Load external resources (must be done here, otherwise Firefox will not -
editor/fckeditor.html
198 198 </script> 199 199 <script type="text/javascript"> 200 200 201 // Adobe AIR compatibility file. 202 if ( FCKBrowserInfo.IsAIR ) 203 LoadScript( 'js/fckadobeair.js' ) ; 204 201 205 if ( FCKBrowserInfo.IsIE ) 202 206 { 203 207 // Remove IE mouse flickering. -
editor/js/fckadobeair.js
1 /* 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 4 * 5 * == BEGIN LICENSE == 6 * 7 * Licensed under the terms of any of the following licenses at your 8 * choice: 9 * 10 * - GNU General Public License Version 2 or later (the "GPL") 11 * http://www.gnu.org/licenses/gpl.html 12 * 13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 14 * http://www.gnu.org/licenses/lgpl.html 15 * 16 * - Mozilla Public License Version 1.1 or later (the "MPL") 17 * http://www.mozilla.org/MPL/MPL-1.1.html 18 * 19 * == END LICENSE == 20 * 21 * Compatibility code for Adobe AIR. 22 */ 23 24 if ( FCKBrowserInfo.IsAIR ) 25 { 26 var FCKAdobeAIR = (function() 27 { 28 /* 29 * ### Private functions. 30 */ 31 32 function _GetDocumentHead( doc ) 33 { 34 var head ; 35 var heads = doc.getElementsByTagName( 'head' ) ; 36 37 if( heads && heads[0] ) 38 head = heads[0] ; 39 else 40 { 41 head = doc.createElement( 'head' ) ; 42 doc.documentElement.insertBefore( head, doc.documentElement.firstChild ) ; 43 } 44 45 return head ; 46 } ; 47 48 /* 49 * ### Public interface. 50 */ 51 return { 52 FCKeditorAPI_Evaluate : function( parentWindow, script ) 53 { 54 // TODO : This one doesn't work always. The parent window will 55 // point to an anonymous function in this window. If this 56 // window is destroyied the parent window will be pointing to 57 // an invalid reference. 58 59 // Evaluate the script in this window. 60 eval( script ) ; 61 62 // Point the FCKeditorAPI property of the parent window to the 63 // local reference. 64 parentWindow.FCKeditorAPI = window.FCKeditorAPI ; 65 }, 66 67 EditingArea_Start : function( doc, html ) 68 { 69 // Get the HTML for the <head>. 70 var headInnerHtml = html.match( /<head>([\s\S]*)<\/head>/i )[1] ; 71 72 if ( headInnerHtml && headInnerHtml.length > 0 ) 73 { 74 // Inject the <head> HTML inside a <div>. 75 // Do that before _GetDocumentHead because WebKit moves 76 // <link css> elements to the <head> at this point. 77 var div = doc.createElement( 'div' ) ; 78 div.innerHTML = headInnerHtml ; 79 80 // Move the <div> nodes to <head>. 81 FCKDomTools.MoveChildren( div, _GetDocumentHead( doc ) ) ; 82 } 83 84 doc.body.innerHTML = html.match( /<body>([\s\S]*)<\/body>/i )[1] ; 85 86 //prevent clicking on hyperlinks and navigating away 87 doc.addEventListener('click', function( ev ) 88 { 89 ev.preventDefault() ; 90 ev.stopPropagation() ; 91 }, true ) ; 92 }, 93 94 Panel_Contructor : function( doc, baseLocation ) 95 { 96 var head = _GetDocumentHead( doc ) ; 97 98 // Set the <base> href. 99 head.appendChild( doc.createElement('base') ).href = baseLocation ; 100 101 doc.body.style.margin = '0px' ; 102 doc.body.style.padding = '0px' ; 103 }, 104 105 ToolbarSet_GetOutElement : function( win, outMatch ) 106 { 107 var toolbarTarget = win.parent ; 108 109 var targetWindowParts = outMatch[1].split( '.' ) ; 110 while ( targetWindowParts.length > 0 ) 111 { 112 var part = targetWindowParts.shift() ; 113 if ( part.length > 0 ) 114 toolbarTarget = toolbarTarget[ part ] ; 115 } 116 117 toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ; 118 }, 119 120 ToolbarSet_InitOutFrame : function( doc ) 121 { 122 var head = _GetDocumentHead( doc ) ; 123 124 head.appendChild( doc.createElement('base') ).href = window.document.location ; 125 126 var targetWindow = doc.defaultView; 127 128 targetWindow.adjust = function() 129 { 130 targetWindow.frameElement.height = doc.body.scrollHeight; 131 } ; 132 133 targetWindow.onresize = targetWindow.adjust ; 134 targetWindow.setTimeout( targetWindow.adjust, 0 ) ; 135 136 doc.body.style.overflow = 'hidden'; 137 doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ; 138 } 139 } ; 140 })(); 141 142 /* 143 * ### Overrides 144 */ 145 ( function() 146 { 147 // Save references for override reuse. 148 var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ; 149 var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ; 150 151 FCKPanel_Window_OnFocus = function( e, panel ) 152 { 153 // Call the original implementation. 154 _Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ; 155 156 if ( panel._focusTimer ) 157 clearTimeout( panel._focusTimer ) ; 158 } 159 160 FCKPanel_Window_OnBlur = function( e, panel ) 161 { 162 // Delay the execution of the original function. 163 panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ; 164 } 165 })(); 166 } -
fckeditor.js
287 287 288 288 // Opera 9.50+ 289 289 if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 ) 290 290 return true ; 291 291 292 // Adobe AIR 293 // Checked before Safari because AIR have the WebKit rich text editor 294 // features from Safari 3.0.4, but the version reported is 420. 295 if ( sAgent.indexOf( ' adobeair/' ) != -1 ) 296 return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ; // Build must be at least v1 297 292 298 // Safari 3+ 293 299 if ( sAgent.indexOf( ' applewebkit/' ) != -1 ) 294 300 return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ; // Build must be at least 522 (v3)