diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/index.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/index.html index 34b7a07a9..a9487a19a 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/index.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/index.html @@ -41,17 +41,31 @@ $(document).ready( function() { - var hall = new GempLotrHallUI($("#hall"), "/gemp-lotr/server"); + if (getUrlParam("participantId") == null) { + $("#hall").append("Enter your assigned name and press DONE, you have to open one page for each user you want to use now.
"); + $("#hall").append(" "); + var but = $(""); + $("#hall").append(but); + but.click( + function() { + location.href = "/gemp-lotr/index.html?participantId=" + $("#name").val(); + }); + } else { + var participantId = getUrlParam("participantId"); + $("#user").append("You are logged in as " + participantId + ", create a table or join one where other player is waiting."); - var chat = new ChatBoxUI("default", $("#chat"), "/gemp-lotr/server"); - chat.setBounds(2, 2, 780 - 4, 200 - 4); + var hall = new GempLotrHallUI($("#hall"), "/gemp-lotr/server"); + + var chat = new ChatBoxUI("default", $("#chat"), "/gemp-lotr/server"); + chat.setBounds(2, 2, 780 - 4, 200 - 4); + } }); - -
-
+
+
+
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js index 8f09feef4..488374db1 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js @@ -82,7 +82,7 @@ var GempLotrHallUI = Class.extend({ createTableDiv: function(id, status, players) { var tableDiv = $("
"); - tableDiv.css({ display: "inline", width: "120px", height: "120px", margin: "5px", "background-color": "#333300", color: "#ffffff"}); + tableDiv.css({ display: "inline-block", width: "120px", height: "120px", margin: "5px", "background-color": "#333300", color: "#ffffff"}); tableDiv.append("" + status + "
"); tableDiv.append("Players:
"); for (var i = 0; i < players.length; i++)