Skip to content

Commit

Permalink
correct team list refresh pb
Browse files Browse the repository at this point in the history
  • Loading branch information
lduboeuf committed Dec 3, 2016
1 parent 5ea7d53 commit ebe8bdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions js/team-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
app.page("team-list", function()
{

var tpl = document.querySelector('ul.teamlist');
var peoples = TeamRepository.getPeoples();
console.log(peoples);
if (!peoples) {
peoples = [];
}
var olist = document.querySelector('ul.teamlist');
var tpl = olist.innerHTML;



return function(params) {
var output = mustache(tpl.innerHTML,{ peoples: peoples });
tpl.innerHTML = output;
console.log('kikou');
var peoples = TeamRepository.getPeoples();

if (!peoples) {
peoples = [];
}

var output = mustache(tpl,{ peoples: peoples });
olist.innerHTML = output;
}
});
1 change: 1 addition & 0 deletions js/team-repository.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//TODO object in memory
var TeamRepository = {

STORE_NAME : 'peoples',
Expand Down

0 comments on commit ebe8bdd

Please sign in to comment.