Ticket #3897: 3897_3.patch

File 3897_3.patch, 2.0 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/image/dialogs/image.js

     
    258258                                        // Refresh LockRatio button
    259259                                        switchLockRatio ( this, true );
    260260                                }
     261
     262                                // Don't show preview if no URL given.
     263                                if ( this.getContentElement( 'info', 'txtUrl' ).validate() != true )
     264                                {
     265                                        this.preview.removeAttribute( 'src' );
     266                                        this.preview.setStyle( 'display', 'none' );
     267                                }
    261268                        },
    262269                        onOk : function()
    263270                        {
     
    403410                                                                                                        dialog = this.getDialog();
    404411                                                                                                        var original = dialog.originalElement;
    405412
     413                                                                                                        dialog.preview.removeStyle( 'display' );
     414
    406415                                                                                                        original.setCustomData( 'isReady', 'false' );
    407416                                                                                                        // Show loader
    408417                                                                                                        var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' );
     
    417426
    418427                                                                                                        updatePreview( dialog );
    419428                                                                                                }
     429                                                                                                // Dont show preview if no URL given.
     430                                                                                                else if ( dialog.preview )
     431                                                                                                {
     432                                                                                                        dialog.preview.removeAttribute( 'src' );
     433                                                                                                        dialog.preview.setStyle( 'display', 'none' );
     434                                                                                                }
    420435                                                                                        },
    421436                                                                                        setup : function( type, element )
    422437                                                                                        {
  • CHANGES.html

     
    245245                        copy and paste Flash content among different editor instances.</li>
    246246                <li><a href="http://dev.fckeditor.net/ticket/4193">#4193</a> : Automatic font color produced empty span on Firefox 3.5.</li>
    247247                <li><a href="http://dev.fckeditor.net/ticket/4186">#4186</a> : [FF] Fixed First open float panel cause host page scrollbar blinking.</li>
     248                <li><a href="http://dev.fckeditor.net/ticket/3897">#3897</a> : Now there is no image previews when the URL is empty in image dialog.</li>       
    248249        </ul>
    249250        <h3>
    250251                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy