Ticket #2687: plugin_contextmenu.patch

File plugin_contextmenu.patch, 1.4 KB (added by mardiros, 16 years ago)
  • editor/_source/internals/fck_contextmenu.js

     
    2424
    2525FCK.ContextMenu = new Object() ;
    2626FCK.ContextMenu.Listeners = new Array() ;
     27FCK.ContextMenu.LoadedCommands = new Array() ;
    2728
     29FCK.ContextMenu.RegisterCommand = function( commandName, command )
     30{
     31    this.LoadedCommands[ commandName ] = command ;
     32}
     33
    2834FCK.ContextMenu.RegisterListener = function( listener )
    2935{
    3036        if ( listener )
     
    4854
    4955function FCK_ContextMenu_GetListener( listenerName )
    5056{
     57    var oListener = FCK.ContextMenu.LoadedCommands[ listenerName ] ;
     58    if (oListener)
     59        return oListener;
     60
    5161        switch ( listenerName )
    5262        {
    5363                case 'Generic' :
  • editor/fckeditor.html

     
    192192        <script type="text/javascript">
    193193
    194194// Initialize the editing area context menu.
    195 FCK_ContextMenu_Init() ;
    196195
    197196FCKPlugins.Load() ;
    198197
     
    208207window.onload = function()
    209208{
    210209        InitializeAPI() ;
     210    FCK_ContextMenu_Init() ;
    211211
    212212        if ( FCKBrowserInfo.IsIE )
    213213                FCK_PreloadImages() ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy