Changeset 2288
- Timestamp:
- 2008-07-25 12:23:18 (6 months ago)
- Location:
- FCKeditor/branches/versions/2.6.x
- Files:
-
- 13 added
- 4 removed
- 102 modified
-
_dev/build_release.bat (modified) (1 diff)
-
_dev/releaser/fckreleaser.php (modified) (3 diffs)
-
editor/css/fck_editorarea.css (modified) (3 diffs)
-
editor/dialog/fck_anchor.html (modified) (2 diffs)
-
editor/dialog/fck_div.html (added)
-
editor/dialog/fck_link/fck_link.js (modified) (3 diffs)
-
editor/dialog/fck_paste.html (modified) (7 diffs)
-
editor/dialog/fck_replace.html (modified) (1 diff)
-
editor/dialog/fck_spellerpages.html (modified) (1 diff)
-
editor/fckeditor.html (modified) (2 diffs)
-
editor/lang/af.js (modified) (4 diffs)
-
editor/lang/ar.js (modified) (4 diffs)
-
editor/lang/bg.js (modified) (4 diffs)
-
editor/lang/bn.js (modified) (4 diffs)
-
editor/lang/bs.js (modified) (4 diffs)
-
editor/lang/ca.js (modified) (4 diffs)
-
editor/lang/cs.js (modified) (4 diffs)
-
editor/lang/da.js (modified) (4 diffs)
-
editor/lang/de.js (modified) (4 diffs)
-
editor/lang/el.js (modified) (4 diffs)
-
editor/lang/en-au.js (modified) (4 diffs)
-
editor/lang/en-ca.js (modified) (4 diffs)
-
editor/lang/en.js (modified) (4 diffs)
-
editor/lang/en-uk.js (modified) (4 diffs)
-
editor/lang/eo.js (modified) (4 diffs)
-
editor/lang/es.js (modified) (4 diffs)
-
editor/lang/et.js (modified) (4 diffs)
-
editor/lang/eu.js (modified) (4 diffs)
-
editor/lang/fa.js (modified) (7 diffs)
-
editor/lang/fi.js (modified) (4 diffs)
-
editor/lang/fo.js (modified) (9 diffs)
-
editor/lang/fr-ca.js (modified) (4 diffs)
-
editor/lang/fr.js (modified) (4 diffs)
-
editor/lang/gl.js (modified) (4 diffs)
-
editor/lang/gu.js (modified) (4 diffs)
-
editor/lang/he.js (modified) (4 diffs)
-
editor/lang/hi.js (modified) (4 diffs)
-
editor/lang/hr.js (modified) (4 diffs)
-
editor/lang/hu.js (modified) (4 diffs)
-
editor/lang/it.js (modified) (4 diffs)
-
editor/lang/ja.js (modified) (4 diffs)
-
editor/lang/km.js (modified) (4 diffs)
-
editor/lang/ko.js (modified) (4 diffs)
-
editor/lang/lt.js (modified) (4 diffs)
-
editor/lang/lv.js (modified) (4 diffs)
-
editor/lang/mn.js (modified) (4 diffs)
-
editor/lang/ms.js (modified) (4 diffs)
-
editor/lang/nb.js (modified) (4 diffs)
-
editor/lang/nl.js (modified) (4 diffs)
-
editor/lang/no.js (modified) (4 diffs)
-
editor/lang/pl.js (modified) (4 diffs)
-
editor/lang/pt-br.js (modified) (4 diffs)
-
editor/lang/pt.js (modified) (4 diffs)
-
editor/lang/ro.js (modified) (4 diffs)
-
editor/lang/ru.js (modified) (4 diffs)
-
editor/lang/sk.js (modified) (4 diffs)
-
editor/lang/sl.js (modified) (4 diffs)
-
editor/lang/sr.js (modified) (4 diffs)
-
editor/lang/sr-latn.js (modified) (4 diffs)
-
editor/lang/sv.js (modified) (7 diffs)
-
editor/lang/th.js (modified) (4 diffs)
-
editor/lang/_translationstatus.txt (modified) (1 diff)
-
editor/lang/tr.js (modified) (4 diffs)
-
editor/lang/uk.js (modified) (4 diffs)
-
editor/lang/vi.js (modified) (4 diffs)
-
editor/lang/zh-cn.js (modified) (4 diffs)
-
editor/lang/zh.js (modified) (4 diffs)
-
editor/skins/default/fck_strip.gif (modified) (previous)
-
editor/skins/office2003/fck_strip.gif (modified) (previous)
-
editor/skins/silver/fck_strip.gif (modified) (previous)
-
editor/_source/classes/fckcontextmenu.js (modified) (4 diffs)
-
editor/_source/classes/fckdocumentfragment_gecko.js (modified) (1 diff)
-
editor/_source/classes/fckdomrangeiterator.js (modified) (1 diff)
-
editor/_source/classes/fckdomrange.js (modified) (2 diffs)
-
editor/_source/classes/fckeditingarea.js (modified) (1 diff)
-
editor/_source/classes/fckenterkey.js (modified) (1 diff)
-
editor/_source/classes/fckstyle.js (modified) (7 diffs)
-
editor/_source/commandclasses/fckfitwindow.js (modified) (2 diffs)
-
editor/_source/commandclasses/fck_othercommands.js (modified) (2 diffs)
-
editor/_source/commandclasses/fckshowblocks.js (modified) (1 diff)
-
editor/_source/fckeditorapi.js (modified) (1 diff)
-
editor/_source/internals/fckcommands.js (modified) (3 diffs)
-
editor/_source/internals/fck_contextmenu.js (modified) (2 diffs)
-
editor/_source/internals/fckdocumentprocessor.js (modified) (2 diffs)
-
editor/_source/internals/fckdomtools.js (modified) (3 diffs)
-
editor/_source/internals/fck_gecko.js (modified) (2 diffs)
-
editor/_source/internals/fck_ie.js (modified) (1 diff)
-
editor/_source/internals/fck.js (modified) (6 diffs)
-
editor/_source/internals/fckselection_gecko.js (modified) (1 diff)
-
editor/_source/internals/fckselection_ie.js (modified) (1 diff)
-
editor/_source/internals/fcktablehandler.js (modified) (5 diffs)
-
editor/_source/internals/fcktoolbaritems.js (modified) (1 diff)
-
editor/_source/internals/fcktools_ie.js (modified) (1 diff)
-
editor/_source/internals/fckxhtml_ie.js (modified) (3 diffs)
-
editor/_source/internals/fckxhtml.js (modified) (1 diff)
-
fckconfig.js (modified) (4 diffs)
-
_samples/html/assets (added)
-
_samples/html/assets/sample06.config.js (added)
-
_samples/html/assets/sample11_frame.html (added)
-
_samples/html/assets/sample14.config.js (added)
-
_samples/html/assets/sample14.styles.css (added)
-
_samples/html/assets/sample15.config.js (added)
-
_samples/html/assets/sample16.config.js (added)
-
_samples/html/assets/sample16.fla (added)
-
_samples/html/assets/sample16.swf (added)
-
_samples/html/assets/swfobject.js (added)
-
_samples/html/sample06.config.js (deleted)
-
_samples/html/sample06.html (modified) (1 diff)
-
_samples/html/sample11_frame.html (deleted)
-
_samples/html/sample11.html (modified) (1 diff)
-
_samples/html/sample14.config.js (deleted)
-
_samples/html/sample14.html (modified) (1 diff)
-
_samples/html/sample14.styles.css (deleted)
-
_samples/html/sample15.html (added)
-
_samples/html/sample16.html (added)
-
_samples/sample.css (modified) (1 diff)
-
_samples/sampleslist.html (modified) (1 diff)
-
_whatsnew_history.html (modified) (1 diff)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/versions/2.6.x/_dev/build_release.bat
r2113 r2288 26 26 27 27 :: Update this variable for each new release. 28 SET RELEASER_VERSION=2.6. 228 SET RELEASER_VERSION=2.6.3 Beta 29 29 30 30 CLS -
FCKeditor/branches/versions/2.6.x/_dev/releaser/fckreleaser.php
r2064 r2288 597 597 $script = $stringsProc->ProtectStrings( $script ) ; 598 598 599 // Remove "/* */" comments 600 $script = preg_replace( 601 '/(?<!\/)\/\*.*?\*\//s', 602 '', $script ) ; 603 599 604 // Remove "//" comments 600 605 $script = preg_replace( 601 '/\/\/.*$/m', 602 '', $script ) ; 603 604 // Remove "/* */" comments 605 $script = preg_replace( 606 '/(?m-s:^\s*\/\*).*?\*\//s', 607 '', $script ) ; 606 '/\/\/.*$/m', 607 '', $script ) ; 608 608 609 609 // Remove spaces before the ";" at the end of the lines … … 966 966 } 967 967 968 // Fix invalid line breaks (must be all CRLF). 969 $data = preg_replace( 970 '/(?:(?<!\r)\n)|(?:\r(?!\n))/im', 971 "\r\n", $data ) ; 972 968 973 return $data ; 969 974 } … … 985 990 function ProtectStrings( $source ) 986 991 { 992 // Catches string literals, regular expressions and conditional comments. 987 993 return preg_replace_callback( 988 '/(?:("|\').*?(?<!\\\\)\1 |(?<![\/\\\\])\/[^\/\*].*?(?<!\\\\)\/)/',994 '/(?:("|\').*?(?<!\\\\)\1)|(?:(?<![\*\/\\\\])\/[^\/\*].*?(?<!\\\\)\/(?=([\.\w])|(\s*[,;}\)])))|(?s:\/\*@(?:cc_on|if|elif|else|end).*?@\*\/)/', 989 995 array( &$this, '_ProtectStringsMatch' ), $source ) ; 990 996 } -
FCKeditor/branches/versions/2.6.x/editor/css/fck_editorarea.css
r1565 r2288 27 27 */ 28 28 29 /* 30 The "body" styles should match your editor web site, mainly regarding31 background color and font family and size.32 */29 /** 30 * The "body" styles should match your editor web site, mainly regarding 31 * background color and font family and size. 32 */ 33 33 34 34 body … … 51 51 } 52 52 53 /* 54 Just uncomment the following block if you want to avoid spaces between55 paragraphs. Remember to apply the same style in your output front end page.56 */53 /** 54 * Just uncomment the following block if you want to avoid spaces between 55 * paragraphs. Remember to apply the same style in your output front end page. 56 */ 57 57 58 58 /* … … 64 64 */ 65 65 66 /** 67 * Uncomment the following block, or only selected lines if appropriate, 68 * if you have some style items that would break the styles combo box. 69 * You can also write other CSS overrides inside the style block below 70 * as needed and they will be applied to inside the style combo only. 71 */ 72 66 73 /* 67 The following are some sample styles used in the "Styles" toolbar command. 68 You should instead remove them, and include the styles used by the site 69 you are using the editor in. 74 .SC_Item *, .SC_ItemSelected * 75 { 76 margin: 0px !important; 77 padding: 0px !important; 78 text-indent: 0px !important; 79 clip: auto !important; 80 position: static !important; 81 } 70 82 */ 83 84 /** 85 * The following are some sample styles used in the "Styles" toolbar command. 86 * You should instead remove them, and include the styles used by the site 87 * you are using the editor in. 88 */ 71 89 72 90 .Bold -
FCKeditor/branches/versions/2.6.x/editor/dialog/fck_anchor.html
r1565 r2288 122 122 { 123 123 // Nothing was selected, so now just create a normal A 124 aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ; 124 if ( FCKBrowserInfo.IsIE ) 125 aNewAnchors.push( oEditor.FCK.InsertElement( '<a name="' + FCKTools.HTMLEncode( sNewName ).replace( '"', '"' ) + '">' ) ) ; 126 else 127 { 128 var n = oEditor.FCK.InsertElement( 'a' ) ; 129 n.name = sNewName ; 130 aNewAnchors.push( n ) ; 131 } 125 132 } 126 133 else … … 135 142 { 136 143 oAnchor = aNewAnchors[i] ; 137 138 // Set the name139 oAnchor.name = sNewName ;140 144 141 145 // IE does require special processing to show the Anchor's image -
FCKeditor/branches/versions/2.6.x/editor/dialog/fck_link/fck_link.js
r2064 r2288 78 78 var oParser = new Object() ; 79 79 80 oParser.ParseEMailUrl = function( emailUrl ) 80 // This method simply returns the two inputs in numerical order. You can even 81 // provide strings, as the method would parseInt() the values. 82 oParser.SortNumerical = function(a, b) 83 { 84 return parseInt( a, 10 ) - parseInt( b, 10 ) ; 85 } 86 87 oParser.ParseEMailParams = function(sParams) 88 { 89 // Initialize the oEMailParams object. 90 var oEMailParams = new Object() ; 91 oEMailParams.Subject = '' ; 92 oEMailParams.Body = '' ; 93 94 var aMatch = sParams.match( /(^|^\?|&)subject=([^&]+)/i ) ; 95 if ( aMatch ) oEMailParams.Subject = decodeURIComponent( aMatch[2] ) ; 96 97 aMatch = sParams.match( /(^|^\?|&)body=([^&]+)/i ) ; 98 if ( aMatch ) oEMailParams.Body = decodeURIComponent( aMatch[2] ) ; 99 100 return oEMailParams ; 101 } 102 103 // This method returns either an object containing the email info, or FALSE 104 // if the parameter is not an email link. 105 oParser.ParseEMailUri = function( sUrl ) 81 106 { 82 107 // Initializes the EMailInfo object. 83 108 var oEMailInfo = new Object() ; 84 oEMailInfo.Address = '' ; 85 oEMailInfo.Subject = '' ; 86 oEMailInfo.Body = '' ; 87 88 var oParts = emailUrl.match( /^([^\?]+)\??(.+)?/ ) ; 89 if ( oParts ) 90 { 91 // Set the e-mail address. 92 oEMailInfo.Address = oParts[1] ; 93 94 // Look for the optional e-mail parameters. 95 if ( oParts[2] ) 96 { 97 var oMatch = oParts[2].match( /(^|&)subject=([^&]+)/i ) ; 98 if ( oMatch ) oEMailInfo.Subject = decodeURIComponent( oMatch[2] ) ; 99 100 oMatch = oParts[2].match( /(^|&)body=([^&]+)/i ) ; 101 if ( oMatch ) oEMailInfo.Body = decodeURIComponent( oMatch[2] ) ; 102 } 103 } 104 105 return oEMailInfo ; 109 oEMailInfo.Address = '' ; 110 oEMailInfo.Subject = '' ; 111 oEMailInfo.Body = '' ; 112 113 var aLinkInfo = sUrl.match( /^(\w+):(.*)$/ ) ; 114 if ( aLinkInfo && aLinkInfo[1] == 'mailto' ) 115 { 116 // This seems to be an unprotected email link. 117 var aParts = aLinkInfo[2].match( /^([^\?]+)\??(.+)?/ ) ; 118 if ( aParts ) 119 { 120 // Set the e-mail address. 121 oEMailInfo.Address = aParts[1] ; 122 123 // Look for the optional e-mail parameters. 124 if ( aParts[2] ) 125 { 126 var oEMailParams = oParser.ParseEMailParams( aParts[2] ) ; 127 oEMailInfo.Subject = oEMailParams.Subject ; 128 oEMailInfo.Body = oEMailParams.Body ; 129 } 130 } 131 return oEMailInfo ; 132 } 133 else if ( aLinkInfo && aLinkInfo[1] == 'javascript' ) 134 { 135 // This may be a protected email. 136 137 // Try to match the url against the EMailProtectionFunction. 138 var func = FCKConfig.EMailProtectionFunction ; 139 if ( func != null ) 140 { 141 try 142 { 143 // Escape special chars. 144 func = func.replace( /([\/^$*+.?()\[\]])/g, '\\$1' ) ; 145 146 // Define the possible keys. 147 var keys = new Array('NAME', 'DOMAIN', 'SUBJECT', 'BODY') ; 148 149 // Get the order of the keys (hold them in the array <pos>) and 150 // the function replaced by regular expression patterns. 151 var sFunc = func ; 152 var pos = new Array() ; 153 for ( var i = 0 ; i < keys.length ; i ++ ) 154 { 155 var rexp = new RegExp( keys[i] ) ; 156 var p = func.search( rexp ) ; 157 if ( p >= 0 ) 158 { 159 sFunc = sFunc.replace( rexp, '\'([^\']*)\'' ) ; 160 pos[pos.length] = p + ':' + keys[i] ; 161 } 162 } 163 164 // Sort the available keys. 165 pos.sort( oParser.SortNumerical ) ; 166 167 // Replace the excaped single quotes in the url, such they do 168 // not affect the regexp afterwards. 169 aLinkInfo[2] = aLinkInfo[2].replace( /\\'/g, '###SINGLE_QUOTE###' ) ; 170 171 // Create the regexp and execute it. 172 var rFunc = new RegExp( '^' + sFunc + '$' ) ; 173 var aMatch = rFunc.exec( aLinkInfo[2] ) ; 174 if ( aMatch ) 175 { 176 var aInfo = new Array(); 177 for ( var i = 1 ; i < aMatch.length ; i ++ ) 178 { 179 var k = pos[i-1].match(/^\d+:(.+)$/) ; 180 aInfo[k[1]] = aMatch[i].replace(/###SINGLE_QUOTE###/g, '\'') ; 181 } 182 183 // Fill the EMailInfo object that will be returned 184 oEMailInfo.Address = aInfo['NAME'] + '@' + aInfo['DOMAIN'] ; 185 oEMailInfo.Subject = decodeURIComponent( aInfo['SUBJECT'] ) ; 186 oEMailInfo.Body = decodeURIComponent( aInfo['BODY'] ) ; 187 188 return oEMailInfo ; 189 } 190 } 191 catch (e) 192 { 193 } 194 } 195 196 // Try to match the email against the encode protection. 197 var aMatch = aLinkInfo[2].match( /^location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'$/ ) ; 198 if ( aMatch ) 199 { 200 // The link is encoded 201 oEMailInfo.Address = eval( aMatch[1] ) ; 202 if ( aMatch[2] ) 203 { 204 var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ; 205 oEMailInfo.Subject = oEMailParams.Subject ; 206 oEMailInfo.Body = oEMailParams.Body ; 207 } 208 return oEMailInfo ; 209 } 210 } 211 return false; 106 212 } 107 213 108 214 oParser.CreateEMailUri = function( address, subject, body ) 109 215 { 216 // Switch for the EMailProtection setting. 217 switch ( FCKConfig.EMailProtection ) 218 { 219 case 'function' : 220 var func = FCKConfig.EMailProtectionFunction ; 221 if ( func == null ) 222 { 223 if ( FCKConfig.Debug ) 224 { 225 alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ; 226 } 227 return ''; 228 } 229 230 // Split the email address into name and domain parts. 231 var aAddressParts = address.split( '@', 2 ) ; 232 if ( aAddressParts[1] == undefined ) 233 { 234 aAddressParts[1] = '' ; 235 } 236 237 // Replace the keys by their values (embedded in single quotes). 238 func = func.replace(/NAME/g, "'" + aAddressParts[0].replace(/'/g, '\\\'') + "'") ; 239 func = func.replace(/DOMAIN/g, "'" + aAddressParts[1].replace(/'/g, '\\\'') + "'") ; 240 func = func.replace(/SUBJECT/g, "'" + encodeURIComponent( subject ).replace(/'/g, '\\\'') + "'") ; 241 func = func.replace(/BODY/g, "'" + encodeURIComponent( body ).replace(/'/g, '\\\'') + "'") ; 242 243 return 'javascript:' + func ; 244 245 case 'encode' : 246 var aParams = [] ; 247 var aAddressCode = [] ; 248 249 if ( subject.length > 0 ) 250 aParams.push( 'subject='+ encodeURIComponent( subject ) ) ; 251 if ( body.length > 0 ) 252 aParams.push( 'body=' + encodeURIComponent( body ) ) ; 253 for ( var i = 0 ; i < address.length ; i++ ) 254 aAddressCode.push( address.charCodeAt( i ) ) ; 255 256 return 'javascript:location.href=\'mailto:\'+String.fromCharCode(' + aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\'' ; 257 } 258 259 // EMailProtection 'none' 260 110 261 var sBaseUri = 'mailto:' + address ; 111 262 … … 264 415 var sProtocol = oRegex.UriProtocol.exec( sHRef ) ; 265 416 266 if ( sProtocol ) 417 // Search for a protected email link. 418 var oEMailInfo = oParser.ParseEMailUri( sHRef ); 419 420 if ( oEMailInfo ) 421 { 422 sType = 'email' ; 423 424 GetE('txtEMailAddress').value = oEMailInfo.Address ; 425 GetE('txtEMailSubject').value = oEMailInfo.Subject ; 426 GetE('txtEMailBody').value = oEMailInfo.Body ; 427 } 428 else if ( sProtocol ) 267 429 { 268 430 sProtocol = sProtocol[0].toLowerCase() ; … … 271 433 // Remove the protocol and get the remaining URL. 272 434 var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ; 273 274 if ( sProtocol == 'mailto:' ) // It is an e-mail link. 275 { 276 sType = 'email' ; 277 278 var oEMailInfo = oParser.ParseEMailUrl( sUrl ) ; 279 GetE('txtEMailAddress').value = oEMailInfo.Address ; 280 GetE('txtEMailSubject').value = oEMailInfo.Subject ; 281 GetE('txtEMailBody').value = oEMailInfo.Body ; 282 } 283 else // It is a normal link. 284 { 285 sType = 'url' ; 286 GetE('txtUrl').value = sUrl ; 287 } 435 sType = 'url' ; 436 GetE('txtUrl').value = sUrl ; 288 437 } <