Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asked for how long each task should take #110

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nginx/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ <h3 id="message">Welcome!</h3>

<label for="title">Title: </label><input type="text" id="title"/><br/>
<label for="desc">Description: </label><input type="text" id="desc"/><br/>
<label for="day">Amount of Days It Should Take: </label><input type="text" id="day"/><br/>
<label for="hour">Amount of Hours It Should Take: </label><input type="text" id="hour"/><br/>
<label for="minute">Amount of Minutes It Should Take: </label><input type="text" id="minute"/><br/>
<button onclick="addTask();">Add Task</button>
<br/><br/>

Expand Down
5 changes: 4 additions & 1 deletion nginx/public/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ function displayTasks(tasksJSON) {
let formattedTasks = "";
for (const task of tasks) {
formattedTasks += "<hr/>";
formattedTasks += "<b>" + task['title'] + "</b> - " + task['description'] + "<br/>";
formattedTasks += "<b>" + task['title'] + "</b> - " + task['description'] + " - " + " should finish in "
+ document.getElementById("day").value + " days and "
+ document.getElementById("hour").value + " hours and "
+ document.getElementById("minute").value + " minutes " + "<br/>";
formattedTasks += "<button onclick='completeTask(\"" + task['id'] + "\")'>Task Complete</button>";
}
document.getElementById("tasks").innerHTML = formattedTasks;
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/model/TodoServer.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package model
package model

import com.corundumstudio.socketio.listener.{ConnectListener, DataListener}
import com.corundumstudio.socketio.{AckRequest, Configuration, SocketIOClient, SocketIOServer}
Expand Down