Page 1 of 1

multi-value combobox?

Posted: Thu May 15, 2014 2:30 pm
by awagner
Hi all,

I want to use a combobox in an author action. More specifically, I use it in the ToggleSurroundWithElementOperation to add a <hi> element around the current selection, allowing to user to specify the elements @rendition attribute from a list of allowed values ("#it", "#b", "#sup" and such).

This works all very well with the following stuff in the Operation's fragment parameter:

Code: Select all


<hi xmlns="http://www.tei-c.org/ns/1.0" rendition="${ask('Welche Hervorhebung?',combobox,('#b':'fett';'#it':'kursiv';'#sc':'Kapitälchen';'#spc':'gesperrt';'#sup':'hochgestellt';'#sub':'tiefgestellt';'#initCaps':'Kapitälchen mit Schmuck-Initiale'),'#sup')}"/>
But now I want to allow the selection of several of those values. The TEI allows multiple (pointer-type) values in this attribute, separated by whitespace (see TEI P5).

Can I do this with the ask/combobox method?

Thanks,
Andreas

Re: multi-value combobox?

Posted: Fri May 16, 2014 5:03 pm
by alex_jitianu
Hello Andreas,

The ${ask} editor variable doesn't have any input type that allows multiple selection. I've added an issue to allow such an input type, perhaps a multiple selection list or some check boxes.

Meanwhile you could let the @rendition attribute like it is now or even inserted it completely empty. To compensate, you could use a multiple selection form control on the @rendition to allow the user to select multiple values:

Code: Select all

hi:before {
content: "Welche Hervorhebung: " oxy_popup(edit, '@rendition', values, '#sup, #it', labels, "hochgestellt, kursiv");
}
Best regards,
Alex

Re: multi-value combobox?

Posted: Mon May 19, 2014 1:02 pm
by awagner
Thank you Alex,

I will see what we are going to use.