Fixing few extra bugs.
This commit is contained in:
@@ -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.<br/>");
|
||||
$("#hall").append("<input id='name' type='text'> ");
|
||||
var but = $("<button>DONE</button>");
|
||||
$("#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 <b>" + participantId + "</b>, 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);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="hall" style="position:absolute;left:0px;top:0px;width:780px;height:300px;"></div>
|
||||
<div id="chat" style="position:absolute;left:0px;top:300px;width:780px;height:200px;"></div>
|
||||
<div id="user" style="position:absolute;left:0px;top:0px;width:780px;height:20px;"></div>
|
||||
<div id="hall" style="position:absolute;left:0px;top:20px;width:780px;height:300px;"></div>
|
||||
<div id="chat" style="position:absolute;left:0px;top:320px;width:780px;height:200px;"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -82,7 +82,7 @@ var GempLotrHallUI = Class.extend({
|
||||
|
||||
createTableDiv: function(id, status, players) {
|
||||
var tableDiv = $("<div></div>");
|
||||
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("<i>" + status + "</i><br/>");
|
||||
tableDiv.append("Players:<br/>");
|
||||
for (var i = 0; i < players.length; i++)
|
||||
|
||||
Reference in New Issue
Block a user