Ticket #2913: 2913.patch

File 2913.patch, 1.2 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/plugins/button/plugin.js

     
    116116                        }
    117117                };
    118118
     119                var index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
     120               
     121                var classes = 'cke_button';
     122               
    119123                // Get the command name.
    120124                var command = this.command;
    121125
     
    130134                                        {
    131135                                                this.setState( command.state );
    132136                                        }, this);
     137
     138                                classes += ' cke_' + (
     139                                        command.state == CKEDITOR.TRISTATE_ON ? 'on' :
     140                                        command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
     141                                        'off' );
    133142                        }
    134143                }
    135144
    136                 var index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
     145                if ( this.className )
     146                        classes += ' ' + this.className;
    137147
    138148                output.push(
    139149                        '<a id="', id, '"' +
    140                                 ' class="cke_button ', this.className, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
     150                                ' class="', classes, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
    141151                                ' title="', this.title, '"' +
    142152                                ' tabindex="-1"' +
    143153                                ' hidefocus="true"' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy