Skip to content

Commit

Permalink
styleand cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lduboeuf committed Dec 7, 2016
1 parent b3188e5 commit 942c77f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 78 deletions.
65 changes: 0 additions & 65 deletions js/mustache.js

This file was deleted.

7 changes: 3 additions & 4 deletions js/team-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ app.page("team-add", function()
e.preventDefault();
if (nameInput.value.length>0){
TeamRepository.save({ "name": nameInput.value});
//refresh view
//hack:..., not compatible old browser grrr.....
history.pushState(null, null, "#team-list");
app("team-list");

history.back();

}else {
//handle error msg
}
Expand Down
19 changes: 12 additions & 7 deletions js/team-member-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ app.page("team-member-details", function()
e.preventDefault();
var member = TeamRepository.findById(parseInt($id.value));
member.name = $name.value;

TeamRepository.save(member);
history.pushState(null, null, "#team-list");
app("team-list");
history.back();
//history.pushState(null, null, "#team-list");
//app("team-list");

}

removeBtn.onclick = function(e){
e.preventDefault();
TeamRepository.remove(parseInt($id.value));
//TODO handle error
history.pushState(null, null, "#team-list");
app("team-list");
var res = window.confirm("are you sure you want to remove "+ $name.value);
if (res){
TeamRepository.remove(parseInt($id.value));
//TODO handle error
history.back();
}

//history.pushState(null, null, "#team-list");
//app("team-list");
}

// present the view - load data and show:
Expand Down
6 changes: 6 additions & 0 deletions styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ h3 { font-size: 1em; }
background-color: #D9EDF7;
color:#31708f;
border: 1px solid #31708f;
border-radius: 4px;
}
.alert-closebtn {
margin:2px;
Expand Down Expand Up @@ -117,6 +118,11 @@ ul.topnav li.icon {display: none;}
text-align: left;
}
}
.link-home {
color:#000;
text-decoration: none;
padding-right: 12px;
}

/***end menu style**/
select{
Expand Down
2 changes: 1 addition & 1 deletion tpl/team-add.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<h3>Add a member</h3>
<h2><a href="javascript:void(0);" onclick="history.back();" class="link-home">&#8592;</a>Add a member</h2>
<form>
<div class="form-group">
<input name="member-name" type="text" placeholder="name" required=""/>
Expand Down
2 changes: 1 addition & 1 deletion tpl/team-member-details.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<h2>Member Details</h2>
<h2><a href="javascript:void(0);" onclick="history.back();" class="link-home">&#8592;</a>Member Details</h2>

<form>
<input type="hidden" name="id" />
Expand Down

0 comments on commit 942c77f

Please sign in to comment.