Ticket #5927: 5927.patch

File 5927.patch, 2.0 KB (added by Alfonso Martínez de Lizarrondo, 14 years ago)

Proposed patch

  • _source/plugins/dialogui/plugin.js

     
    236236                                if ( elementDefinition.size )
    237237                                        attributes.size = elementDefinition.size;
    238238
     239                                if ( elementDefinition.controlStyle )
     240                                        attributes.style = elementDefinition.controlStyle;
     241
    239242                                // If user presses Enter in a text box, it implies clicking OK for the dialog.
    240243                                var me = this, keyPressedOnMe = false;
    241244                                dialog.on( 'load', function()
     
    375378                                        cleanInnerDefinition( myDefinition );
    376379                                        if ( elementDefinition[ 'default' ] )
    377380                                                attributes.checked = 'checked';
     381
     382                                        if (typeof myDefinition.controlStyle != 'undefined')
     383                                                myDefinition.style = myDefinition.controlStyle;
     384
    378385                                        _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
    379386                                        html.push( ' <label id="', labelId, '" for="', attributes.id, '">',
    380387                                                        CKEDITOR.tools.htmlEncode( elementDefinition.label ),
     
    453460                                                        inputAttributes.checked = 'checked';
    454461                                                cleanInnerDefinition( inputDefinition );
    455462                                                cleanInnerDefinition( labelDefinition );
     463
     464                                                if (typeof inputDefinition.controlStyle != 'undefined')
     465                                                        inputDefinition.style = inputDefinition.controlStyle;
     466
    456467                                                children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );
    457468                                                inputHtml.push( ' ' );
    458469                                                new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id },
     
    610621                                                        CKEDITOR.tools.htmlEncode( item[0] ) );
    611622                                        }
    612623
     624                                        if (typeof myDefinition.controlStyle != 'undefined')
     625                                                myDefinition.style = myDefinition.controlStyle;
     626
    613627                                        _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) );
    614628                                        return html.join( '' );
    615629                                };
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy