Ticket #266 (closed enhancement: fixed)

Opened 8 months ago

Last modified 6 months ago

composite-control: Extended options for defining custom automatic layout

Reported by: idbr Owned by: 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 Download (2.5 KB) - added by idbr 8 months ago.
Diff of composite.js

Change History

Changed 8 months ago by idbr

Diff of composite.js

Changed 8 months ago 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?

Changed 7 months ago by jgou

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

Changed 6 months ago by idbr

  • status changed from new to closed
  • resolution set to fixed

This is resolved with the control and layout templates from the new builder logic.

Add/Change #266 (composite-control: Extended options for defining custom automatic layout)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.