Ticket #5915: 5915_2.patch

File 5915_2.patch, 1.4 KB (added by Martin, 14 years ago)
  • _source/plugins/dialog/plugin.js

     
    1 /*
     1/*
    22Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
     
    154154                                definition : definition
    155155                        }
    156156                        , editor ).definition;
     157
     158                this.definition = definition = CKEDITOR.fire( 'dialogDefinition',
     159                        {
     160                                name : dialogName,
     161                                definition : definition
     162                        }
     163                        , editor ).definition;
     164
     165                var removeContentDefinition = editor.config.removeDialogContents.split(";");
     166                for (i = 0; i <= removeContentDefinition.length - 1; i++)
     167                {
     168                        if(removeContentDefinition[i].indexOf(":") != -1)
     169                        {
     170                                var dialogContent = removeContentDefinition[i].split(":");
     171                                if(dialogName == dialogContent[0])
     172                                        definition.removeContents(dialogContent[1]);
     173                        }
     174                }
     175
    157176                // Initialize load, show, hide, ok and cancel events.
    158177                if ( definition.onLoad )
    159178                        this.on( 'load', definition.onLoad );
     
    29712990 * @param String page The id of the page that it's gonna be selected.
    29722991 * @param String currentPage The id of the current page.
    29732992 */
     2993
     2994CKEDITOR.config.removeDialogContents = '';
     2995 No newline at end of file
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy