Ticket #266 (new enhancement)

Opened 2 months ago

Last modified 1 month ago

composite-control: Extended options for defining custom automatic layout

Reported by: idbr Assigned to: idbr
Priority: minor Milestone: 0.4
Component: < Builder Logic Version: trunk
Keywords: Cc:

Description

Because we dynamicly generate our fconfs, we rely heavily on the automatic html construction of kauri forms. Currently, it delivers constructs like this:

<dl>
  <dt>
    Label
  </dt>
  <dd>
    Item
  </dd>
  ..
</dl>

We would like to have more control over this proces, and therefor, I propose the following options to be included in the composite control:

  • containerElement
  • itemWrapElement
  • itemLabelElement
  • itemElement

These options would define the html-tags used to generate the layout of the composite, as follows:

<containerElement>
  <itemWrapElement>
    <itemLabelElement>
      Label
    </itemLabelElement>
    <itemElement>
      Item
    </itemElement>
  </itemWrapElement>
  ..
</containerElement>

The following constructs would then be possible:

<table>
  <tr>
    <td>
      Label
    </td>
    <td>
      Item
    </td>
  </tr>
  ..
</table>
<div>
  <span>
    Label
  </span>
  <div>
    Item
  </div>
  ..
</div>

The current construct (dl-dd-dt) would also still be possible.

While at it, i'd also like to propose options defining class-attributes to go with the above mentioned elements:

  • containerClass
  • itemWrapClass
  • itemLabelClass
  • itemClass

which would result in the following construct:

<containerElement class="containerClass">
  <itemWrapElement class="itemWrapClass">
    <itemLabelElement class="itemLabelClass">
      Label
    </itemLabelElement>
    <itemElement class="itemClass">
      Item
    </itemElement>
  </itemWrapElement>
  ..
</containerElement>

This makes it easier to style the aforementioned elements.

Attachments

composite.diff (2.5 kB) - added by idbr on 07/01/10 08:14:42.
Diff of composite.js

Change History

07/01/10 08:14:42 changed by idbr

  • attachment composite.diff added.

Diff of composite.js

19/01/10 07:34:04 changed by mpo

Hm, isn't this something the general idea behind #255 would solve as well? Maybe that is a more generic approach that can simplify things?

wdyt?

31/01/10 17:49:53 changed by jgou

  • component changed from modules/kauri-forms to < Builder Logic.