[IMP] display of spacing in listings
In entries explanations and configuration, make it possible to "split" the list in multiple sub-lists visually: a ``null`` item should just create an empty space, not display a list item "dot"
This commit is contained in:
parent
32493c9c0f
commit
a0601d909f
@ -98,6 +98,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.journal-entries .entries-listing p {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#reconciliation #example div.buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -100,15 +100,24 @@
|
||||
if (!this.props.items || this.props.items.isEmpty()) {
|
||||
return React.DOM.div();
|
||||
}
|
||||
var items = this.props.items, epilog = Immutable.List();
|
||||
var idx = items.indexOf(null);
|
||||
if (idx !== -1) {
|
||||
epilog = items.slice(idx+1);
|
||||
items = items.take(idx);
|
||||
}
|
||||
return React.DOM.div(
|
||||
null,
|
||||
{className: 'entries-listing'},
|
||||
React.DOM.h4(null, this.props.heading, ':'),
|
||||
React.DOM.ul(
|
||||
null,
|
||||
this.props.items.map(function (item, index) {
|
||||
items.map(function (item, index) {
|
||||
return React.DOM.li({key: index}, item);
|
||||
})
|
||||
)
|
||||
),
|
||||
epilog.map(function (item, index) {
|
||||
return React.DOM.p({key: index}, item);
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user