1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00

add place holder for empty piece list

This commit is contained in:
Tim Daubenschütz 2015-06-30 13:32:41 +02:00
parent 1976dee57a
commit ea47f7a371
2 changed files with 6 additions and 2 deletions

View File

@ -16,6 +16,10 @@ let AccordionList = React.createClass({
{this.props.children}
</div>
);
} else if(this.props.itemList.length === 0) {
return (
<p className="text-center">You don't have any works yet...</p>
);
} else {
return (
<div className={this.props.className + ' ascribe-accordion-list-loading'}>

View File

@ -121,10 +121,10 @@ let FileDragAndDrop = React.createClass({
// Firefox only recognizes the simulated mouse click if bubbles is set to true,
// but since Google Chrome propagates the event much further than needed, we
// need to stop propagation as soon as the event is created
var evt = new MouseEvent("click", {
var evt = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true,
cancelable: true
});
evt.stopPropagation();
this.refs.fileinput.getDOMNode().dispatchEvent(evt);