Opened 15 years ago
Closed 15 years ago
#5753 closed Bug (fixed)
select dialog default for txtName Id not working...
Reported by: | shawnmelliott | Owned by: | Sa'ar Zac Elias |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4.1 |
Component: | UI : Dialogs | Version: | 3.2.1 |
Keywords: | Cc: |
Description
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';
}
}
}
});
Attachments (1)
Change History (6)
comment:1 Changed 15 years ago by
Keywords: | select name default removed |
---|---|
Milestone: | → CKEditor 3.5 |
comment:2 Changed 15 years ago by
Owner: | set to Sa'ar Zac Elias |
---|---|
Status: | new → assigned |
Changed 15 years ago by
Attachment: | 5753.patch added |
---|
comment:3 Changed 15 years ago by
Status: | assigned → review |
---|
comment:4 Changed 15 years ago by
Status: | review → review_passed |
---|
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [5836].