summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/component-clock.js4
-rw-r--r--www/js/calendar.js2
-rw-r--r--www/js/components.js4
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]);