Fixed stuff, enabled character deletion
This commit is contained in:
@@ -5,4 +5,6 @@
|
||||
.characterCard{
|
||||
width: 272px;
|
||||
margin: 4px;
|
||||
min-width: 272px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
<div class="scroll-y" fit>
|
||||
{{#if currentUser}}
|
||||
{{#if characters.count}}
|
||||
<div layout horizontal class="characterCards">
|
||||
<div layout horizontal wrap class="characterCards">
|
||||
{{# each characters}}
|
||||
{{#with characterDetails}}
|
||||
{{#containerCardHelper this}}{{alignment}} {{gender}} {{race}}{{/containerCardHelper}}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{> gridPadding class="characterCard" num=12}}
|
||||
</div>
|
||||
{{> gridPadding class="characterCard" num=12}}
|
||||
{{else}}
|
||||
<div layout vertical center center-justified>
|
||||
<div>You don't seem to have any characters :(</div>
|
||||
|
||||
@@ -10,14 +10,9 @@ Template.characterList.helpers({
|
||||
|
||||
Template.characterList.events({
|
||||
"tap .characterCard": function(event, instance){
|
||||
console.log(this);
|
||||
Router.go("characterSheet", {_id: this._id});
|
||||
},
|
||||
"tap .addCharacter": function (event, template) {
|
||||
Characters.insert({owner: Meteor.userId()});
|
||||
},
|
||||
"tap #deleteChar": function(event, template){
|
||||
console.log("deleting", this);
|
||||
Characters.remove(this._id);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user