X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fmenu%2Fplugin.js;h=731fed4afac65f7ba24aa3b7a72e6a9ab7585ca2;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=5d37ffda020723f252a92c96819f7fb8227f90d3;hpb=9afde8772159bd3436f1f5b7862960307710ae5a;p=ckeditor.git diff --git a/_source/plugins/menu/plugin.js b/_source/plugins/menu/plugin.js index 5d37ffd..731fed4 100644 --- a/_source/plugins/menu/plugin.js +++ b/_source/plugins/menu/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -49,7 +49,7 @@ CKEDITOR.plugins.add( 'menu', $ : function( editor, definition ) { definition = this._.definition = definition || {}; - this.id = 'cke_' + CKEDITOR.tools.getNextNumber(); + this.id = CKEDITOR.tools.getNextId(); this.editor = editor; this.items = []; @@ -97,7 +97,7 @@ CKEDITOR.plugins.add( 'menu', { var item = this.editor.getMenuItem( itemName ); - if ( item ) + if ( item && ( !item.command || this.editor.getCommand( item.command ).state ) ) { item.state = listenerItems[ itemName ]; this.add( item ); @@ -411,7 +411,7 @@ CKEDITOR.plugins.add( 'menu', var hasSubMenu = this.getItems; output.push( - '' + + '' + '