client/src/components/Note.js
changeset 170 7da1d5137b0b
parent 166 950a2350930f
child 171 03334a31130a
equal deleted inserted replaced
169:f98efa1bddd1 170:7da1d5137b0b
    54     return (
    54     return (
    55       <div className="note-content w-100 pl-2 pt-2" dangerouslySetInnerHTML={{ __html: this.props.note.html }} />
    55       <div className="note-content w-100 pl-2 pt-2" dangerouslySetInnerHTML={{ __html: this.props.note.html }} />
    56     )
    56     )
    57   }
    57   }
    58 
    58 
    59   // renderNoteMarginComment() {
       
    60   //   if (this.props.isEditing) {
       
    61   //     return (
       
    62   //       <div className="row">
       
    63   //       <div className="note-margin-comment w-25 mt-3">
       
    64   //         <input type="text" className="form-control"
       
    65   //           name="margin"
       
    66   //           componentClass="textarea"
       
    67   //           placeholder="Espace pour un commentaire de marge"
       
    68   //           defaultValue={ this.props.note.marginComment }
       
    69   //           // inputRef={ ref => { this.marginComment = ref; } } />
       
    70   //           ref={(marginComment) => { this.marginComment = marginComment; }} />
       
    71   //       </div>
       
    72   //       </div>
       
    73   //     )
       
    74   //   }
       
    75 
       
    76     // return (
       
    77     //   <div className="note-margin-comment w-25 mt-5">
       
    78     //     <small className="text-muted">{ this.props.note.marginComment }</small>
       
    79     //   </div>
       
    80     // )
       
    81   // }
       
    82 
       
    83   renderNoteRight() {
    59   renderNoteRight() {
    84     if (this.props.isEditing) {
    60     if (this.props.isEditing) {
    85       return (
    61       return (
    86         <a onClick={this.onClickClose}>
    62         <a onClick={this.onClickClose}>
    87           <span className="material-icons pl-2">close</span>
    63           <span className="material-icons pl-2">close</span>
    99   render() {
    75   render() {
   100     return (
    76     return (
   101     <div id={"note-" + this.props.note._id} className="note text-sm mr-5 pt-1"
    77     <div id={"note-" + this.props.note._id} className="note text-sm mr-5 pt-1"
   102     onClick={ this.props.onClick }>
    78     onClick={ this.props.onClick }>
   103       <div className="mr-5">
    79       <div className="mr-5">
   104         <small className="start text-warning pt-2">{ formatTimestamp(this.props.note.startedAt) }</small>
    80         <small className="start text-irinotes-time pt-2">{ formatTimestamp(this.props.note.startedAt) }</small>
   105         <small className="finish text-warning pb-2">{ formatTimestamp(this.props.note.finishedAt) }</small>
    81         <small className="finish text-irinotes-time pb-2">{ formatTimestamp(this.props.note.finishedAt) }</small>
   106       </div>
    82       </div>
   107         { this.renderNoteContent() }
    83         { this.renderNoteContent() }
   108         {/* { this.renderNoteMarginComment() } */}
    84         {/* { this.renderNoteMarginComment() } */}
   109         <div className="float-right">
    85         <div className="float-right">
   110         { this.renderNoteRight() }
    86         { this.renderNoteRight() }