Fix: show player count

This commit is contained in:
2018-08-02 17:57:07 +09:00
parent fd87b6fe45
commit e7e7df703e
2 changed files with 12 additions and 2 deletions
@@ -1,5 +1,9 @@
<script> <script>
$(document).ready(function() {
$("#maestro_name").focus();
});
function login() { function login() {
let name = $("#maestro_name").val(); let name = $("#maestro_name").val();
let password = $("#password").val(); let password = $("#password").val();
+8 -2
View File
@@ -14,7 +14,13 @@ $(document).ready(function() {
function onLoadSuccessMaestroInfo() { function onLoadSuccessMaestroInfo() {
$("#maestro_info_id").text(maestroInfo.maestroName + "님, 환영합니다."); $("#maestro_info_id").text(maestroInfo.maestroName + "님, 환영합니다.");
$("#maestro_info_player_count").text("학생수 : " + maestroInfo.getRegisteredPlayerCount() + " / " + maestroInfo.getMaxPlayerCount()); $("#maestro_info_player_count").val("학생수 : " + maestroInfo.getRegisteredPlayerCount() + " / " + maestroInfo.getMaxPlayerCount());
if(maestroInfo.getRegisteredPlayerCount() === maestroInfo.getMaxPlayerCount()) {
$("#maestro_info_player_count").addClass("text-danger borer-danger");
} else if(maestroInfo.getRegisteredPlayerCount() + 5 > maestroInfo.getMaxPlayerCount()) {
$("#maestro_info_player_count").addClass("text-danger");
}
} }
function onLoadFailMaestroInfo(errorMessage, errorCode) { function onLoadFailMaestroInfo(errorMessage, errorCode) {
@@ -43,7 +49,7 @@ function onClickMaestroUpgrade() {
<div class="eyebrow ml-auto mt-0 d-md-flex align-items-center"> <div class="eyebrow ml-auto mt-0 d-md-flex align-items-center">
<div class="input-group my-auto"> <div class="input-group my-auto">
<input type="text" class="form-control" value="학생수 :"> <input type="text" id="maestro_info_player_count" class="form-control" value="학생수 :">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-primary px-3 mr-2" type="button" onClick="location.href='./../maestro/upgrade.html';">업그레이드</a> <button class="btn btn-primary px-3 mr-2" type="button" onClick="location.href='./../maestro/upgrade.html';">업그레이드</a>
</div> </div>