Ticket #3834: 3834.patch

File 3834.patch, 2.0 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/tabletools/plugin.js

     
    674674                                                if ( !element )
    675675                                                        return null;
    676676
    677                                                         var isCell      = !element.is( 'table' ) && element.hasAscendant( 'table' ) ;
     677                                                var contextMenuTags = { thead : 1, tbody : 1, tfoot : 1, td : 1, tr : 1, th : 1 };
     678                                                var tagName = element.getName();
    678679
    679                                                         if ( isCell )
    680                                                         {
    681                                                                 return {
    682                                                                         tablecell : CKEDITOR.TRISTATE_OFF,
    683                                                                         tablerow : CKEDITOR.TRISTATE_OFF,
    684                                                                         tablecolumn : CKEDITOR.TRISTATE_OFF
    685                                                                 };
    686                                                         }
     680                                                var showContextMenu     = tagName in contextMenuTags && element.hasAscendant( 'table' );
     681
     682                                                if ( showContextMenu )
     683                                                {
     684                                                        return {
     685                                                                tablecell : CKEDITOR.TRISTATE_OFF,
     686                                                                tablerow : CKEDITOR.TRISTATE_OFF,
     687                                                                tablecolumn : CKEDITOR.TRISTATE_OFF
     688                                                        };
     689                                                }
    687690
    688                                                         return null;
     691                                                return null;
    689692                                        } );
    690693                        }
    691694                }
  • CHANGES.html

     
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    22<!--
    33Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
    44For licensing, see LICENSE.html or http://ckeditor.com/license
     
    4444        <p>
    4545                Fixed issues:</p>
    4646        <ul>
     47                <li><a href="http://dev.fckeditor.net/ticket/3834">#3834</a> : Context menu on table caption incorrect.</li>
    4748                <li><a href="http://dev.fckeditor.net/ticket/3819">#3819</a> : The cursor was not visible
    4849                        when applying style to collapsed selections in Firefox 2.</li>
    4950        </ul>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy