﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5753	select dialog default for txtName Id not working...	shawnmelliott	Sa'ar Zac Elias	"The following code is used to enter a default ""Name"" for radio, checkbox, textareas, textfields and selects.  I'm able to set the default name for all of these except for ""select"" even if I'm using the ID of the name uielement

When I work with any of the other inputs listed the ""Name:"" item does have the default value of $qst$_Question added.. but this isn't the case for the select.  To verify I edited the dialogs select.js and stuffed a default for the name uielement, it didn't take the default I specified as the name.

-----

					CKEDITOR.on( 'dialogDefinition', function( ev ){
						var dialogName = ev.data.name;
						var dialogDefinition = ev.data.definition;

						if(dialogName == 'checkbox' || dialogName == 'radio' || dialogName == 'textfield' || dialogName == 'textarea' || dialogName == 'select'){
							//Get the info contents
							var defTag = dialogDefinition.getContents( 'info' );

							//Now get our ""name"" item and default it based on type
							var useID='';
							if(dialogName == 'checkbox' || dialogName == 'select'){useID='txtName';}
							if(dialogName == 'radio'){useID='name';}
							if(dialogName == 'textfield' || dialogName == 'textarea'){useID='_cke_saved_name';}
							if(dialogName == 'select'){useID='txtName';}


							//Have one?
							if(useID != ''){
								//Yes.. get it
								var fldItem = defTag.get( useID );
								if(fldItem){
									fldItem[ 'default' ] = '$qst$_Question';
								}
							}

						}
					});"	Bug	closed	Normal	CKEditor 3.4.1	UI : Dialogs	3.2.1	fixed		
