X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fbutton%2Fplugin.js;h=a882a39b81d34bc324d7e23f5a9068c8ae9b8f36;hb=8665a7c6c60586526e32e8941fe2896739b6ebfb;hp=b211a28c08c792ebd513f3ca0f6926b3d4d0b92d;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/button/plugin.js b/_source/plugins/button/plugin.js index b211a28..a882a39 100644 --- a/_source/plugins/button/plugin.js +++ b/_source/plugins/button/plugin.js @@ -69,9 +69,13 @@ CKEDITOR.ui.button.prototype = */ render : function( editor, output ) { - var env = CKEDITOR.env; + var env = CKEDITOR.env, + id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(), + classes = '', + command = this.command, // Get the command name. + clickFn, + index; - var id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(); this._.editor = editor; var instance = @@ -90,14 +94,9 @@ CKEDITOR.ui.button.prototype = } }; - var clickFn = CKEDITOR.tools.addFunction( instance.execute, instance ); + instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance ); - var index = CKEDITOR.ui.button._.instances.push( instance ) - 1; - - var classes = ''; - - // Get the command name. - var command = this.command; + instance.index = index = CKEDITOR.ui.button._.instances.push( instance ) - 1; if ( this.modes ) { @@ -173,13 +172,16 @@ CKEDITOR.ui.button.prototype = } output.push( - '>' + + '> ' + '', this.label, '' ); if ( this.hasArrow ) { output.push( - '' ); + '' + // BLACK DOWN-POINTING TRIANGLE + + ( CKEDITOR.env.hc ? '▼' : ' ' ) + + '' ); } output.push( @@ -268,3 +270,8 @@ CKEDITOR.ui.prototype.addButton = function( name, definition ) { this.add( name, CKEDITOR.UI_BUTTON, definition ); }; + +CKEDITOR.on( 'reset', function() + { + CKEDITOR.ui.button._.instances = []; + });