Opened 7 years ago

Closed 7 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)

5753.patch (862 bytes) - added by Sa'ar Zac Elias 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: select name default removed
Milestone: CKEditor 3.5

comment:2 Changed 7 years ago by Sa'ar Zac Elias

Owner: set to Sa'ar Zac Elias
Status: newassigned

Changed 7 years ago by Sa'ar Zac Elias

Attachment: 5753.patch added

comment:3 Changed 7 years ago by Sa'ar Zac Elias

Status: assignedreview

comment:4 Changed 7 years ago by Tobiasz Cudnik

Status: reviewreview_passed

comment:5 Changed 7 years ago by Sa'ar Zac Elias

Resolution: fixed
Status: review_passedclosed

Fixed with [5836].

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy