Ticket #6073: 6073.patch

File 6073.patch, 938 bytes (added by Frederico Caldeira Knabben, 14 years ago)
  • _source/plugins/liststyle/plugin.js

     
    4343                        {
    4444                                editor.contextMenu.addListener( function( element, selection )
    4545                                        {
    46                                                 if ( !element )
    47                                                         return null;
    48 
    49                                                 if ( element.getAscendant( 'ol') )
    50                                                         return { numberedlist: CKEDITOR.TRISTATE_OFF };
    51 
    52                                                 if ( element.getAscendant( 'ul' ) )
    53                                                         return { bulletedlist: CKEDITOR.TRISTATE_OFF };
     46                                                while ( element )
     47                                                {
     48                                                        var name = element.getName();
     49                                                        if ( name == 'ol' )
     50                                                                return { numberedlist: CKEDITOR.TRISTATE_OFF };
     51                                                        else if ( name == 'ul' )
     52                                                                return { bulletedlist: CKEDITOR.TRISTATE_OFF };
     53       
     54                                                        element = element.getParent();
     55                                                }
     56                                                return null;
    5457                                        });
    5558                        }
    5659                }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy