Moved views out of private folder
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<!-- data just needs charId -->
|
||||
<template name="addTHPDialog">
|
||||
<div style="width: 200px; height: 150px;">
|
||||
<paper-input id="nameInput" label="Label"></paper-input>
|
||||
<paper-input-decorator label="Quantity" floatinglabel>
|
||||
<input autoFocus id="quantityInput" type="number" value="10">
|
||||
</paper-input-decorator>
|
||||
<div layout horizontal justify-center>
|
||||
Delete when zero <paper-checkbox id="deleteWhenZeroCheckbox" checked style="margin-left: 8px;"></paper-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<paper-button id="cancelButton" affirmative> Cancel </paper-button>
|
||||
<paper-button id="addButton" affirmative> Add </paper-button>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
Template.addTHPDialog.events({
|
||||
"tap #addButton": function(event, instance){
|
||||
var max = +instance.find("#quantityInput").value;
|
||||
if (!max || max < 0) max = 0;
|
||||
TemporaryHitPoints.insert({
|
||||
charId: this.charId,
|
||||
name: instance.find("#nameInput").value,
|
||||
maximum: max,
|
||||
deleteOnZero: !!instance.find("#deleteWhenZeroCheckbox").checked,
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user