Added color options for containers, added spell lists
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template name="containerDialog">
|
||||
{{#with container}}
|
||||
<core-header-panel fit>
|
||||
<core-toolbar hero-id="toolbar" hero>
|
||||
<core-toolbar hero-id="toolbar" class={{colorClass}} hero>
|
||||
<paper-icon-button id="backButton" role="button" tabindex="0" icon="arrow-back" aria-label="close"></paper-icon-button>
|
||||
<div flex hero-id="title" hero>{{name}}</div>
|
||||
<paper-icon-button id="deleteContainer"
|
||||
@@ -14,6 +14,8 @@
|
||||
<div class="detailContent">
|
||||
<!--Name and plural name-->
|
||||
<paper-input id="containerNameInput" label="Name" floatinglabel value={{name}}></paper-input>
|
||||
<!--Color-->
|
||||
{{> colorDropdown}}
|
||||
<!--Weight-->
|
||||
<paper-input-decorator label="Weight" floatinglabel>
|
||||
<input id="weightInput" type="number" value={{weight}}>
|
||||
|
||||
@@ -43,11 +43,20 @@ Template.containerDialog.events({
|
||||
"change #containerDescriptionInput": function(event){
|
||||
var description = Template.instance().find("#containerDescriptionInput").value;
|
||||
Containers.update(this._id, {$set: {description: description}});
|
||||
},
|
||||
"core-select .colorDropdown": function(event){
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
Containers.update(this._id, {$set: {color: value}});
|
||||
}
|
||||
});
|
||||
|
||||
Template.containerDialog.helpers({
|
||||
container: function(){
|
||||
return Containers.findOne(this.containerId);
|
||||
},
|
||||
colorClass: function(){
|
||||
return getColorClass(this.color)
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user