public/ckeditor/_source/plugins/docprops/dialogs/docprops.js
function( id, label, fieldProps )
	{
		return {
			type : 'hbox',
			padding : 0,
			widths : [ '60%', '40%' ],
			children : [
				CKEDITOR.tools.extend( {
					type : 'text',
					id : id,
					label : lang[ label ]
				}, fieldProps || {}, 1 ),
				{
					type : 'button',
					id : id + 'Choose',
					label : lang.chooseColor,
					className : 'colorChooser',
					onClick : function()
					{
						var self = this;
						getDialogValue( 'colordialog', function( colorDialog )
						{
							var dialog = self.getDialog();
							dialog.getContentElement( dialog._.currentTabId, id ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() );
						});
					}
				}
			]
		};
	}
function( id, label, fieldProps )
	{
		return {
			type : 'hbox',
			padding : 0,
			widths : [ '60%', '40%' ],
			children : [
				CKEDITOR.tools.extend( {
					type : 'text',
					id : id,
					label : lang[ label ]
				}, fieldProps || {}, 1 ),
				{
					type : 'button',
					id : id + 'Choose',
					label : lang.chooseColor,
					className : 'colorChooser',
					onClick : function()
					{
						var self = this;
						getDialogValue( 'colordialog', function( colorDialog )
						{
							var dialog = self.getDialog();
							dialog.getContentElement( dialog._.currentTabId, id ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() );
						});
					}
				}
			]
		};
	}
function ( id , label , fieldProps ) { return { type : 'hbox' , padding : 0 , widths : [ '60%' , '40%' ] , children : [ CKEDITOR . tools . extend ( { type : 'text' , id : id , label : lang [ label ] } , fieldProps || { } , 1 ) , { type : 'button' , id : id + 'Choose' , label : lang . chooseColor , className : 'colorChooser' , onClick : function ( ) { var self = this ; getDialogValue ( 'colordialog' , function ( colorDialog ) { var dialog = self . getDialog ( ) ; dialog . getContentElement ( dialog . _ . currentTabId , id ) . setValue ( colorDialog . getContentElement ( 'picker' , 'selectedColor' ) . getValue ( ) ) ; } ) ; } } ] } ; }
Utilty to shorten the creation of color fields in the dialog.
Utilty to shorten the creation of color fields in the dialog .