Changeset 1598

Show
Ignore:
Timestamp:
2008-02-24 13:38:08 (5 months ago)
Author:
fredck
Message:

Fixed #1622 : Introduced the inline CSS cache system.

Location:
FCKeditor/trunk
Files:
25 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/css/fck_internal.css

    r1565 r1598  
    2020 * 
    2121 * This CSS Style Sheet defines rules used by the editor for its internal use. 
     22 */ 
     23 
     24/* ######### 
     25 *  WARNING 
     26 * ######### 
     27 * When changing this file, the minified version of it must be updated in the 
     28 * fckeditor.html file (see FCK_InternalCSS). 
    2229 */ 
    2330 
  • FCKeditor/trunk/editor/css/fck_showtableborders_gecko.css

    r1565 r1598  
    2222 */ 
    2323 
     24/* ######### 
     25 *  WARNING 
     26 * ######### 
     27 * When changing this file, the minified version of it must be updated in the 
     28 * fckeditor.html file (see FCK_ShowTableBordersCSS). 
     29 */ 
     30 
    2431/* For tables with the "border" attribute set to "0" */ 
    2532table[border="0"], 
  • FCKeditor/trunk/editor/dialog/common/fck_dialog_common.css

    r1565 r1598  
    2121 * This is the CSS file used for interface details in some dialog 
    2222 * windows. 
     23 */ 
     24 
     25/* ######### 
     26 *  WARNING 
     27 * ######### 
     28 * When changing this file, the minified version of it must be updated in the 
     29 * fck_dialog_common.js file (see GetCommonDialogCss). 
    2330 */ 
    2431 
  • FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js

    r1565 r1598  
    5454        } 
    5555})() ; 
     56 
     57// Attention: FCKConfig must be available in the page. 
     58function GetCommonDialogCss( prefix ) 
     59{ 
     60        return ( prefix || '' ) + 'common/fck_dialog_common.css' ;      // @Packager.RemoveLine 
     61        /* @Packager.RemoveLine 
     62        // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor 
     63        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:hand}' ; 
     64        @Packager.RemoveLine */ 
     65} 
    5666 
    5767// Gets a element by its Id. Used for shorter coding. 
  • FCKeditor/trunk/editor/dialog/fck_flash/fck_flash.js

    r1565 r1598  
    2727var FCKLang             = oEditor.FCKLang ; 
    2828var FCKConfig   = oEditor.FCKConfig ; 
     29var FCKTools    = oEditor.FCKTools ; 
    2930 
    3031//#### Dialog Tabs 
  • FCKeditor/trunk/editor/dialog/fck_flash/fck_flash_preview.html

    r1565 r1598  
    2727                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    2828                <meta name="robots" content="noindex, nofollow"> 
    29                 <link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> 
    3029                <script src="../common/fck_dialog_common.js" type="text/javascript"></script> 
    3130                <script language="javascript"> 
    3231 
     32var FCKTools    = window.parent.FCKTools ; 
     33var FCKConfig   = window.parent.FCKConfig ; 
     34 
    3335// Sets the Skin CSS 
    34 document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 
     36document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; 
     37document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; 
    3538 
    3639if ( window.parent.FCKConfig.BaseHref.length > 0 ) 
  • FCKeditor/trunk/editor/dialog/fck_flash.html

    r1565 r1598  
    2929                <script src="common/fck_dialog_common.js" type="text/javascript"></script> 
    3030                <script src="fck_flash/fck_flash.js" type="text/javascript"></script> 
    31                 <link href="common/fck_dialog_common.css" type="text/css" rel="stylesheet"> 
     31                <script type="text/javascript"> 
     32 
     33document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; 
     34 
     35                </script> 
    3236        </head> 
    3337        <body scroll="no" style="OVERFLOW: hidden"> 
  • FCKeditor/trunk/editor/dialog/fck_image/fck_image.js

    r1576 r1598  
    2828var FCKConfig   = oEditor.FCKConfig ; 
    2929var FCKDebug    = oEditor.FCKDebug ; 
     30var FCKTools    = oEditor.FCKTools ; 
    3031 
    3132var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; 
  • FCKeditor/trunk/editor/dialog/fck_image/fck_image_preview.html

    r1565 r1598  
    2929        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    3030        <meta name="robots" content="noindex, nofollow" /> 
    31         <link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> 
    3231        <script src="../common/fck_dialog_common.js" type="text/javascript"></script> 
    3332        <script type="text/javascript"> 
    3433 
     34var FCKTools    = window.parent.FCKTools ; 
     35var FCKConfig   = window.parent.FCKConfig ; 
     36 
    3537// Sets the Skin CSS 
    36 document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 
     38document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; 
     39document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; 
    3740 
    3841if ( window.parent.FCKConfig.BaseHref.length > 0 ) 
  • FCKeditor/trunk/editor/dialog/fck_image.html

    r1565 r1598  
    2929        <script src="common/fck_dialog_common.js" type="text/javascript"></script> 
    3030        <script src="fck_image/fck_image.js" type="text/javascript"></script> 
    31         <link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> 
     31                <script type="text/javascript"> 
     32 
     33document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; 
     34 
     35                </script> 
    3236</head> 
    3337<body scroll="no" style="overflow: hidden"> 
  • FCKeditor/trunk/editor/dialog/fck_source.html

    r1565 r1598  
    2727                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    2828                <meta name="robots" content="noindex, nofollow"> 
    29                 <link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> 
     29                <script src="common/fck_dialog_common.js" type="text/javascript"></script> 
    3030                <script language="javascript"> 
    3131 
     
    3333var FCK                 = oEditor.FCK ; 
    3434var FCKConfig   = oEditor.FCKConfig ; 
     35var FCKTools    = oEditor.FCKTools ; 
     36 
     37document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; 
    3538 
    3639window.onload = function() 
  • FCKeditor/trunk/editor/fckdialog.html

    r1586 r1598  
    8383 
    8484// Sets the Skin CSS 
    85 document.write( '<link href="' + FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 
     85document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; 
    8686 
    8787// Sets the language direction. 
     
    644644 
    645645                // Sets the Skin CSS. 
    646                 innerDoc.write( '<link href="' + FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 
     646                innerDoc.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; 
    647647 
    648648                setOnKeyDown( innerDoc ) ; 
  • FCKeditor/trunk/editor/fckeditor.html

    r1596 r1598  
    8080{ 
    8181        document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; 
    82 } 
    83  
    84 function LoadCss( url ) 
    85 { 
    86         document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" />' ) ; 
    8782} 
    8883 
     
    243238FCKConfig_PreProcess() ; 
    244239 
     240var FCK_InternalCSS                     = FCKConfig.FullBasePath + 'css/fck_internal.css' ;                                     // @Packager.RemoveLine 
     241var FCK_ShowTableBordersCSS     = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ;       // @Packager.RemoveLine 
     242/* @Packager.RemoveLine 
     243// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor 
     244var FCK_InternalCSS                     = FCKTools.FixCssUrls( FCKConfig.FullBasePath + '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__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)}' ) ; 
     245var FCK_ShowTableBordersCSS     = FCKTools.FixCssUrls( FCKConfig.FullBasePath + '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}' ) ; 
     246@Packager.RemoveLine */ 
     247 
    245248// Popup the debug window if debug mode is set to true. It guarantees that the 
    246249// first debug message will not be lost. 
     
    249252 
    250253// Load the active skin CSS. 
    251 LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     254document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ; 
    252255 
    253256// Load the language file. 
  • FCKeditor/trunk/editor/_source/classes/fckcontextmenu.js

    r1565 r1598  
    2727 
    2828        var oPanel = this._Panel = new FCKPanel( parentWindow ) ; 
    29         oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     29        oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; 
    3030        oPanel.IsContextMenu = true ; 
    3131 
  • FCKeditor/trunk/editor/_source/classes/fckmenublockpanel.js

    r1565 r1598  
    3737{ 
    3838        var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ; 
    39         oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     39        oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; 
    4040 
    4141        // Call the "base" implementation. 
  • FCKeditor/trunk/editor/_source/classes/fckspecialcombo.js

    r1565 r1598  
    3838 
    3939        this._Panel = new FCKPanel( parentWindow || window ) ; 
    40         this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     40        this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; 
    4141        this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; 
    4242        this._PanelBox.className = 'SC_Panel' ; 
  • FCKeditor/trunk/editor/_source/commandclasses/fcktextcolorcommand.js

    r1565 r1598  
    4040 
    4141        this._Panel = new FCKPanel( oWindow ) ; 
    42         this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     42        this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; 
    4343        this._Panel.MainNode.className = 'FCK_Panel' ; 
    4444        this._CreatePanelBody( this._Panel.Document, this._Panel.MainNode ) ; 
  • FCKeditor/trunk/editor/_source/internals/fckconfig.js

    r1565 r1598  
    132132                oConfig.PluginsPath += '/' ; 
    133133 
    134         // EditorAreaCSS accepts a single path string, a list of paths separated by 
    135         // a comma or and array of paths. 
    136         // In the string cases, transform it in an array. 
    137         if ( typeof( oConfig.EditorAreaCSS ) == 'string' ) 
    138                 oConfig.EditorAreaCSS = oConfig.EditorAreaCSS.split(',') ; 
    139  
     134        // If no ToolbarComboPreviewCSS, point it to EditorAreaCSS. 
    140135        var sComboPreviewCSS = oConfig.ToolbarComboPreviewCSS ; 
    141136        if ( !sComboPreviewCSS || sComboPreviewCSS.length == 0 ) 
    142137                oConfig.ToolbarComboPreviewCSS = oConfig.EditorAreaCSS ; 
    143         else if ( typeof( sComboPreviewCSS ) == 'string' ) 
    144                 oConfig.ToolbarComboPreviewCSS = [ sComboPreviewCSS ] ; 
    145138} 
    146139 
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r1565 r1598  
    440440                                sHeadExtra += FCK._GetBehaviorsStyle() ; 
    441441                        else if ( FCKConfig.ShowBorders ) 
    442                                 sHeadExtra += '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
    443  
    444                         sHeadExtra += '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
     442                                sHeadExtra += FCKTools.GetStyleHtml( FCK_ShowTableBordersCSS, true ) ; 
     443 
     444                        sHeadExtra += FCKTools.GetStyleHtml( FCK_InternalCSS, true ) ; 
    445445 
    446446                        // Attention: do not change it before testing it well (sample07)! 
     
    971971function _FCK_GetEditorAreaStyleTags() 
    972972{ 
    973         var sTags = '' ; 
    974         var aCSSs = FCKConfig.EditorAreaCSS ; 
    975         var sStyles = FCKConfig.EditorAreaStyles ; 
    976  
    977         for ( var i = 0 ; i < aCSSs.length ; i++ ) 
    978                 sTags += '<link href="' + aCSSs[i] + '" rel="stylesheet" type="text/css" />' ; 
    979  
    980         if ( sStyles && sStyles.length > 0 ) 
    981                 sTags += "<style>" + sStyles + "</style>" ; 
    982  
    983         return sTags ; 
     973        return FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) +  
     974                FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ; 
    984975} 
    985976 
  • FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js

    r1596 r1598  
    122122                        // Load external resources (must be done here, otherwise Firefox will not 
    123123                        // have the document DOM ready to be used right away. 
    124                         FCKTools.AppendStyleSheet( eTargetDocument, FCKConfig.SkinPath + 'fck_editor.css' ) ; 
     124                        FCKTools.AppendStyleSheet( eTargetDocument, FCKConfig.SkinEditorCSS ) ; 
    125125 
    126126                        oToolbarSet = eToolbarTarget.__FCKToolbarSet = new FCKToolbarSet( eTargetDocument ) ; 
  • FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js

    r1565 r1598  
    5050 
    5151// Appends a CSS style string to a document. 
    52 FCKTools._AppendStyleString = function( documentElement, cssStyles ) 
    53 { 
     52FCKTools.AppendStyleString = function( documentElement, cssStyles ) 
     53{ 
     54        if ( !cssStyles ) 
     55                return ; 
     56 
    5457        var e = documentElement.createElement( "STYLE" ) ; 
    5558        e.appendChild( documentElement.createTextNode( cssStyles ) ) ; 
  • FCKeditor/trunk/editor/_source/internals/fcktools_ie.js

    r1565 r1598  
    3434 
    3535// Appends a CSS style string to a document. 
    36 FCKTools._AppendStyleString = function( documentElement, cssStyles ) 
    37 { 
     36FCKTools.AppendStyleString = function( documentElement, cssStyles ) 
     37{ 
     38        if ( !cssStyles ) 
     39                return ; 
     40 
    3841        var s = documentElement.createStyleSheet( "" ) ; 
    3942        s.cssText = cssStyles ; 
  • FCKeditor/trunk/editor/_source/internals/fcktools.js

    r1565 r1598  
    3232} 
    3333 
    34 // Returns a reference to the appended style sheet or an array with all the appended references 
    35 FCKTools.AppendStyleSheet = function( documentElement, cssFileUrlOrArray ) 
    36 { 
    37         if ( typeof( cssFileUrlOrArray ) == 'string' ) 
    38                 return this._AppendStyleSheet( documentElement, cssFileUrlOrArray ) ; 
     34/** 
     35 * Fixes relative URL entries defined inside CSS styles by appending a prefix 
     36 * to them. 
     37 * @param (String) cssStyles The CSS styles definition possibly containing url() 
     38 *              paths. 
     39 * @param (String) urlFixPrefix The prefix to append to relative URLs. 
     40 */ 
     41FCKTools.FixCssUrls = function( urlFixPrefix, cssStyles ) 
     42{ 
     43        if ( !urlFixPrefix || urlFixPrefix.length == 0 ) 
     44                return cssStyles ; 
     45 
     46        return cssStyles.replace( /url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g, function( match, opener, path, closer ) 
     47                { 
     48                        if ( /^\/|^\w?:/.test() ) 
     49                                return match ; 
     50                        else 
     51                                return 'url(' + opener + urlFixPrefix + path + closer + ')' ; 
     52                } ) ; 
     53} 
     54 
     55FCKTools._GetUrlFixedCss = function( cssStyles, urlFixPrefix ) 
     56{ 
     57        var match = cssStyles.match( /^([^|]+)\|([\s\S]*)/ ) ; 
     58         
     59        if ( match ) 
     60                return FCKTools.FixCssUrls( match[1], match[2] ) ; 
    3961        else 
    40         { 
    41                 var aStyleSheeArray = new Array() ; 
    42  
    43                 for ( var i = 0 ; i < cssFileUrlOrArray.length ; i++ ) 
    44                         aStyleSheeArray.push(this._AppendStyleSheet( documentElement, cssFileUrlOrArray[i] ) ) ; 
    45  
    46                 return aStyleSheeArray ; 
    47         } 
    48 } 
    49  
    50 FCKTools.AppendStyleString = function ( documentElement, cssStyles ) 
    51 { 
    52         this._AppendStyleString( documentElement, cssStyles ) ; 
    53 } 
     62                return cssStyles ; 
     63} 
     64 
     65/** 
     66 * Appends a <link css> or <style> element to the document. 
     67 * @param (Object) documentElement The DOM document object to which append the 
     68 *              stylesheet. 
     69 * @param (Variant) cssFileOrDef A String pointing to the CSS file URL or an 
     70 *              Array with many CSS file URLs or the CSS definitions for the <style> 
     71 *              element. 
     72 * @return {Array} An array containing all elements created in the target 
     73 *              document. It may include <link> or <style> elements, depending on the 
     74 *              value passed with cssFileOrDef. 
     75 */ 
     76FCKTools.AppendStyleSheet = function( domDocument, cssFileOrArrayOrDef ) 
     77{ 
     78        if ( !cssFileOrArrayOrDef ) 
     79                return [] ; 
     80 
     81        if ( typeof( cssFileOrArrayOrDef ) == 'string' ) 
     82        { 
     83                // Test if the passed argument is an URL. 
     84                if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) ) 
     85                { 
     86                        // The string may have several URLs separated by comma. 
     87                        return this.AppendStyleSheet( domDocument, cssFileOrArrayOrDef.split(',') ) ; 
     88                } 
     89                else 
     90                        return [ this.AppendStyleString( domDocument, FCKTools._GetUrlFixedCss( cssFileOrArrayOrDef ) ) ] ; 
     91        } 
     92        else 
     93        { 
     94                var styles = [] ; 
     95                for ( var i = 0 ; i < cssFileOrArrayOrDef.length ; i++ ) 
     96                        styles.push( this._AppendStyleSheet( domDocument, cssFileOrArrayOrDef[i] ) ) ; 
     97                return styles ; 
     98        } 
     99} 
     100 
     101FCKTools.GetStyleHtml = (function() 
     102{ 
     103        var getStyle = function( styleDef, markTemp ) 
     104        { 
     105                if ( styleDef.length == 0 ) 
     106                        return '' ; 
     107 
     108                var temp = markTemp ? ' _fcktemp="true"' : '' ;  
     109                return '<' + 'style type="text/css"' + temp + '>' + styleDef + '<' + '/style>' ; 
     110        } 
     111         
     112        var getLink = function( cssFileUrl, markTemp ) 
     113        { 
     114                if ( cssFileUrl.length == 0 ) 
     115                        return '' ; 
     116 
     117                var temp = markTemp ? ' _fcktemp="true"' : '' ;  
     118                return '<' + 'link href="' + cssFileUrl + '" type="text/css" rel="stylesheet" ' + temp + '/>' ; 
     119        } 
     120 
     121        return function( cssFileOrArrayOrDef, markTemp ) 
     122        { 
     123                if ( !cssFileOrArrayOrDef ) 
     124                        return '' ; 
     125 
     126                if ( typeof( cssFileOrArrayOrDef ) == 'string' ) 
     127                { 
     128                        // Test if the passed argument is an URL. 
     129                        if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) ) 
     130                        { 
     131                                // The string may have several URLs separated by comma. 
     132                                return this.GetStyleHtml( cssFileOrArrayOrDef.split(',') ) ; 
     133                        } 
     134                        else 
     135                                return getStyle( this._GetUrlFixedCss( cssFileOrArrayOrDef ), markTemp ) ; 
     136                } 
     137                else 
     138                { 
     139                        var html = '' ; 
     140 
     141                        for ( var i = 0 ; i < cssFileOrArrayOrDef.length ; i++ ) 
     142                                html += getLink( cssFileOrArrayOrDef[i], markTemp ) ; 
     143 
     144                        return html ; 
     145                } 
     146        } 
     147})() ; 
    54148 
    55149FCKTools.GetElementDocument = function ( element ) 
  • FCKeditor/trunk/fckconfig.js

    r1565 r1598  
    4444 
    4545FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ; 
     46FCKConfig.SkinEditorCSS = FCKConfig.SkinPath + 'fck_editor.css' ; 
     47FCKConfig.SkinDialogCSS = FCKConfig.SkinPath + 'fck_dialog.css' ; 
     48 
    4649FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; 
    4750 
  • FCKeditor/trunk/_whatsnew.html

    r1596 r1598  
    4545                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/123">#123</a>] Full support 
    4646                        for <strong>document.domain</strong> with automatic domain detection.</li> 
     47                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1622">#1622</a>] New <strong> 
     48                        inline CSS cache</strong> feature, making it possible to avoid downloading the CSS 
     49                        files for the editing area and skins. For that, it is enough to set the EditorAreaCSS, 
     50                        SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|&lt;minified 
     51                        CSS styles". All internal CSS links are already using this feature. </li> 
    4752                <li>New language file for <strong>Canadian French</strong>.</li> 
    4853        </ul>