1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-11-20 11:26:54 +00:00

minor fixes

This commit is contained in:
exane 2015-06-27 15:08:35 +02:00
parent 9b71d0d06b
commit d469585b89
3 changed files with 82 additions and 80 deletions

View File

@ -348,7 +348,7 @@ let BattleView = Backbone.View.extend({
});
if(key === "decoy"){
console.log("its decoy!!!");
//console.log("its decoy!!!");
this.user.set("waitForDecoy", id);
this.render();
}
@ -369,7 +369,7 @@ let BattleView = Backbone.View.extend({
if(this.user.get("setAgile")){
let $field = $(e.target).closest(".field.active").find(".field-close, .field-range");
console.log($field);
//console.log($field);
let target = $field.hasClass("field-close") ? 0 : 1;
this.app.send("agile:field", {
field: target
@ -379,7 +379,7 @@ let BattleView = Backbone.View.extend({
if(this.user.get("setHorn")){
let $field = $(e.target).closest(".field.active").find(".field-close, .field-range, .field-siege");
console.log($field);
//console.log($field);
let target = $field.hasClass("field-close") ? 0 : ($field.hasClass("field-range") ? 1 : 2);
this.app.send("horn:field", {
field: target
@ -399,7 +399,7 @@ let BattleView = Backbone.View.extend({
},
openDiscard: function(e){
let $discard = $(e.target).closest(".field-discard");
console.log("opened discard");
//console.log("opened discard");
let side;
if($discard.parent().hasClass("player")){
side = this.yourSide;
@ -477,7 +477,7 @@ let BattleView = Backbone.View.extend({
if(!$card.parent().hasClass("player")) return;
if($card.find(".card").hasClass("disabled")) return;
console.log("click leader");
//console.log("click leader");
this.app.send("activate:leader")
@ -582,7 +582,7 @@ let MedicModal = Modal.extend({
"click .card": "onCardClick"
},
onCardClick: function(e){
console.log($(e.target).closest(".card"));
//console.log($(e.target).closest(".card"));
let id = $(e.target).closest(".card").data().id;
this.model.get("app").send("medic:chooseCardFromDiscard", {
cardID: id
@ -604,7 +604,7 @@ let ReDrawModal = Modal.extend({
"click .card": "onCardClick"
},
onCardClick: function(e){
console.log($(e.target).closest(".card"));
//console.log($(e.target).closest(".card"));
let id = $(e.target).closest(".card").data().id;
this.model.get("app").send("redraw:reDrawCard", {
cardID: id
@ -638,7 +638,7 @@ let User = Backbone.Model.extend({
});
app.receive("init:battle", function(data){
console.log("opponent found!");
//console.log("opponent found!");
self.set("roomSide", data.side);
/*
self.set("channel:battle", app.socket.subscribe(self.get("room")));*/
@ -653,7 +653,7 @@ let User = Backbone.Model.extend({
app.receive("response:joinRoom", function(roomID){
self.set("room", roomID);
console.log("room id", self.get("room"));
//console.log("room id", self.get("room"));
})
app.receive("set:waiting", function(data){
@ -667,25 +667,25 @@ let User = Backbone.Model.extend({
})
app.receive("foe:left", function(){
console.log("your foe left the room");
//console.log("your foe left the room");
$(".container").prepend('<div class="alert alert-danger">Your foe left the battle!</div>')
})
app.receive("played:medic", function(data){
let cards = JSON.parse(data.cards);
console.log("played medic");
//console.log("played medic");
self.set("medicDiscard", {
cards: cards
});
})
app.receive("played:agile", function(data){
console.log("played agile");
//console.log("played agile");
self.set("setAgile", data.cardID);
})
app.receive("played:horn", function(data){
console.log("played horn");
//console.log("played horn");
self.set("setHorn", data.cardID);
})
@ -710,7 +710,7 @@ let User = Backbone.Model.extend({
app.receive("gameover", function(data){
let winner = data.winner;
console.log("gameover");
//console.log("gameover");
let model = Backbone.Model.extend({});
let modal = new WinnerModal({model: new model({winner: winner})});
@ -742,7 +742,7 @@ let User = Backbone.Model.extend({
this.get("app").send("request:name", {name: name});
},
setDeck: function(deckKey){
console.log("deck: ", deckKey);
//console.log("deck: ", deckKey);
this.set("deckKey", deckKey);
this.get("app").send("set:deck", {deck: deckKey});
}

View File

@ -29,12 +29,13 @@ $game-height: 800px;
.field {
//width: 100%;
height: 100px;
border: 1px solid black;/*
overflow: hidden;
border: 1px solid black;
/*
overflow: hidden;
&:hover {
overflow: visible;
}*/
&:hover {
overflow: visible;
}*/
.card:first-child {
margin-left: 0 !important;
@ -45,8 +46,9 @@ $game-height: 800px;
}
}
.field-horn {/*
border: 1px solid green;*/
.field-horn {
/*
border: 1px solid green;*/
/*clear: both;*/
margin: 0px;
padding: 0px;
@ -67,18 +69,20 @@ $game-height: 800px;
&:hover {
position: relative;
z-index: 10;
transform: scale(1.25,1.25);
transform: scale(1.25, 1.25);
}
}
}
.passing {/*
display: none;*/
.passing {
/*
display: none;*/
}
.field-single {
border: 1px solid black;/*
width: 85px;*/
border: 1px solid black;
/*
width: 85px;*/
/*margin: 5px;*/
height: 98px;
}
@ -157,7 +161,7 @@ $game-height: 800px;
&.activeCard {
position: relative;
z-index: 11;
transform: scale(1.5,1.5) !important;
transform: scale(1.5, 1.5) !important;
}
}
@ -184,7 +188,7 @@ $game-height: 800px;
}
.gwent-lives{
.gwent-lives {
i {
display: block;
float: left;
@ -195,56 +199,56 @@ $game-height: 800px;
background: url("../../assets/ruby.png");
}
}
}
.field {
&.field-frost {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#2365ff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#2365ff 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#2365ff',GradientType=0 ); /* IE6-9 */
.field {
&.field-frost {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #2365ff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%, #2365ff 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#2365ff', GradientType=0); /* IE6-9 */
}
&.field-fog {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #232f30 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#232f30)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#232f30 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#232f30 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#232f30 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#232f30 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#232f30',GradientType=0 ); /* IE6-9 */
}
&.field-rain {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#9b9b9b)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#9b9b9b 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#9b9b9b',GradientType=0 ); /* IE6-9 */
}
}
&.field-fog {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #232f30 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #232f30)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%, #232f30 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%, #232f30 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%, #232f30 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%, #232f30 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#232f30', GradientType=0); /* IE6-9 */
}
&.field-rain {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #9b9b9b)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%, #9b9b9b 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#9b9b9b', GradientType=0); /* IE6-9 */
.playcard-banner {
position: fixed;
border: 1px solid red;
background: orangered;
width: 100%;
height: 250px;
left: 0;
text-align: center;
top: 200px;
z-index: 200;
.card {
position: relative;
left: 50%;
top: 30%;
}
}
}
.playcard-banner {
position: fixed;
border: 1px solid red;
background: orangered;
width: 100%;
height: 250px;
left: 0;
text-align: center;
top: 200px;
z-index: 200;
.card {
position: relative;
left: 50%;
top: 30%;
}
}

View File

@ -2,10 +2,8 @@
<h3 class="bbm-modal__title">Discard of {{openDiscard.name}}</h3>
</div>
<div class="bbm-modal__section">
{{#each openDiscard.discard}}
<div class="card" data-key="{{_key}}" data-id="{{_id}}">
<img src="../assets/cards/{{_data.img}}.png">
</div>
{{#each openDiscard.discard as |val key|}}
{{>card val}}
{{/each}}
</div>
<div class="bbm-modal__bottombar">