Updated the new character dialog to Polymer 1

This commit is contained in:
Stefan Zermatten
2017-01-16 15:34:23 +02:00
parent d4bec4f5e7
commit bdc64dfb10
7 changed files with 93 additions and 73 deletions

View File

@@ -51,11 +51,7 @@
<div class="fab-buffer"></div>
<paper-fab class="floatyButton addCharacter"
icon="add"
title="Add"
role="button"
tabindex="0"
aria-label="Add"
hero-id="main"></paper-fab>
title="Add"></paper-fab>
</div>
</app-header-layout>
</template>

View File

@@ -22,9 +22,15 @@ Template.characterList.helpers({
Template.characterList.events({
"tap .addCharacter": function(event, template) {
GlobalUI.showDialog({
heading: "New Character",
pushDialogStack({
template: "newCharacterDialog",
});
element: event.currentTarget,
callback(character){
if (!character) return;
character.owner = Meteor.userId();
let _id = Characters.insert(character);
Router.go("characterSheet", {_id});
},
})
},
});