public/ckeditor/4.4dev/plugins/dialogui/plugin.js
function( dialog, elementDefinition, htmlList ) {
				if ( arguments.length < 3 )
					return;

				initPrivateObject.call( this, elementDefinition );

				if ( !this._[ 'default' ] )
					this._[ 'default' ] = this._.initValue = elementDefinition.items[ 0 ][ 1 ];

				if ( elementDefinition.validate )
					this.validate = elementDefinition.valdiate;

				var children = [],
					me = this;

				var innerHTML = function() {
					var inputHtmlList = [],
						html = [],
						commonName = ( elementDefinition.id ? elementDefinition.id : CKEDITOR.tools.getNextId() ) + '_radio';

					for ( var i = 0; i < elementDefinition.items.length; i++ ) {
						var item = elementDefinition.items[ i ],
							title = item[ 2 ] !== undefined ? item[ 2 ] : item[ 0 ],
							value = item[ 1 ] !== undefined ? item[ 1 ] : item[ 0 ],
							inputId = CKEDITOR.tools.getNextId() + '_radio_input',
							labelId = inputId + '_label',

							inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, {
								id: inputId,
								title: null,
								type: null
							}, true ),

							labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, {
								title: title
							}, true ),

							inputAttributes = {
								type: 'radio',
								'class': 'cke_dialog_ui_radio_input',
								name: commonName,
								value: value,
								'aria-labelledby': labelId
							},

							inputHtml = [];

						if ( me._[ 'default' ] == value )
							inputAttributes.checked = 'checked';

						cleanInnerDefinition( inputDefinition );
						cleanInnerDefinition( labelDefinition );

						if ( typeof inputDefinition.inputStyle != 'undefined' )
							inputDefinition.style = inputDefinition.inputStyle;

						// Make inputs of radio type focusable (#10866).
						inputDefinition.keyboardFocusable = true;

						children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );

						inputHtml.push( ' ' );

						new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, {
							id: labelId,
							'for': inputAttributes.id
						}, item[ 0 ] );

						inputHtmlList.push( inputHtml.join( '' ) );
					}

					new CKEDITOR.ui.dialog.hbox( dialog, children, inputHtmlList, html );

					return html.join( '' );
				};

				// Adding a role="radiogroup" to definition used for wrapper.
				elementDefinition.role = 'radiogroup';
				elementDefinition.includeLabel = true;

				CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML );
				this._.children = children;
			}
function( dialog, elementDefinition, htmlList ) {
				if ( arguments.length < 3 )
					return;

				initPrivateObject.call( this, elementDefinition );

				if ( !this._[ 'default' ] )
					this._[ 'default' ] = this._.initValue = elementDefinition.items[ 0 ][ 1 ];

				if ( elementDefinition.validate )
					this.validate = elementDefinition.valdiate;

				var children = [],
					me = this;

				var innerHTML = function() {
					var inputHtmlList = [],
						html = [],
						commonName = ( elementDefinition.id ? elementDefinition.id : CKEDITOR.tools.getNextId() ) + '_radio';

					for ( var i = 0; i < elementDefinition.items.length; i++ ) {
						var item = elementDefinition.items[ i ],
							title = item[ 2 ] !== undefined ? item[ 2 ] : item[ 0 ],
							value = item[ 1 ] !== undefined ? item[ 1 ] : item[ 0 ],
							inputId = CKEDITOR.tools.getNextId() + '_radio_input',
							labelId = inputId + '_label',

							inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, {
								id: inputId,
								title: null,
								type: null
							}, true ),

							labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, {
								title: title
							}, true ),

							inputAttributes = {
								type: 'radio',
								'class': 'cke_dialog_ui_radio_input',
								name: commonName,
								value: value,
								'aria-labelledby': labelId
							},

							inputHtml = [];

						if ( me._[ 'default' ] == value )
							inputAttributes.checked = 'checked';

						cleanInnerDefinition( inputDefinition );
						cleanInnerDefinition( labelDefinition );

						if ( typeof inputDefinition.inputStyle != 'undefined' )
							inputDefinition.style = inputDefinition.inputStyle;

						// Make inputs of radio type focusable (#10866).
						inputDefinition.keyboardFocusable = true;

						children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );

						inputHtml.push( ' ' );

						new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, {
							id: labelId,
							'for': inputAttributes.id
						}, item[ 0 ] );

						inputHtmlList.push( inputHtml.join( '' ) );
					}

					new CKEDITOR.ui.dialog.hbox( dialog, children, inputHtmlList, html );

					return html.join( '' );
				};

				// Adding a role="radiogroup" to definition used for wrapper.
				elementDefinition.role = 'radiogroup';
				elementDefinition.includeLabel = true;

				CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML );
				this._.children = children;
			}
function ( dialog , elementDefinition , htmlList ) { if ( arguments . length < 3 ) return ; initPrivateObject . call ( this , elementDefinition ) ; if ( ! this . _ [ 'default' ] ) this . _ [ 'default' ] = this . _ . initValue = elementDefinition . items [ 0 ] [ 1 ] ; if ( elementDefinition . validate ) this . validate = elementDefinition . valdiate ; var children = [ ] , me = this ; var innerHTML = function ( ) { var inputHtmlList = [ ] , html = [ ] , commonName = ( elementDefinition . id ? elementDefinition . id : CKEDITOR . tools . getNextId ( ) ) + '_radio' ; for ( var i = 0 ; i < elementDefinition . items . length ; i ++ ) { var item = elementDefinition . items [ i ] , title = item [ 2 ] !== undefined ? item [ 2 ] : item [ 0 ] , value = item [ 1 ] !== undefined ? item [ 1 ] : item [ 0 ] , inputId = CKEDITOR . tools . getNextId ( ) + '_radio_input' , labelId = inputId + '_label' , inputDefinition = CKEDITOR . tools . extend ( { } , elementDefinition , { id : inputId , title : null , type : null } , true ) , labelDefinition = CKEDITOR . tools . extend ( { } , inputDefinition , { title : title } , true ) , inputAttributes = { type : 'radio' , 'class' : 'cke_dialog_ui_radio_input' , name : commonName , value : value , 'aria-labelledby' : labelId } , inputHtml = [ ] ; if ( me . _ [ 'default' ] == value ) inputAttributes . checked = 'checked' ; cleanInnerDefinition ( inputDefinition ) ; cleanInnerDefinition ( labelDefinition ) ; if ( typeof inputDefinition . inputStyle != 'undefined' ) inputDefinition . style = inputDefinition . inputStyle ; // Make inputs of radio type focusable (#10866).
 inputDefinition . keyboardFocusable = true ; children . push ( new CKEDITOR . ui . dialog . uiElement ( dialog , inputDefinition , inputHtml , 'input' , null , inputAttributes ) ) ; inputHtml . push ( ' ' ) ; new CKEDITOR . ui . dialog . uiElement ( dialog , labelDefinition , inputHtml , 'label' , null , { id : labelId , 'for' : inputAttributes . id } , item [ 0 ] ) ; inputHtmlList . push ( inputHtml . join ( '' ) ) ; } new CKEDITOR . ui . dialog . hbox ( dialog , children , inputHtmlList , html ) ; return html . join ( '' ) ; } ; // Adding a role="radiogroup" to definition used for wrapper.
 elementDefinition . role = 'radiogroup' ; elementDefinition . includeLabel = true ; CKEDITOR . ui . dialog . labeledElement . call ( this , dialog , elementDefinition , htmlList , innerHTML ) ; this . _ . children = children ; }
A group of radio buttons.

@class CKEDITOR.ui.dialog.radio
@extends CKEDITOR.ui.dialog.labeledElement
@constructor Creates a radio class instance.
@param {CKEDITOR.dialog} dialog Parent dialog window object.
@param {CKEDITOR.dialog.definition.uiElement} elementDefinition
The element definition. Accepted fields:

* `default` (Required) The default value.
* `validate` (Optional) The validation function.
* `items` (Required) An array of options. Each option
is a one- or two-item array of format `[ 'Description', 'Value' ]`. If `'Value'`
is missing, then the value would be assumed to be the same as the description.

@param {Array} htmlList List of HTML code to output to.
A group of radio buttons .