Skip to content
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
Binary file added I_am_jarvis.mp3
Binary file not shown.
Binary file added Robotic_Countdown.mp3
Binary file not shown.
125 changes: 117 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,127 @@
<html>
<head>
<title>Task Manager</title>
<link rel="stylesheet" href="style.css"></link>
<script type="text/javascript" src="./script.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="style.css"/>
<style>

#cover
{
z-index: 10000;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #FFFFFF;

}

#counter
{
color: #02FEFF;
font-size: 1000%;
border:#02FEFF 4px solid ;
background: transparent;
height: 300px;
width: 300px;
position: absolute;
top: 20%;
left: 38.5%;
float: left;
border-radius: 150px;
text-align: center;
margin: auto;
display: none;


}

#cv
{
position: relative;
top: 18%;
}

#taskAdder
{
border: 4px solid #02FEFF;
width:310px;
height: 310px;
border-radius: 155px;
position: fixed;
top: 20%;
left: 37%;
}

#pword
{
position: absolute;
top: 30%;
margin-left: 25%;
width: 60%;
}

#incomplete
{
position: absolute;
left: 37%;
top: 45%;
width: 15%;
padding: 5px;
text-align: center;
height: 5%;
border: 2px solid #02FEFF;
border-radius: 10px;
}

#complete
{
position: absolute;
right: 37%;
top: 45%;
width: 15%;
padding: 5px;
text-align: center;
height: 5%;
border: 2px solid #02FEFF;
border-radius: 10px;
}

</style>

<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<script type="text/javascript" src="script.js"></script>

</head>
<body>
<div style="width:60%;margin-left:20%">

<div id="cover" style="color: #02FEFF; text-align: center;">
<h1>WELCOME TO JARVIS TASK MANAGER.</h1>
<div id="counter">
<span id="cv"></span>
</div>
</div>

<div id="taskAdder">
<div id="myDIV" class="header">
<h1>Task Manager</h1>
<input type="text" id="myInput" placeholder="Task">
<div onclick="newElement()" class="addBtn">Add</div>
<input type="text" id="myInput" placeholder="Your Task Here"/>
<div onclick="newElement()" class="addBtn">+</div>
</div>
<ul id="myUL" style="list-style-type:none">
</ul>
</div>

<div id="incomplete" style="color: #02FEFF;" border="1">
<center><table id="todoTable" style="color: #02FEFF;text-align: center;">
<tr><th>TODO TASKS</th></tr>
</table></center>
</div>
<div id="complete" style="color: #02FEFF;" border="1">
<center><table id="completeTable" style="color: #02FEFF;">
<tr><th>COMPLETED</th></tr>
</table></center>
</div></div>

</body>
</html>
</html>
Binary file added jarvis_assist.mp3
Binary file not shown.
4 changes: 4 additions & 0 deletions jquery-1.11.0.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions jquery-ui.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
== Please use to application in the browser other than Google Chrome if you are running the application on a local machine
because Chrome doesn't allow Cookies storage on local environment.

default password = 1234
145 changes: 140 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,145 @@
$(function(){
//deleteAllCookies();
//alert(document.cookie.length);
//document.cookie.clear();
if(sessionStorage.jarvis != "1")
{
jarvis_intro();
sessionStorage.clear();
sessionStorage.setItem("jarvis","1");
}
else
{
$("#cover").remove();
}

$("#incomplete").animate({
'left':'5%',
'top':'5%'
});

$("#complete").animate({
'right':'5%',
'top':'5%'
});

$("#taskAdder").animate({
'top':'40%'
});


for(i=1;i<=document.cookie.length;i++)
{
$("#todoTable").append('<tr><td>' + getCookie("task"+i) + '</td></tr>');
}

});

function jarvis_intro()
{
audio = new Audio();
audio.src = "Robotic_Countdown.mp3";
audio.play();

intro = new Audio();
intro.src = "I_am_jarvis.mp3";

assist = new Audio();
assist.src = "jarvis_assist.mp3";

$("#cover").animate({
backgroundColor:"#000000"
});



setTimeout(function()
{
$('#counter').fadeIn();
var c = 5;
$("#cv").html(c);

setInterval(function()
{
if(c > 1)
{
$('#cv').html(--c);
}
else
{
clearInterval();
}
},1000);

},4000)

setTimeout(function(){
$('#cover').html('<h1>ENTER THE PASSWORD</h1><div id="pword"><input type="password" id="pass" class="input" /><button id="btn" class="addBtn" style="border: none;">Enter</button></div>');
$("#btn").click(function()
{
if($("#pass").val() == "1234")
{
intro.play();
$("#cover").html('<span style="font-size: 500%;" id="jar">I AM JARVIS.<br/> <br/>I AM HERE TO ASSIST YOU.</span>');
setTimeout(function(){
assist.play();
$("#cover>span").append("<br/><br/>WITH VARITIES OF TASKS.");
setTimeout(function()
{
$("#cover>span").append("<br/>24 HRS A DAY 7 DAYS A WEEK.");

},3500);
},4000);
setTimeout(function()
{
$("#cover").remove();
},10000);
}
});
},8500);

}

function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}




// This function creates a new list item when `add button` is clicked
function newElement() {
var li = document.createElement("li");
var inputValue = document.getElementById("myInput").value;
var t = document.createTextNode(inputValue);
li.appendChild(t);
document.getElementById("myUL").appendChild(li);
document.getElementById("myInput").value = "";
}

if(/\S/.test(inputValue)) // Checking if the task field is empty.
{
c = (document.cookie.length + 1);
setCookie("task"+c,inputValue,1);
$("#todoTable").append('<tr><td>' + inputValue + '</td></tr>');

}
else
{
alert("Please Enter Some Task.");
}
}

21 changes: 13 additions & 8 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
}

body{
background-color: #253a66;
background-color: #000000;
font-family: Roboto Condensed,sans-serif;
}

ul {
Expand Down Expand Up @@ -34,8 +35,9 @@ ul li:hover {

.header {

padding: 30px 40px;
color: white;
position: relative;
top: 27%;
color: #02FEFF;
text-align: center;
}

Expand All @@ -46,23 +48,26 @@ ul li:hover {
}
input {
border: none;
width: 75%;
width: 60%;
padding: 10px;
margin-left: 25px;
float: left;
font-size: 16px;
}

.addBtn {
padding: 10px;
width: 25%;
background: #d9d9d9;
color: #555;
background: #02FEFF;
color: #000000;
float: left;
text-align: center;
font-size: 16px;
font-size: 100%;
height: 38px;
font-weight: bolder;
cursor: pointer;
transition: 0.3s;
}
.addBtn:hover {
background-color: #bbb;
}
}