Skip to main content

dojo.accordion label with checkbox

3 replies [Last post]
mfluder888
Offline
Joined: 2007-03-19
Points: 0

HI All,

I am using jMaki & creating a dojo.accordion inside my application. I am trying to find out if I can add some check boxes to the label part of the accordion widget. I'm hoping to have the text of the label on the left side of the label bar & my 2 check boxes on the right side. For example, taking the default dojo.accordion:

and doing something with the {label:'Books', ... part to make it display as 'Books checkbox1 checkbox2'

Any ideas or is this even possible.

Thanks,
ME.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mfluder888
Offline
Joined: 2007-03-19
Points: 0

Thanks Greg

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Sometimes the simplest solutions are best. I tried to customize the tempalte but the way it's designed makes it difficult in the case of this widget.

Let us know if you have problems wtih other things and general feedback is always good too.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

After a bit of digging I think the easiest solution is to put markup n the label:

/>

Dojo sets the label using an innerHTML setting so you can pretty much put anything in there. The key is getting the events back out which you could do by publishing evens when a user clicks on a checkbox. I'll let that as an exercise.

I did try to customize the dojo templates manually but it gets a little to sticky and I think this solution can be made to work easier.