init
This commit is contained in:
10
rpg-docs/client/views/home/home.html
Normal file
10
rpg-docs/client/views/home/home.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<template name="home">
|
||||
{{>loginButtons}}
|
||||
<div>
|
||||
{{# each characters}}
|
||||
<li><a href="{{ pathFor 'character' }} ">{{_id}}</a></li>
|
||||
{{/each}}
|
||||
</div>
|
||||
<input id="addCharacter" type="button" value="Add Character">
|
||||
<input id="nukeCharacters" type="button" value="Clear all characters">
|
||||
</template>
|
||||
11
rpg-docs/client/views/home/home.js
Normal file
11
rpg-docs/client/views/home/home.js
Normal file
@@ -0,0 +1,11 @@
|
||||
Template.home.events({
|
||||
"click #addCharacter": function (event, template) {
|
||||
Characters.insert(new Character(Meteor.userId()));
|
||||
},
|
||||
"click #nukeCharacters": function(event, template){
|
||||
while(true){
|
||||
if(!Characters.findOne()) break;
|
||||
Characters.remove(Characters.findOne()._id);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user