Add: typing practice app button

This commit is contained in:
2018-06-03 15:15:48 +09:00
parent e3bcd3bb12
commit 024145b609
4 changed files with 136 additions and 16 deletions
+17
View File
@@ -81,6 +81,23 @@ class DBConnectManager {
xhr.send("maestro_id=" + maestroID);
}
requestTypingPracticeAppList(maestroID, onSucceededListener, onFailedListener) {
let xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/app/active_typing_practice_app.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON.length > 0)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID);
}
requestPlayerHistory(maestroID, date, listener) {
let historyRecordManager = new HistoryRecordManager();