X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftable%2Fplugin.js;h=4bc5992b959052029b44be6ed439037c4f2df6d4;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hp=2feaeb109c5e3ffd975772834db811d5f875bca9;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/table/plugin.js b/_source/plugins/table/plugin.js index 2feaeb1..4bc5992 100644 --- a/_source/plugins/table/plugin.js +++ b/_source/plugins/table/plugin.js @@ -1,10 +1,11 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'table', { + requires : [ 'dialog' ], init : function( editor ) { var table = CKEDITOR.plugins.table, @@ -45,15 +46,23 @@ CKEDITOR.plugins.add( 'table', } ); } + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'table' ) ) + evt.data.dialog = 'tableProperties'; + }); + // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { - if ( !element ) + if ( !element || element.isReadOnly() ) return null; - var isTable = element.is( 'table' ) || element.hasAscendant( 'table' ); + var isTable = element.hasAscendant( 'table', 1 ); if ( isTable ) {