Difference between revisions of "User:Vinoo/SafetyJSON"

m
m
Line 30: Line 30:
 
}
 
}
  
function get_sub_form_list(form_info) {
+
function get_sub_form_list(form_info, teamid) {
  
 
jQuery.ajax({
 
jQuery.ajax({
Line 36: Line 36:
 
method: "POST",
 
method: "POST",
 
timeout: 30000,
 
timeout: 30000,
data: {command: "get_sub_form_list", form_name: "2016_check_in", team_id: 1917},
+
data: {command: "get_sub_form_list", form_name: "2016_check_in", team_id: teamid},
 
dataType: "json",
 
dataType: "json",
 
error: function(jqxhr, textStatus, errorThrown) {  
 
error: function(jqxhr, textStatus, errorThrown) {  
Line 42: Line 42:
 
},
 
},
 
success: function(data, textStatus, jqXHR) {
 
success: function(data, textStatus, jqXHR) {
console.log(JSON.stringify(data));
+
JSON.stringify(data);
 
}
 
}
 
})
 
})
Line 65: Line 65:
  
 
team_data.forEach(function(team) {
 
team_data.forEach(function(team) {
teamList += "<tr id='" + team.id + "'><td>" + team.name + "</td><td>" + team.country + "</td><td>" + team.kind + "</td><td> ~ </td></tr>";
+
teamList += "<tr id='" + team.id + "'><td>" + team.name + "</td><td>" + team.country + "</td><td>" + team.kind + "</td><td>" + get_sub_form_list(form_info, team.id); + "</td></tr>";
 +
 
  
 
});
 
});
 
$("#teamListRows").append(teamList);
 
$("#teamListRows").append(teamList);
get_sub_form_list(form_info);
+
 
}
 
}
  

Revision as of 16:04, 29 September 2017

Team Name Country* Kind Check-Ins