Small changes
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@@ -89,6 +89,8 @@
|
||||
"4p_van_de_mar_mountains": "Van de Mar Mountains (4)",
|
||||
"4p_sands_of_victory":"Sands of Victory (4)",
|
||||
"4p_antiga_bay":"Antiga Bay (4)",
|
||||
"4p_testcake":"Testcake [Rem] (4)",
|
||||
"4p_imperial_area":"Imperial Area [Ed] (4)",
|
||||
"4p_volcanic_reaction": "Volcanic Reaction (4)",
|
||||
"4p_broken_lands": "Broken Lands (4)",
|
||||
"5p_vyasastan": "Vyasastan (5)",
|
||||
|
||||
@@ -38,10 +38,10 @@ window.onload = function() {
|
||||
var lobbiesAsTableRows = _.reduce(this.lobbies, function (memo, lobby) {
|
||||
|
||||
var joinButton = (lobby.status === "NotStarted()") ? '<button class="btn btn-primary join-as-player" onclick="joinDecider(\''+lobby.lobbyActorName+'\')">' +
|
||||
'<img src="assets/images/buttons/isAuto.png" style="height: 25px;"> Join lobby <img src="assets/images/buttons/isAuto.png" style="height: 25px;">' +
|
||||
'<img src="/assets/images/buttons/isAuto.png" style="height: 25px;"> Join lobby <img src="/assets/images/buttons/isAuto.png" style="height: 25px;">' +
|
||||
'</button>' : "";
|
||||
var observerButton = '<button class="btn btn-success join-as-observer" onclick="observerDecider(\''+lobby.lobbyActorName+'\')">' +
|
||||
'<img src="assets/images/buttons/Ulthwe.png" style="height: 25px;"> Observer <img src="assets/images/buttons/Ulthwe.png" style="height: 25px;">' +
|
||||
'<img src="/assets/images/buttons/Ulthwe.png" style="height: 25px;"> Observer <img src="/assets/images/buttons/Ulthwe.png" style="height: 25px;">' +
|
||||
'</button>';
|
||||
|
||||
return memo + '<tr>\n' +
|
||||
@@ -118,12 +118,12 @@ window.onload = function() {
|
||||
message = JSON.parse(event.data);
|
||||
switch (message.type) {
|
||||
case "refreshLobby":
|
||||
renderMaps(message.lobby.maps);
|
||||
renderMaps(message.lobby.maps, message.lobby.status);
|
||||
renderPlayersAndStats(message.lobby);
|
||||
break;
|
||||
case "switchToLobby":
|
||||
console.log(message);
|
||||
switchToLobby(message.lobby.maps);
|
||||
switchToLobby(message.lobby.maps, message.lobby.status);
|
||||
renderPlayersAndStats(message.lobby);
|
||||
break;
|
||||
case "sendMessage":
|
||||
@@ -180,9 +180,9 @@ function changeNick() {
|
||||
|
||||
// -----ф-ии прихода с сервера
|
||||
|
||||
function switchToLobby(maps) {
|
||||
function switchToLobby(maps, status) {
|
||||
console.log(maps);
|
||||
renderMaps(maps);
|
||||
renderMaps(maps, status);
|
||||
$("#lobbies").hide();
|
||||
$(".navbar").hide();
|
||||
$("#decider").show();
|
||||
@@ -199,7 +199,7 @@ function disconnectLobby(error) {
|
||||
alert(error);
|
||||
}
|
||||
|
||||
function renderMaps(maps) {
|
||||
function renderMaps(maps, lobbyStatus) {
|
||||
var resHtml = "";
|
||||
|
||||
_.each(maps, function (map) {
|
||||
@@ -210,8 +210,9 @@ function renderMaps(maps) {
|
||||
banHtml = "<div class = 'banX'>✕</div>";
|
||||
banClass = "bannedMap";
|
||||
}
|
||||
|
||||
|
||||
if(lobbyStatus === "NotStarted()"){
|
||||
banClass = "bannedMap";
|
||||
}
|
||||
|
||||
resHtml = resHtml + '<div class="col-xs-4 col-md-3 col-lg-2"><button class = "mapSelect" onmousedown="banMap(\''+map.map+'\')">'+
|
||||
'<div class="mapImageAndText '+banClass+'">' +
|
||||
@@ -303,8 +304,8 @@ function renderPlayersAndStats(lobby) {
|
||||
disabledText = "disabled";
|
||||
}
|
||||
resHtml += "<br/><select class=\"form-control\" id = 'deciderOption' onChange='changeLobbyType()' "+disabledText+" >" +
|
||||
"<option "+last3Selected+" value = 'last3'>Play on last 3 maps</option>" +
|
||||
"<option "+last4Selected+" value = 'last4'>Play on last 4 maps</option>" +
|
||||
/*"<option "+last3Selected+" value = 'last3'>Play on last 3 maps</option>" +
|
||||
"<option "+last4Selected+" value = 'last4'>Play on last 4 maps</option>" +*/
|
||||
"<option "+looserPickSelected+" value = 'looserpick'>Decide first, then looserpick</option>" +
|
||||
"</select>"
|
||||
resHtml += "</div>";
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
.readyImg{
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#playerName{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.banX{
|
||||
font-size: 128px;
|
||||
margin-top: -174px;
|
||||
left: 34px;
|
||||
color: red;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.bannedMap{
|
||||
-webkit-filter: grayscale(1); /* Webkit браузеры */
|
||||
}
|
||||
|
||||
.mapSelect{
|
||||
margin: 4px;
|
||||
position:relative;
|
||||
width: 175px;
|
||||
height: 155px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@keyframes glowing {
|
||||
0% {
|
||||
box-shadow: 0 0 2px #074673;
|
||||
}
|
||||
50% {
|
||||
box-shadow: 0 0 9px #0e87de;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 2px #094d7d;
|
||||
}
|
||||
}
|
||||
|
||||
.warningButton {
|
||||
animation: glowing 1300ms infinite;
|
||||
}
|
||||
|
||||
#chat{
|
||||
width: 354px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#chatbox {
|
||||
text-align:left;
|
||||
margin:0 auto;
|
||||
margin-bottom:3px;
|
||||
padding:10px;
|
||||
background:#fff;
|
||||
height:200px;
|
||||
width:352px;
|
||||
border:1px solid #ACD8F0;
|
||||
overflow:auto; }
|
||||
|
||||
.inputMsg{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#usermsg {
|
||||
border: 1px solid #ACD8F0;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#exit{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#mapList {
|
||||
border: 1px solid #0f0f0f;
|
||||
padding: 10px;
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
|
||||
#submit { width: 60px; }
|
||||
|
||||
.error { color: #ff0000; }
|
||||
|
||||
#menu { padding:12.5px 25px 12.5px 25px; }
|
||||
@@ -1,145 +0,0 @@
|
||||
.perspective (@value) {
|
||||
-webkit-perspective: @value;
|
||||
-moz-perspective: @value;
|
||||
perspective: @value;
|
||||
}
|
||||
|
||||
.transform (@value) {
|
||||
-webkit-transform: rotateY(@value);
|
||||
-moz-transform: rotateY(@value);
|
||||
transform: rotateY(@value);
|
||||
}
|
||||
|
||||
.border-radius (@value) {
|
||||
-webkit-border-radius: @value;
|
||||
-moz-border-radius: @value;
|
||||
border-radius: @value;
|
||||
}
|
||||
|
||||
|
||||
#lobbies {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.flip-container {
|
||||
.perspective(1000);
|
||||
margin-bottom: 20px;
|
||||
&:hover .flipper {
|
||||
.transform(10deg);
|
||||
}
|
||||
&.flipped .flipper {
|
||||
.transform(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.flipper {
|
||||
height: 250px;
|
||||
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
.border-radius(4px);
|
||||
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-transition: 0.6s;
|
||||
-moz-transition: 0.6s;
|
||||
transition: 0.6s;
|
||||
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
|
||||
&:after {
|
||||
content: attr(data-content);
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
padding: 3px 7px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ddd;
|
||||
color: #9da0a4;
|
||||
|
||||
.border-radius(4px 0 4px 0);
|
||||
}
|
||||
}
|
||||
|
||||
.readyImg{
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#playerName{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.banX{
|
||||
font-size: 128px;
|
||||
margin-top: -174px;
|
||||
left: 34px;
|
||||
color: red;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.bannedMap{
|
||||
-webkit-filter: grayscale(1); /* Webkit браузеры */
|
||||
}
|
||||
|
||||
.mapSelect{
|
||||
margin: 4px;
|
||||
position:relative;
|
||||
width: 175px;
|
||||
height: 155px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@keyframes glowing {
|
||||
0% {
|
||||
box-shadow: 0 0 2px #074673;
|
||||
}
|
||||
50% {
|
||||
box-shadow: 0 0 9px #0e87de;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 2px #094d7d;
|
||||
}
|
||||
}
|
||||
.warningButton {
|
||||
animation: glowing 1300ms infinite;
|
||||
}
|
||||
|
||||
#chat{
|
||||
width: 354px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#chatbox {
|
||||
text-align:left;
|
||||
margin:0 auto;
|
||||
margin-bottom:3px;
|
||||
padding:10px;
|
||||
background:#fff;
|
||||
height:200px;
|
||||
width:352px;
|
||||
border:1px solid #ACD8F0;
|
||||
overflow:auto; }
|
||||
|
||||
.inputMsg{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#usermsg {
|
||||
border: 1px solid #ACD8F0;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
|
||||
#submit { width: 60px; }
|
||||
|
||||
.error { color: #ff0000; }
|
||||
|
||||
#menu { padding:12.5px 25px 12.5px 25px; }
|
||||
Reference in New Issue
Block a user