Ticket #2997: 2997.patch

File 2997.patch, 2.7 KB (added by Artur Formella, 15 years ago)
  • _source/lang/en.js

     
    8585                advancedTab             : 'Advanced',
    8686                validateNumberFailed    : 'This value is not a number.',
    8787                confirmNewPage  : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',
    88                 confirmCancel   : 'Some of the options have been changed. Are you sure to close the dialog?'
     88                confirmCancel   : 'Some of the options have been changed. Are you sure to close the dialog?',
     89                panelLoading    : 'Loading...'
    8990        },
    9091
    9192        // Special char dialog.
  • _source/plugins/panel/plugin.js

     
    108108                {
    109109                        if ( this.forceIFrame || this.css.length )
    110110                        {
    111                                 var iframe = this.document.getById( 'cke_' + this.id + '_frame' );
    112                                 var doc = new CKEDITOR.dom.document( iframe.$.contentWindow.document );
    113                                
     111                                var loadingMsg = '',
     112                                        iframe = this.document.getById( 'cke_' + this.id + '_frame' ),
     113                                        doc = new CKEDITOR.dom.document( iframe.$.contentWindow.document );
     114
     115                                // Get the loading message.
     116                                for ( var instanceName in CKEDITOR.instances )
     117                                {
     118                                        if ( CKEDITOR.instances[ instanceName ].lang )
     119                                        {
     120                                                loadingMsg = CKEDITOR.instances[ instanceName ].lang.common.panelLoading;
     121                                                break;
     122                                        }
     123                                }
     124
    114125                                // Initialize the IFRAME document body.
    115126                                doc.$.open();
    116127                                doc.$.write(
     
    120131                                                        '<link type="text/css" rel=stylesheet href="' + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' +
    121132                                                '</head>' +
    122133                                                '<body class="cke_panel_frame" style="margin:0;padding:0">' +
     134                                                        '<div id="cke_' + this.id + '_loader" style="padding:5px">' + loadingMsg + '</div>' +
     135                                                        '<div id="cke_' + this.id + '_content" style="display:none"></div>' +
    123136                                                '</body>' +
    124137                                        '<\/html>' );
    125138                                doc.$.close();
    126                                
     139
    127140                                var win = doc.getWindow();
    128141
    129142                                // Register the CKEDITOR global.
     
    131144
    132145                                win.on( 'load', function( ev )
    133146                                        {
     147                                                doc.getById( 'cke_' + this.id + '_loader' ).setStyle( 'display', 'none' );
     148                                                doc.getById( 'cke_' + this.id + '_content' ).setStyle( 'display', 'block' );
    134149                                                this.isLoaded = true;
    135150                                                if ( this.onLoad )
    136151                                                        this.onLoad();
    137152                                        },
    138153                                        this);
    139154
    140                                 holder = doc.getBody();
     155                                holder = doc.getById( 'cke_' + this.id + '_content' );
    141156                        }
    142157                        else
    143158                                holder = this.document.getById( 'cke_' + this.id );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy