diff --git a/index.html b/index.html index 47f39d4..f4b2f67 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,20 @@ - -

todo!

- \ No newline at end of file + + + + + + WhatTo.Do + + +
A Simple Task Reminder +

+ + + + +

+
+
+
Total Work pending :
+ + diff --git a/main.css b/main.css index cdda92f..0dc1c9a 100644 --- a/main.css +++ b/main.css @@ -1,3 +1,21 @@ -body { - padding: 20px; -} \ No newline at end of file +.add { + background-color:#44c767; + border: transparent; + font-family:Arial; + font-size:17px; + padding:3px 6px; +} +.delete { + background-color:#e4685d; + border: transparent; + font-family:Arial; + font-size:17px; + padding:3px 6px; +} +.imp{ + background-color:#ece8d5; + border: transparent; + font-family:Arial; + font-size:17px; + padding:3px 6px; +} diff --git a/main.js b/main.js index c80ec08..a52587b 100644 --- a/main.js +++ b/main.js @@ -1 +1,84 @@ -console.log('test'); \ No newline at end of file +var totall=0; +function add() +{ + if(document.getElementById('txt1').value ==""){ + return; + } + var table = document.getElementById('List'); + var No = table.rows.length; + var row = table.insertRow(No); + var tempText=document.getElementById('txt1').value; + var cell1 = row.insertCell(0); + var str = document.createElement("input"); + // To Do Text for list + str.type = "text"; + str.style.width="100%"; + str.name = "txt"; + str.value=tempText; + cell1.appendChild(str); + // checkbox + var cell2 = row.insertCell(1); + var cb = document.createElement("input"); + cb.type = "checkbox"; + cb.name="chkbox"; + cell2.appendChild(cb); + document.getElementById('txt1').value=""; + document.getElementById('Total').innerHTML= ++totall; +} +function imp() +{ + if(document.getElementById('txt1').value ==""){ + return; + } + var table = document.getElementById('Implist'); + var No = table.rows.length; + var row = table.insertRow(No); + var tempText=document.getElementById('txt1').value; + var cell1 = row.insertCell(0); + var str = document.createElement("input"); + // To Do Text for Imp list + str.type = "text"; + str.style.width="100%"; + str.style.background = "#fff0b2"; + str.name = "txt"; + str.value=tempText; + cell1.appendChild(str); + // checkbox + var cell2 = row.insertCell(1); + var cb = document.createElement("input"); + cb.type = "checkbox"; + cb.name="chkbox"; + cell2.appendChild(cb); + document.getElementById('txt1').value=""; + document.getElementById('Total').innerHTML= ++totall; +} +function delete1() +{ + //Delete from regular list + var table = document.getElementById('List'); + var rowNo = table.rows.length; + for(var i=0; i