Updated hitpoint / temporary hitpoint box to Polymer 1

This commit is contained in:
Stefan Zermatten
2017-01-18 11:19:03 +02:00
parent 420de9b005
commit 817020bea8
10 changed files with 818 additions and 616 deletions

View File

@@ -1,5 +1,10 @@
Template.addTHPDialog.onRendered(function(){
this.find("#quantityInput").focus();
});
Template.addTHPDialog.events({
"tap #addButton": function(event, instance){
"tap .addButton": function(event, instance){
popDialogStack();
var max = +instance.find("#quantityInput").value;
if (!max || max < 0) max = 0;
TemporaryHitPoints.insert({
@@ -8,5 +13,8 @@ Template.addTHPDialog.events({
maximum: max,
deleteOnZero: !!instance.find("#deleteWhenZeroCheckbox").checked,
});
}
},
"tap .cancelButton": function(event, instance){
popDialogStack();
},
});