aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile16
-rw-r--r--src/client/javascript/schedule.js7
2 files changed, 18 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..6c51af4
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,16 @@
+FROM ubuntu
+
+RUN apt-get update
+RUN apt-get install -y curl build-essential apt-transport-https
+RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
+RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
+RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
+RUN apt-get install -y nodejs yarn
+
+COPY . /var/www
+WORKDIR /var/www
+
+ENV PORT=80
+EXPOSE 80
+
+CMD yarn start
diff --git a/src/client/javascript/schedule.js b/src/client/javascript/schedule.js
index 38ad66d..11a2aa8 100644
--- a/src/client/javascript/schedule.js
+++ b/src/client/javascript/schedule.js
@@ -56,23 +56,20 @@ self._removeChilds = function () {
self.viewItem = function (week, selectedUser) {
if (selectedUser == null) {
self._removeChilds()
- search.updateDom(selectedUser)
} else if (VALID_WEEK_NUMBERS.indexOf(week) === -1) {
self._handleError({ target: { status: 404 } });
- return
} else {
const url = self._getURLOfUser(week, selectedUser)
self._removeChilds()
-
const request = new window.XMLHttpRequest()
request.addEventListener('load', self._handleLoad)
request.addEventListener('error', self._handleError)
request.open('GET', url, true)
request.send()
-
- search.updateDom(selectedUser)
}
+
+ search.updateDom(selectedUser)
}
module.exports = self