[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:
Xavier Morel 2015-03-16 10:27:15 +01:00
parent 32493c9c0f
commit a0601d909f
2 changed files with 16 additions and 3 deletions

View File

@ -98,6 +98,10 @@
}
}
.journal-entries .entries-listing p {
font-style: italic;
}
#reconciliation #example div.buttons {
display: flex;
justify-content: center;

View File

@ -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);
})
);
}
});