Removed Polymer 0.5, started implementing Polymer 1.0

This commit is contained in:
Stefan Zermatten
2016-10-03 13:00:27 +02:00
parent d83fe917d0
commit 7af2e80ec1
171 changed files with 259 additions and 130 deletions

View File

@@ -1,13 +0,0 @@
<!-- data needs to include id of item, parentCollection, parentId -->
<template name="splitStackDialog">
<div style="width: 300px; height: 110px;">
<paper-input-decorator label="Quantity" floatinglabel>
<input autoFocus id="quantityInput" type="number" value={{quantity}}>
</paper-input-decorator>
<paper-button id="oneButton"> One </paper-button>
<paper-button id="halfButton"> Half </paper-button>
<paper-button id="allButton"> All </paper-button>
</div>
<paper-button id="cancelButton" affirmative> Cancel </paper-button>
<paper-button id="moveButton" affirmative> Move </paper-button>
</template>

View File

@@ -1,27 +0,0 @@
Template.splitStackDialog.helpers({
quantity: function(){
var item = Items.findOne(this.id);
if (item) return Math.round(item.quantity / 2);
}
});
Template.splitStackDialog.events({
"tap #moveButton": function(event, instance){
Meteor.call(
"splitItemToParent",
this.id,
+instance.find("#quantityInput").value,
{collection: this.parentCollection , id: this.parentId}
);
},
"tap #oneButton":function(event, instance){
instance.find("#quantityInput").value = 1;
},
"tap #halfButton":function(event, instance){
var val = Math.round(Items.findOne(this.id).quantity / 2);
instance.find("#quantityInput").value = val;
},
"tap #allButton":function(event, instance){
instance.find("#quantityInput").value = Items.findOne(this.id).quantity;
},
});