Changeset 2064

Show
Ignore:
Timestamp:
2008-06-12 17:59:24 (7 months ago)
Author:
fredck
Message:

Merged trunk into branches/versions/2.6.x. Final commit for the release of version 2.6.1.

Location:
FCKeditor/branches/versions/2.6.x
Files:
2 added
2 removed
86 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/versions/2.6.x/_dev/build_release.bat

    r1899 r2064  
    1 @ECHO OFF 
     1@ECHO OFF 
    22 
    33:: 
     
    2626 
    2727:: Update this variable for each new release. 
    28 SET RELEASER_VERSION=2.6 
     28SET RELEASER_VERSION=2.6.1 
    2929 
    3030CLS 
  • FCKeditor/branches/versions/2.6.x/_dev/domain_fix_template.js

    r1825 r2064  
    2626// ### Minified Script (must be updated on changes in the original below). 
    2727 
    28 (function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
     28(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); 
    2929 
    3030// ### Original Script. 
     
    3939                try 
    4040                { 
    41                         var test = window.top.opener.document.domain ; 
     41                        var test = window.parent.document.domain ; 
    4242                        break ; 
    4343                } 
  • FCKeditor/branches/versions/2.6.x/_dev/releaser/fckreleaser.php

    r1565 r2064  
    1 #!/usr/bin/php -q 
     1#!/usr/bin/php -q 
    22<?php 
    33/* 
     
    128128class FCKReleaser 
    129129{ 
    130         var $_PreProcessExtensions = array( 'js','html','asp','aspx','cfc','cfm','jsp','css','xml','txt','java','php','cgi','pl','lasso','py' ) ; 
     130        var $_PreProcessExtensions = array( 'js','html','asp','aspx','ascx','cfc','cfm','jsp','css','xml','txt','java','php','cgi','pl','lasso','py','config' ) ; 
    131131 
    132132        var $SourcesDir ; 
     
    627627                        ' ', $script ) ; 
    628628 
    629                 // Concatenate lines that end with "}" using a ";" (except for "else" and "catch" cases). 
     629                // Concatenate lines that end with "}" using a ";", except for "else", 
     630                // "while", "catch" and "finally" cases, or when followed by, "'", ";", 
     631                // "}" or ")". 
    630632                $script = preg_replace( 
    631                         '/\s*}\s*[\n\r]+\s*(?!\s*(else|catch|}))/s', 
     633                        '/\s*}\s*[\n\r]+\s*(?!\s*(else|catch|finally|while|[}\),;]))/s', 
    632634                        '};', $script ) ; 
    633635 
     
    964966                } 
    965967 
    966                 // Fix invalid line breaks (must be all CRLF). 
    967                 $data = preg_replace( 
    968                         '/(?:(?<!\r)\n)|(?:\r(?!\n))/im', 
    969                         "\r\n", $data ) ; 
    970  
    971968                return $data ; 
    972969        } 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/common/fck_dialog_common.js

    r1825 r2064  
    6060        return ( prefix || '' ) + 'common/fck_dialog_common.css' ;      // @Packager.RemoveLine 
    6161        /* @Packager.RemoveLine 
    62         // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor 
     62        // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). 
    6363        return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ; 
    6464        @Packager.RemoveLine */ 
     
    191191        sOptions += ",top=" + iTop ; 
    192192 
    193         // The "PreserveSessionOnFileBrowser" because the above code could be 
    194         // blocked by popup blockers. 
    195         if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE ) 
    196         { 
    197                 // The following change has been made otherwise IE will open the file 
    198                 // browser on a different server session (on some cases): 
    199                 // http://support.microsoft.com/default.aspx?scid=kb;en-us;831678 
    200                 // by Simone Chiaretta. 
    201                 var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ; 
    202  
    203                 if ( oWindow ) 
    204                 { 
    205                         // Detect Yahoo popup blocker. 
    206                         try 
    207                         { 
    208                                 var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user. 
    209                                 oWindow.opener = window ; 
    210                         } 
    211                         catch(e) 
    212                         { 
    213                                 alert( oEditor.FCKLang.BrowseServerBlocked ) ; 
    214                         } 
    215                 } 
    216                 else 
    217                         alert( oEditor.FCKLang.BrowseServerBlocked ) ; 
    218     } 
    219     else 
    220                 window.open( url, 'FCKBrowseWindow', sOptions ) ; 
     193        window.open( url, 'FCKBrowseWindow', sOptions ) ; 
    221194} 
    222195 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_flash/fck_flash.js

    r1825 r2064  
    237237function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) 
    238238{ 
     239        // Remove animation 
     240        window.parent.Throbber.Hide() ; 
     241        GetE( 'divUpload' ).style.display  = '' ; 
     242 
    239243        switch ( errorNumber ) 
    240244        { 
     
    289293        } 
    290294 
     295        // Show animation 
     296        window.parent.Throbber.Show( 100 ) ; 
     297        GetE( 'divUpload' ).style.display  = 'none' ; 
     298 
    291299        return true ; 
    292300} 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_flash.html

    r1825 r2064  
    9898                                <input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> 
    9999                                <script type="text/javascript"> 
    100                                         document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; 
     100                                        document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; 
    101101                                </script> 
    102102                        </form> 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_image/fck_image.js

    r1825 r2064  
    448448function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) 
    449449{ 
     450        // Remove animation 
     451        window.parent.Throbber.Hide() ; 
     452        GetE( 'divUpload' ).style.display  = '' ; 
     453 
    450454        switch ( errorNumber ) 
    451455        { 
     
    501505        } 
    502506 
     507        // Show animation 
     508        window.parent.Throbber.Show( 100 ) ; 
     509        GetE( 'divUpload' ).style.display  = 'none' ; 
     510 
    503511        return true ; 
    504512} 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_image/fck_image_preview.html

    r1825 r2064  
    3535var FCKConfig   = window.parent.FCKConfig ; 
    3636 
    37 // Sets the Skin CSS 
    38 document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; 
    39 document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; 
     37// Set the preview CSS 
     38document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) ) ; 
     39document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ) ; 
    4040 
    4141if ( window.parent.FCKConfig.BaseHref.length > 0 ) 
     
    5151        </script> 
    5252</head> 
    53 <body style="color: #000000; background-color: #ffffff"> 
     53<body> 
    5454        <div> 
    5555                <a id="lnkPreview" onclick="return false;" style="cursor: default"> 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_image.html

    r1825 r2064  
    166166                        <input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" /> 
    167167                        <script type="text/javascript"> 
    168                                 document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; 
     168                                document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; 
    169169                        </script> 
    170170                </form> 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_link/fck_link.js

    r1825 r2064  
    651651function SetUrl( url ) 
    652652{ 
    653         document.getElementById('txtUrl').value = url ; 
     653        GetE('txtUrl').value = url ; 
    654654        OnUrlChange() ; 
    655655        dialog.SetSelectedTab( 'Info' ) ; 
     
    658658function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) 
    659659{ 
     660        // Remove animation 
     661        window.parent.Throbber.Hide() ; 
     662        GetE( 'divUpload' ).style.display  = '' ; 
     663 
    660664        switch ( errorNumber ) 
    661665        { 
     
    710714        } 
    711715 
     716        // Show animation 
     717        window.parent.Throbber.Show( 100 ) ; 
     718        GetE( 'divUpload' ).style.display  = 'none' ; 
     719 
    712720        return true ; 
    713721} 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_link.html

    r1565 r2064  
    109109                                <br /> 
    110110                                <input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> 
    111                                 <iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe> 
     111                                <script type="text/javascript"> 
     112                                        document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; 
     113                                </script> 
    112114                        </form> 
    113115                </div> 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_listprop.html

    r1565 r2064  
    6868        dialog.SetAutoSize( true ) ; 
    6969 
    70         SelectField( 'txtStartPosition' ) ; 
     70        SelectField( sListType == 'OL' ? 'txtStartPosition' : 'selBulleted' ) ; 
    7171} 
    7272 
  • FCKeditor/branches/versions/2.6.x/editor/dialog/fck_replace.html

    r1825 r2064  
    3535 
    3636var FCKLang = oEditor.FCKLang ; 
     37var FCKDomTools = oEditor.FCKDomTools ; 
     38var FCKDomRange = oEditor.FCKDomRange ; 
     39var FCKListsLib = oEditor.FCKListsLib ; 
     40var FCKTools = oEditor.FCKTools ; 
     41var EditorDocument = oEditor.FCK.EditorDocument ; 
     42var HighlightStyle = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' )  ; 
    3743 
    3844dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ; 
     
    5258} 
    5359 
    54 // Place a range at the start of document. 
    55 // This will be the starting point of our search. 
    56 var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 
    57  
    58 function ResetGlobalRange() 
    59 { 
    60         GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ; 
    61         GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ; 
    62         GlobalRange.Collapse( true ) ; 
    63 } 
    64 ResetGlobalRange() ; 
    65  
    66 var HighlightRange = null ; 
    67 function Highlight() 
    68 { 
    69         if ( HighlightRange ) 
    70                 ClearHighlight() ; 
    71         var cloneRange = GlobalRange.Clone() ; 
    72         oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ; 
    73         HighlightRange = cloneRange ; 
    74         GlobalRange = HighlightRange.Clone() ; 
    75 } 
    76  
    77 function ClearHighlight() 
    78 { 
    79         if ( HighlightRange ) 
    80         { 
    81                 oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ; 
    82                 HighlightRange = null ; 
    83         } 
    84 } 
    85  
    86 function OnLoad() 
    87 { 
    88         // First of all, translate the dialog box texts. 
    89         oEditor.FCKLanguageManager.TranslatePage( document ) ; 
    90  
    91         // Show the appropriate tab at startup. 
    92         if ( dialogArguments.CustomValue == 'Find' ) 
    93         { 
    94                 dialog.SetSelectedTab( 'Find' ) ; 
    95                 dialog.SetAutoSize( true ) ; 
     60GetNextNonEmptyTextNode = function( node, stopNode ) 
     61{ 
     62        while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 ) 
     63                1 ; 
     64        return node ; 
     65} 
     66 
     67CharacterCursor = function( arg ) 
     68{ 
     69        if ( arg.nodeType && arg.nodeType == 9 ) 
     70        { 
     71                this._textNode = GetNextNonEmptyTextNode( arg.body, arg.documentElement ) ; 
     72                this._offset = 0 ; 
     73                this._doc = arg ; 
    9674        } 
    9775        else 
    98                 dialog.SetSelectedTab( 'Replace' ) ; 
    99  
    100         SelectField( 'txtFind' + dialogArguments.CustomValue ) ; 
    101 } 
    102  
    103 function btnStat() 
    104 { 
    105         GetE('btnReplace').disabled = 
    106                 GetE('btnReplaceAll').disabled = 
    107                         GetE('btnFind').disabled = 
    108                                 ( GetE(idMap["FindText"]).value.length == 0 ) ; 
    109 } 
    110  
    111 function btnStatDelayed() 
    112 { 
    113         setTimeout( btnStat, 1 ) ; 
    114 } 
    115  
    116 function GetSearchString() 
    117 { 
    118         return GetE(idMap['FindText']).value ; 
    119 } 
    120  
    121 function GetReplaceString() 
    122 { 
    123         return GetE("txtReplace").value ; 
    124 } 
    125  
    126 function GetCheckCase() 
    127 { 
    128         return !! ( GetE(idMap['CheckCase']).checked ) ; 
    129 } 
    130  
    131 function GetMatchWord() 
    132 { 
    133         return !! ( GetE(idMap['CheckWord']).checked ) ; 
    134 } 
    135  
    136 // Get the data pointed to by a bookmark. 
    137 function GetData( bookmark ) 
    138 { 
    139         var cursor = oEditor.FCK.EditorDocument.documentElement ; 
    140         for ( var i = 0 ; i < bookmark.length ; i++ ) 
    141         { 
    142                 var target = bookmark[i] ; 
    143                 var currentIndex = -1 ; 
    144                 if ( cursor.nodeType != 3 ) 
    145                 { 
    146                         for (var j = 0 ; j < cursor.childNodes.length ; j++ ) 
    147                         { 
    148                                 var candidate = cursor.childNodes[j] ; 
    149                                 if ( candidate.nodeType == 3 && 
    150                                                 candidate.previousSibling && 
    151                                                 candidate.previousSibling.nodeType == 3 ) 
    152                                         continue ; 
    153                                 currentIndex++ ; 
    154                                 if ( currentIndex == target ) 
    155                                 { 
    156                                         cursor = candidate ; 
    157                                         break ; 
    158                                 } 
    159                         } 
    160                         if ( currentIndex < target ) 
    161                                 return null ; 
    162                 } 
    163                 else 
    164                 { 
    165                         if ( i != bookmark.length - 1 ) 
    166                                 return null ; 
    167                         while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 ) 
    168                         { 
    169                                 target -= cursor.length ; 
    170                                 cursor = cursor.nextSibling ; 
    171                         } 
    172                         cursor = cursor.nodeValue.charAt( target ) ; 
    173                         if ( cursor == "" ) 
    174                                 cursor = null ; 
    175                 } 
    176         } 
    177         return cursor ; 
    178 } 
    179  
    180 // With this function, we can treat the bookmark as an iterator for DFS. 
    181 function NextPosition( bookmark ) 
    182 { 
    183         // See if there's anything further down the tree. 
    184         var next = bookmark.concat( [0] ) ; 
    185         if ( GetData( next ) != null ) 
    186                 return next ; 
    187  
    188         // Nothing down there? See if there's anything next to me. 
    189         var next = bookmark.slice( 0, bookmark.length - 1 ).concat( [ bookmark[ bookmark.length - 1 ] + 1 ] ) ; 
    190         if ( GetData( next ) != null ) 
    191                 return next ; 
    192  
    193         // Nothing even next to me? See if there's anything next to my ancestors. 
    194         for ( var i = bookmark.length - 1 ; i > 0 ; i-- ) 
    195         { 
    196     &nbs