Implemented detail view for items and containers
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template name="featureDialog">
|
||||
{{#with feature}}
|
||||
<core-header-panel fit>
|
||||
<core-toolbar>
|
||||
<core-toolbar hero-id="toolbar" hero>
|
||||
<paper-icon-button id="backButton" role="button" tabindex="0" icon="arrow-back" aria-label="close"></paper-icon-button>
|
||||
<div flex>{{name}}</div>
|
||||
<paper-icon-button id="deleteFeature"
|
||||
@@ -11,7 +11,7 @@
|
||||
aria-label="Delete Feature"
|
||||
noink></paper-icon-button>
|
||||
</core-toolbar>
|
||||
<div class="featureContent">
|
||||
<div class="detailContent">
|
||||
<paper-input id="featureNameInput" label="Name" floatinglabel value={{name}}></paper-input>
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<paper-input-decorator label="Description" floatinglabel layout vertical>
|
||||
@@ -19,15 +19,17 @@
|
||||
<textarea id="featureDescriptionInput" placeholder aria-label="Description" value={{description}}></textarea>
|
||||
</paper-autogrow-textarea>
|
||||
</paper-input-decorator>
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<div id="effects">
|
||||
<h2>Effects</h2>
|
||||
{{#each effects}}
|
||||
{{>effectEdit}}
|
||||
{{/each}}
|
||||
<div layout horizontal end-justified>
|
||||
<paper-button id="addEffectButton" raised>Add Effect</paper-button>
|
||||
{{#if effects}}
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<div id="effects">
|
||||
<h2>Effects</h2>
|
||||
{{#each effects}}
|
||||
{{>effectEdit}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div layout horizontal end-justified>
|
||||
<paper-button id="addEffectButton" raised>Add Effect</paper-button>
|
||||
</div>
|
||||
</div>
|
||||
</core-header-panel>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
Template.featureDialog.rendered = function(){
|
||||
var self = this;
|
||||
this.autorun(function(){
|
||||
var feature = Features.findOne(Template.currentData().featureId, {fields: {name: 1}});
|
||||
if(feature && feature.name) Session.set("global.ui.dialogHeader", feature.name);
|
||||
})
|
||||
//update all autogrows after they've been filled
|
||||
var pata = this.$("paper-autogrow-textarea");
|
||||
pata.each(function(index, el){
|
||||
@@ -52,7 +48,7 @@ Template.featureDialog.helpers({
|
||||
return Features.findOne(this.featureId);
|
||||
},
|
||||
effects: function(){
|
||||
var cursor = Effects.find({charId: Template.currentData().charId, type: "feature", sourceId: this._id})
|
||||
var cursor = Effects.find({sourceId: this._id, type: "feature"})
|
||||
return cursor;
|
||||
}
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
body /deep/ .featureDialogWidth {
|
||||
width: 560px;
|
||||
}
|
||||
|
||||
.featureContent {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
#addEffectButton {
|
||||
background: #d23f31;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
}
|
||||
Reference in New Issue
Block a user