[kupu-dev] Add charmap to kupu
Jordi Martinez
jordim at guellconsulting.com
Wed Aug 20 13:24:06 CEST 2008
Guido Wesdorp wrote:
> Jordi Martinez wrote:
>> I would like to add a button to the toolbar. If you click on it I need a
>> dialog box with the list of phonetics symbols. The user click on
>> every symbol he/she needs and they appear in a text box he/she could
>> edit
>>
>> When finish to add symbols click on the ok button and the text in the
>> text box is inserted in the document
>>
>> Similar how windows charmap works but only for phonetics symbols
>>
>>
> Yes, I understood that, see my previous mail... :)
>
> Longer answer:
>
> The first step is to create a layer (called 'Implementation' in Kupu)
> that glues HTML snippets into the toolbar and body of the Kupu HTML
> file. To do this, you create a directory with .kupu (XSLT) files,
> which contain information about what XSL files to include
> (include.kupu), what parts to include (wire.kupu) and snippets of HTML
> (other .kupu files). I guess in your case you will want to copy and
> adjust include.kupu, wire.kupu, head.kupu and toolbar.kupu from the
> plone layer to make them include your custom .js files and the button,
> and create a file called something like 'charmap.kupu' for the dialog
> box, which you add to include.kupu and wire.kupu. For more information
> about the .kupu files, see doc/TEMPLATE-SYSTEM.txt and check out a
> simple layer such as 'widgeteer' to see how it's built up.
>
> Then you write JS code that gets triggered by the user selecting, or
> clicking or whatnot, a character in your charmap. This could be
> written as a Kupu plugin (known as 'Tools' in Kupu), but I guess you
> could just add a function to your dialog box too, since you won't
> really use the plugin framework. This should contain the code I wrote
> in my previous script, and some more code to close the dialog, etc.
>
> Then you copy the Kupu init file, in Plone's case
> plone/kupu_plone_layer/kupuinit.js, to your layer directory and adjust
> it so that your dialog pops up if the button gets clicked. There's
> plenty of examples of how to write a simple button in the init file
> already, it's a two liner that says 'create a button, register to
> Kupu', basically. Make sure to copy the plone layer's head.kupu file
> to your layer, and adjust it so it uses your init code instead of
> Plone's.
>
> When those steps are taken, you can add your layer to the root make
> file , or create a local make file, and run it so it builds the
> template (see info in the docs). This should overwrite (if done well)
> the default Plone HTML with your customized version.
>
> I understand the current make situation isn't very easy to work with,
> though it's rather flexible it's relatively cumbersome to create a new
> layer. Hopefully, though, this information, along with the docs, is
> enough to get you started...
>
> Cheers,
>
> Guido
>
Wow! I only could understand the words but not the concept
If you try to put in the place of someone who never try to do what I
need to do you could understand that this sounds chinese
I know that to do good documentation it's the hardest part of our job
but when a process is so difficult like this if you don't have a
reasonable help you are lost
Thanks for the help but to solve my problem first I need to translate
your words to something understandable to a newbie
I don't want to seem ungrateful I only want to help kupu developers to
improve the support and step-by-step helps more than 3 documents with a
lot of words and deep discussion of concepts (like kupu documentation)
If we think in child to write the help we write better documentation. A
newbie is like a child and if you use steps (ol or ul), graphics, etc
then the newbie could do the job. Deep discussions are useful when you
are experienced and want to make things better
Thanks a lot!
Ps: If someone has a newbie step-by-step help, please share with us
More information about the kupu-dev
mailing list