Fixed containers not responding to rename or delete

This commit is contained in:
Stefan Zermatten
2015-04-30 07:30:37 +02:00
parent aa069fd885
commit e9509a3a24
2 changed files with 10 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
</template>
<template name="containerEdit">
<paper-input id="containerNameInput fullwidth"
<paper-input id="containerNameInput"
label="Name"
floatinglabel
value={{name}}></paper-input>

View File

@@ -4,11 +4,7 @@ Template.containerDialog.helpers({
}
});
Template.containerEdit.onRendered(function(){
updatePolymerInputs(this);
});
Template.containerEdit.events({
Template.containerDialog.events({
"color-change": function(event, instance){
Containers.update(instance.data.containerId, {$set: {color: event.color}});
},
@@ -20,8 +16,15 @@ Template.containerEdit.events({
);
GlobalUI.closeDetail();
},
});
Template.containerEdit.onRendered(function(){
updatePolymerInputs(this);
});
Template.containerEdit.events({
//TODO validate input (integer, non-negative, etc) for these inputs and give validation errors
"change #containerNameInput, input #containerNameInput": function(event){
"change #containerNameInput": function(event){
var name = Template.instance().find("#containerNameInput").value;
Containers.update(this._id, {$set: {name: name}});
},