Prettified all remaining detail boxes to be view -> edit

This commit is contained in:
Thaum
2015-04-20 14:06:35 +00:00
parent 6ec9f09b6a
commit 012aad5ae9
41 changed files with 334 additions and 164 deletions

View File

@@ -1,7 +1,13 @@
Template.proficiencyEditList.helpers({
proficiencies: function(){
var cursor = Proficiencies.find({"parent.id": this.parentId, "parent.collection": this.parentCollection});
return cursor;
var selector = {
"parent.id": this.parentId,
"charId": this.charId
};
if(this.parentGroup){
selector["parent.group"] = this.parentGroup;
}
return Proficiencies.find(selector);
}
});

View File

@@ -1,7 +1,7 @@
<template name="proficiencyListItem">
<div class="itemSlot">
<paper-item noink class="white" hero-id="main" {{detailHero}}>
<core-icon icon="{{profIcon}}"></core-icon>
<paper-item noink class="white proficiencyItem" hero-id="main" {{detailHero}}>
<core-icon icon="{{profIcon}}" class="black54"></core-icon>
<div class="sideMargin">{{getName}}</div>
</paper-item>
</div>

View File

@@ -12,3 +12,9 @@ Template.proficiencyListItem.helpers({
return this.name;
}
});
Template.proficiencyListItem.events({
"tap .proficiencyItem": function(event, instance){
openParentDialog(this.parent, this.charId, this._id);
}
});

View File

@@ -1,5 +1,12 @@
Template.proficiencyViewList.helpers({
proficiencies: function(){
return Proficiencies.find({"parent.id": this.parentId, charId: this.charId});
var selector = {
"parent.id": this.parentId,
"charId": this.charId
};
if(this.parentGroup){
selector["parent.group"] = this.parentGroup;
}
return Proficiencies.find(selector);
}
});