Ticket #3494: 3494_2.patch

File 3494_2.patch, 3.9 KB (added by alfonsoml, 2 years ago)

Context menu patch

  • _source/plugins/floatpanel/plugin.js

     
    135135                                                display : '' 
    136136                                        }); 
    137137 
     138                                // To allow the context menu to decrease back their width 
     139                                element.getFirst().removeStyle('width'); 
     140 
    138141                                // Configure the IFrame blur event. Do that only once. 
    139142                                if ( !this._.blurSet ) 
    140143                                { 
     
    192195 
    193196                                                var panelLoad = CKEDITOR.tools.bind( function () 
    194197                                                { 
     198                                                        var target = element.getFirst(); 
     199 
    195200                                                        if ( block.autoSize ) 
    196201                                                        { 
    197                                                                 var target = element.getFirst(); 
     202                                                                // We must adjust first the width or IE6 could include extra lines in the height computation 
     203                                                                var widthNode = block.element.$; 
     204 
     205                                                                if ( CKEDITOR.env.gecko || CKEDITOR.env.opera) 
     206                                                                        widthNode = widthNode.parentNode; 
     207 
     208                                                                if ( CKEDITOR.env.ie) 
     209                                                                        widthNode = widthNode.document.body; 
     210 
     211                                                                var width = widthNode.scrollWidth; 
     212                                                                // Account for extra height needed due to IE quirks box model bug: 
     213                                                                // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug 
     214                                                                // (#3426) 
     215                                                                if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 ) 
     216                                                                        width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ); 
     217                                                                // A little extra at the end. 
     218                                                                // If not present, IE6 might break into the next line, but also it looks better this way 
     219                                                                width += 4 ; 
     220 
     221                                                                target.setStyle( 'width', width + 'px' ); 
     222 
     223                                                                // IE doesn't compute the scrollWidth if a filter is applied previously 
     224                                                                block.element.addClass( 'cke_frameLoaded') 
     225 
    198226                                                                var height = block.element.$.scrollHeight; 
    199227 
    200228                                                                // Account for extra height needed due to IE quirks box model bug: 
     
    209237                                                                panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); 
    210238                                                        } 
    211239                                                        else 
    212                                                                 element.getFirst().removeStyle( 'height' ); 
     240                                                                target.removeStyle( 'height' ); 
    213241 
    214242                                                        var panelElement = panel.element, 
    215243                                                                panelWindow = panelElement.getWindow(), 
  • _source/skins/kama/menu.css

     
    9494        height:19px; 
    9595        margin-left: 24px; 
    9696        background-color: #fff; 
    97         _overflow: hidden; 
    98         _width: 80px; 
     97} 
     98/* Set these after the document has been loaded and we know the dimensions*/ 
     99.cke_skin_kama .cke_frameLoaded .cke_menuitem .cke_label 
     100{ 
    99101        filter: alpha(opacity=70); /* IE */ 
    100102        opacity: 0.70; /* Safari, Opera and Mozilla */ 
    101103} 
  • _source/skins/office2003/menu.css

     
    9393        height:19px; 
    9494        margin-left: 24px; 
    9595        background-color: #fff; 
    96         _overflow: hidden; 
    97         _width: 80px; 
     96} 
     97/* Set these after the document has been loaded and we know the dimensions*/ 
     98.cke_skin_office2003 .cke_frameLoaded .cke_menuitem .cke_label 
     99{ 
    98100        filter: alpha(opacity=70); /* IE */ 
    99101        opacity: 0.70; /* Safari, Opera and Mozilla */ 
    100102} 
  • _source/skins/v2/menu.css

     
    9393        height:19px; 
    9494        margin-left: 24px; 
    9595        background-color: #fff; 
    96         _overflow: hidden; 
    97         _width: 80px; 
     96} 
     97/* Set these after the document has been loaded and we know the dimensions*/ 
     98.cke_skin_v2 .cke_frameLoaded .cke_menuitem .cke_label 
     99{ 
    98100        filter: alpha(opacity=70); /* IE */ 
    99101        opacity: 0.70; /* Safari, Opera and Mozilla */ 
    100102} 
© 2003 – 2011 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy