Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Commit

Permalink
fixed a few bugs including the itemId
Browse files Browse the repository at this point in the history
  • Loading branch information
fleeting committed May 8, 2010
1 parent e175554 commit 6a84cbd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions css/screen.css
Expand Up @@ -215,7 +215,7 @@ em {
font-style: italic;
}

button {
input[type=submit], button {
background: #4a6c9b;
background: -webkit-gradient(linear, left top, left bottom, from(#8ea4c1), to(#4a6c9b));
background: -moz-linear-gradient(top, #8ea4c1, #4a6c9b);
Expand All @@ -231,7 +231,7 @@ button {
cursor: pointer;
}

button:hover, button:focus {
input[type=submit]:hover, input[type=submit]:focus, button:hover, button:focus {
background: #4a6c9b;
background: -webkit-gradient(linear, left bottom, left top, from(#8ea4c1), to(#4a6c9b));
background: -moz-linear-gradient(top, #8ea4c1, #4a6c9b);
Expand Down
10 changes: 5 additions & 5 deletions index.html
Expand Up @@ -42,11 +42,11 @@
<button type="button" id="aboutButton">About</button>
<h1>monkeeTime</h1>

<form id="logForm" onsubmit="addNewItem()">
<input type="text" name="name" id="name" autocorrect placeholder="Project Name">
<input type="number" name="hours" id="hours" placeholder="Hours">
<input type="text" name="date" id="date" placeholder="Date">
<button type="button">Log Time</button>
<form id="logForm">
<input type="text" name="project" id="project" value="Project Name">
<input type="number" name="hours" id="hours" value="Hours">
<input type="text" name="date" id="date" value="Date">
<input type="submit" value="Log Time">
</form>
</header>

Expand Down
9 changes: 5 additions & 4 deletions scripts/monkeeTime.js
Expand Up @@ -22,12 +22,13 @@ $(document).ready(function() {
getAllItems();

$("#logForm").submit(function(){
var itemId = localStorage.length+1;
var newDate = new Date();
var itemId = newDate.getTime();

var values = new Array();
var name = $("#name").val();
var hours = $("#hours").val();
var date = $("#date").val();
var name = $("input[name='project']").val();
var hours = $("input[name='hours']").val();
var date = $("input[name='date']").val();

//strip html tags.
name = name.replace(/(<([^>]+)>)/ig, "");
Expand Down

0 comments on commit 6a84cbd

Please sign in to comment.