diff --git a/src/web/module/maestro_section_record.html b/src/web/module/maestro_section_record.html index a279431..ee7bad0 100644 --- a/src/web/module/maestro_section_record.html +++ b/src/web/module/maestro_section_record.html @@ -252,7 +252,8 @@ function requestPlayerRecordList() { + "&PlayerNameList=" + playerNameList + "&AppID=" + appID, (function(jsonData) { - console.log(jsonData); + // console.log(jsonData); + makeRecordTableContent(jsonData["RecordList"]); }), (function(errorMessage, errorCode) { @@ -263,6 +264,47 @@ function requestPlayerRecordList() { } +function makeRecordTableContent(recordList) { + $("#record_table_content").empty(); + + if(recordList == null || recordList.length == 0) { + showNoResultContent(); + return; + } + + console.log(recordList); + for(var i = 0; i < recordList.length; i++) { + var recordData = recordList[i]; + addRecordListItem( + recordData.Date, + recordData.Time, + recordData.PlayerName, + recordData.Subject, + recordData.Record + ); + } +} + +function showNoResultContent() { + $("#record_table_content").append('\ + \ + 데이터가 없습니다.\ + \ + '); +} + +function addRecordListItem($date, $time, $name, $subject, $record) { + $("#record_table_content").append('\ + \ + ' + $date + '\ + ' + $time + '\ + ' + $name + '\ + ' + $subject + '\ + ' + $record + '\ + \ + '); +} + @@ -400,7 +442,7 @@ function requestPlayerRecordList() { 점수 - + 2019-03-27