diff --git a/app.js b/app.js index b36c69c..f2fce19 100644 --- a/app.js +++ b/app.js @@ -69,12 +69,13 @@ const templateTodoTasks = () => { // Map each task to a list item const taskList = todoTasks .map((task, index) => { - return `
  • ${task}
  • `; + return `
    `; + //
  • ${task}
  • }) .join(""); // Return an ordered list with all the tasks - return `
      ${taskList}
    `; + return taskList; }; /** @@ -262,6 +263,7 @@ const markTaskComplete = currentTask => { * @param {Event} event */ const clickDelegator = event => { + if (event.target.hasAttribute("data-reset")) { clearInterval(); timerData.timer = 1500; @@ -281,12 +283,11 @@ const clickDelegator = event => { } if (event.target.hasAttribute("data-task")) { - console.log("Adding Task"); addTask(); } if (event.target.hasAttribute("data-item")) { - setCurrentTask(event.target.innerText); + setCurrentTask(event.target.value); } if (event.target.hasAttribute("data-current-task")) { diff --git a/index.html b/index.html index 20cbd3a..4c9497e 100644 --- a/index.html +++ b/index.html @@ -34,16 +34,18 @@

    Pompom

    -
    Add tasks to todo and then click on the item below to use as current item
    +
    Add tasks to todo
    -
    -

    Todo List

    -
    +
    +

    Todo List

    +
    Select a task below to use as current item
    +
    -
    +

    Completed Tasks

    -
    +
    Tasks completed will be listed below
    +