Ticket #3099: 3099.patch

File 3099.patch, 1.1 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/button/plugin.js

     
    5757
    5858        this.className = definition.className || ( definition.command && 'cke_button_' + definition.command ) || '';
    5959
     60        this.icon = definition.icon;
     61
    6062        /**
    6163         * The function to be called when the user clicks the button. If not
    6264         * defined, the "command" property is required, and the command gets
     
    175177                                ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' +
    176178                                ' onfocus="return CKEDITOR.ui.button._.focus(', index, ', event);"' +
    177179                                ' onclick="return CKEDITOR.ui.button._.click(', index, ', event);">' +
    178                                         '<span class="cke_icon"></span>' +
     180                                        '<span class="cke_icon"' );
     181
     182                if ( this.icon )
     183                        output.push( ' style="background-image:url(', CKEDITOR.getUrl( this.icon ), ');background-position:0 0;"' );
     184
     185                output.push(
     186                                        '></span>' +
    179187                                        '<span class="cke_label">', this.label, '</span>' +
    180188                        '</a>' );
    181189
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy