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

@@ -8,20 +8,18 @@ Template.features.helpers({
Template.features.events({
"tap #addFeature": function(event){
var featureId = Features.insert({name: "New Feature", charId: this._id});
GlobalUI.setDialog({
heading: "New Feature",
template: "featureDialog",
data: {featureId: featureId, charId: this._id},
fullOnMobile: true
GlobalUI.setDetail({
template: "featureDialog",
data: {featureId: featureId, charId: this._id},
hero: $(event.currentTarget)
})
},
"tap .featureCard": function(event){
var featureId = this._id;
GlobalUI.setDialog({
heading: this.name,
template: "featureDialog",
data: {featureId: featureId, charId: Template.parentData()._id},
fullOnMobile: true
GlobalUI.setDetail({
template: "featureDialog",
data: {featureId: featureId, charId: Template.parentData()._id},
hero: $(event.currentTarget)
})
}
});