Implemented Hero-dialog editing of features

This commit is contained in:
Thaum
2015-01-30 10:14:46 +00:00
parent 848902c358
commit 37e8831e0c
14 changed files with 242 additions and 105 deletions

View File

@@ -5,13 +5,19 @@ Template.featureDialog.rendered = function(){
if(feature && feature.name) Session.set("global.ui.dialogHeader", feature.name);
})
//after the dialog is built, open it
_.defer(function(){GlobalUI.dialog.open()});
if (!this.alreadyRendered){
Session.set("global.ui.detailShow", true);
this.alreadyRendered = true;
}
}
Template.featureDialog.events({
"tap #backButton": function(){
GlobalUI.closeDetail()
},
"tap #deleteFeature": function(){
Features.remove(this._id);
GlobalUI.closeDialog()
GlobalUI.closeDetail()
},
"tap #addEffectButton": function(){
Effects.insert({