summaryrefslogtreecommitdiff
path: root/www/js/components.js
blob: be3f2bfb520d570256481fa8cd01b38d8c570e2b (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
52
53
54
55
56
57
58
59
60
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
 *  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({
  displayName: "ClockView",

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

// 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, element) {
  ReactDOM.render(React.createElement(ClockView, { date: date, time: time, week: week }), element);
}

},{}]},{},[1]);