Ticket #5753 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

select dialog default for txtName Id not working...

Reported by: shawnmelliott Owned by: Saare
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

5753.patch (862 bytes) - added by Saare 4 years ago.

Change History

comment:1 Changed 4 years ago by fredck

  • Keywords select,name,default removed
  • Milestone set to CKEditor 3.5

comment:2 Changed 4 years ago by Saare

  • Owner set to Saare
  • Status changed from new to assigned

Changed 4 years ago by Saare

comment:3 Changed 4 years ago by Saare

  • Status changed from assigned to review

comment:4 Changed 4 years ago by tobiasz.cudnik

  • Status changed from review to review_passed

comment:5 Changed 4 years ago by Saare

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [5836].

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