summaryrefslogtreecommitdiff
path: root/src/component-clock.js
blob: 40ea1a2c15b5468ed133e9a75787a9b774a4a8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 *  rhrdweb
 *
 *  Copyright (C) 2016 Christian Pointner <equinox@helsinki.at>
 *
 *  This file is part of rhrdweb.
 *
 *  rhrdweb is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  any later version.
 *
 *  rhrdweb is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with rhrdweb. If not, see <http://www.gnu.org/licenses/>.
 */

var ClockView = React.createClass({
  render: function() {
    return (
           // <span class="current-week label">Woche {this.props.week}</span>
           // <span class="clock-date">{this.props.date}</span>
           <span class="clock-time">{this.props.time}</span>
    );
  }
});

  // switch(week) {
  //   case 1:
  //     weekspan.addClass('label-info').text('Woche 1');
  //     break;
  //   case 2:
  //     weekspan.addClass('label-warning').text('Woche 2');
  //     break;
  //   case 3:
  //     weekspan.addClass('label-success').text('Woche 3');
  //     break;
  //   case 4:
  //     weekspan.addClass('label-danger').text('Woche 4');
  //     break;
  //   default:
  //     weekspan.addClass('label-default').text('Fehler');
  // }

function drawClock(date, time, week) {
    ReactDOM.render(<ClockView date={date} time={time} week={week} />, document.getElementById('clock'));
}