Ticket #5274: 5274_2.patch

File 5274_2.patch, 1.7 KB (added by Garry Yao, 14 years ago)
  • _source/core/tools.js

     
    691691                                catch (e) {}
    692692                        }
    693693                        return returnValue;
     694                },
     695
     696                /**
     697                 * Reflow to irk the browser into a correct layout.
     698                 * @param items
     699                 */
     700                redraw : function( items )
     701                {
     702                        items instanceof CKEDITOR.dom.element && ( items = new CKEDITOR.dom.nodeList( [ items.$ ] ) );
     703
     704                        for ( var i = 0, count = items.count(); i < count; i++ )
     705                                items.getItem( i ).setStyle( 'display', 'block' );
     706
     707                        setTimeout( function()
     708                        {
     709                                for ( var i = 0, count = items.count(); i < count; i++ )
     710                                        items.getItem( i ).removeStyle( 'display' );
     711                        }, 0 );
    694712                }
    695713        };
    696714})();
  • _source/plugins/templates/dialogs/templates.js

     
    4141                                                '</a>' );
    4242
    4343                                // Build the inner HTML of our new item DIV.
    44                                 var html = '<table style="width:350px;" class="cke_tpl_preview"><tr>';
     44                                var html = '<table class="cke_tpl_preview"><tr>';
    4545
    4646                                if ( template.image && imagesPath )
    4747                                        html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"></td>';
     
    207207                                                        if ( templates.length )
    208208                                                        {
    209209                                                                renderTemplatesList( listContainer, templates );
     210                                                                CKEDITOR.env.ie6Compat && CKEDITOR.tools.redraw( listContainer.getElementsByTag( 'img' ) );
     211
    210212                                                                templatesListField.focus();
    211213                                                        }
    212214                                                        else
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy