From 5a56144e2c09164cf5b169d8f0cf5c159c7d8a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Fri, 29 Mar 2019 08:36:22 +0900 Subject: [PATCH] Add: make record table content and show --- src/web/module/maestro_section_record.html | 46 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) 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