1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-11-23 19:36:53 +00:00
not-gwent-online/site/client/app/modules/deck-builder/components/show-leaders.js

25 lines
493 B
JavaScript
Raw Normal View History

2015-06-25 17:07:52 +00:00
module.exports = {
template: require('./../views/show-leaders.html'),
inherit: true,
methods: {
closeLeaders(e) {
if(e == 'close' || e.target.className == 'modal active' ) {
this.modalLeader = false;
}
},
chooseLeader(card) {
// todo: make own leader variable
for(var item in this.deck) {
2015-06-25 19:25:39 +00:00
if(this.deck[item].card.type == 3) {
this.deck.$set(item, {card});
2015-06-25 17:07:52 +00:00
}
}
this.closeLeaders('close');
}
}
};