Permalink
Browse files

Tasks: Pass a specific className in the Task internals

  • Loading branch information...
1 parent 697cc7e commit d333730b1daeb6119afd3750e9bb165e1f4b4a91 @cdujeu cdujeu committed Sep 30, 2016
Showing with 7 additions and 2 deletions.
  1. +7 −2 core/src/plugins/core.tasks/js/react/PydioTasks.js
@@ -46,6 +46,10 @@
return this._internal['statusMessage'];
}
+ getClassName(){
+ return this._internal['className'];
+ }
+
getData(){
return this._internal;
}
@@ -293,11 +297,12 @@
}
let click, clickStyle;
if(this.props.task.hasOpenablePane()){
- click = this.props.task.openDetailPane.bind(this);
+ click = this.props.task.openDetailPane;
clickStyle = {cursor:'pointer'};
}
+ let customClassName = this.props.task.getClassName() || '';
return (
- <div className={"task " + "task-status-" + this.props.task.getStatus()}>
+ <div className={"task " + "task-status-" + this.props.task.getStatus() + " " + customClassName}>
<div className="task_texts" onClick={click} style={clickStyle}>
<div className="task_label">{scopeInfo}{t.getLabel()}</div>
<div className="status_message" title={t.getStatusMessage()}>{t.getStatusMessage()}</div>

0 comments on commit d333730

Please sign in to comment.