Ticket #3876: 3876.patch

File 3876.patch, 2.0 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/dialogui/plugin.js

     
    332332                                        if ( elementDefinition[ 'default' ] )
    333333                                                attributes.checked = 'checked';
    334334                                        _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
    335                                         html.push( ' ', CKEDITOR.tools.htmlEncode( elementDefinition.label ) );
     335                                        html.push( '<label for="', attributes.id, '">',
     336                                                        CKEDITOR.tools.htmlEncode( elementDefinition.label ),
     337                                                        '</label>' );
    336338                                        return html.join( '' );
    337339                                };
    338340
    339                                 CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'label', null, null, innerHTML );
     341                                CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, innerHTML );
    340342                        },
    341343
    342344                        /**
     
    393395                                                                                id : null,
    394396                                                                                title : title
    395397                                                                        }, true ),
    396                                                         inputHtml = [],
    397398                                                        inputAttributes =
    398399                                                        {
    399400                                                                type : 'radio',
    400401                                                                'class' : 'cke_dialog_ui_radio_input',
    401402                                                                name : commonName,
    402403                                                                value : value
    403                                                         };
     404                                                        },
     405                                                        inputHtml = [];
    404406                                                if ( me._['default'] == value )
    405407                                                        inputAttributes.checked = 'checked';
    406408                                                cleanInnerDefinition( inputDefinition );
    407409                                                cleanInnerDefinition( labelDefinition );
    408410                                                children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );
    409                                                 new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtmlList, 'label', null, null,
    410                                                            inputHtml.join( '' ) + ' ' + item[0] );
     411                                                new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { 'for' : inputAttributes.id },
     412                                                           item[0] );
     413                                                inputHtmlList.push( inputHtml.join( '' ) );
    411414                                        }
    412415                                        new CKEDITOR.ui.dialog.hbox( dialog, [], inputHtmlList, html );
    413416                                        return html.join( '' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy