diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-09-28 19:42:24 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-09-28 19:42:24 (GMT) |
commit | 4ff3a37b12f96b394b74e4fc215a2b41ba2aec67 (patch) | |
tree | 78dfa1d428394048873c5d3567938899e07ed771 | |
parent | 50f4c00f8f508635bef8ef0d56667279c3b6699f (diff) |
fixed week clock?
-rw-r--r-- | src/component-clock.js | 4 | ||||
-rw-r--r-- | www/js/calendar.js | 2 | ||||
-rw-r--r-- | www/js/components.js | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/component-clock.js b/src/component-clock.js index 40ea1a2..389efdc 100644 --- a/src/component-clock.js +++ b/src/component-clock.js @@ -46,6 +46,6 @@ var ClockView = React.createClass({ // weekspan.addClass('label-default').text('Fehler'); // } -function drawClock(date, time, week) { - ReactDOM.render(<ClockView date={date} time={time} week={week} />, document.getElementById('clock')); +function drawClock(date, time, week, element) { + ReactDOM.render(<ClockView date={date} time={time} week={week} />, element); } diff --git a/www/js/calendar.js b/www/js/calendar.js index 623d79a..21e2265 100644 --- a/www/js/calendar.js +++ b/www/js/calendar.js @@ -98,7 +98,7 @@ function calendar_init() { $('#calendar').on('wheel', calendar_scroll); current_week_offset = -4; clock.addCallback(function(date, time, week) { - draw_clock(date, time, week); + drawClock(date, time, week, $('#clock')); calendar_redraw(current_week_offset); }); } diff --git a/www/js/components.js b/www/js/components.js index 1636df5..be3f2bf 100644 --- a/www/js/components.js +++ b/www/js/components.js @@ -53,8 +53,8 @@ var ClockView = React.createClass({ // weekspan.addClass('label-default').text('Fehler'); // } -function drawClock(date, time, week) { - ReactDOM.render(React.createElement(ClockView, { date: date, time: time, week: week }), document.getElementById('clock')); +function drawClock(date, time, week, element) { + ReactDOM.render(React.createElement(ClockView, { date: date, time: time, week: week }), element); } },{}]},{},[1]); |