Merge branch 'hotfix-item-libraries'
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.library-item-dialog paper-input {
|
||||
min-width: 160px;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<template name="libraryItemDialog">
|
||||
<div class="fit base-dialog layout vertical">
|
||||
<div class="fit base-dialog layout vertical library-item-dialog">
|
||||
<app-toolbar>
|
||||
<paper-icon-button id="backButton"
|
||||
icon="arrow-back">
|
||||
@@ -24,8 +24,8 @@
|
||||
</paper-checkbox>
|
||||
</div>
|
||||
<div class="layout horizontal center wrap">
|
||||
<paper-input id="libraryItemValueInput" class="flex" label="Value" type="number" value={{item.value}} disabled="{{cantEdit}}"></paper-input>
|
||||
<paper-input id="libraryItemWeightInput" class="flex" label="Weight" type="number" value={{item.weight}} disabled="{{cantEdit}}"></paper-input>
|
||||
<paper-input id="libraryItemValueInput" class="flex" label="Value" type="number" value={{item.value}} disabled="{{cantEdit}}"></paper-input>
|
||||
<paper-checkbox id="attunementCheckbox" class="flex" checked={{item.requiresAttunement}} disabled="{{cantEdit}}">
|
||||
Requires Attunement
|
||||
</paper-checkbox>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div style="margin-top: 8px;">
|
||||
<div class="paper-font-subhead">Effects</div>
|
||||
{{#each indexedEffects}}
|
||||
<div class="effect layout horizontal center wrap">
|
||||
<div class="effect layout horizontal center wrap" style="margin-bottom: 32px;">
|
||||
<paper-dropdown-menu label="Operation" class="operationMenu" disabled="{{cantEdit}}">
|
||||
<paper-listbox class="dropdown-content" selected={{operationIndex operation}}>
|
||||
<paper-item label="Base Value" name="base"> Base Value </paper-item>
|
||||
@@ -59,7 +59,7 @@
|
||||
<div style="margin-top: 8px;">
|
||||
<div class="paper-font-subhead">Attacks</div>
|
||||
{{#each indexedAttacks}}
|
||||
<div class="effect layout horizontal center wrap">
|
||||
<div class="effect layout horizontal center wrap" style="margin-bottom: 32px">
|
||||
<paper-input class="LibraryItemAttackBonusInput flex" label="Attack Bonus" value={{attackBonus}} disabled="{{cantEdit}}"></paper-input>
|
||||
<paper-input class="LibraryItemAttackDamageInput flex" label="Damage" value={{damage}} disabled="{{cantEdit}}"></paper-input>
|
||||
<paper-input class="LibraryItemAttackDetailsInput flex" label="Details" value={{details}} disabled="{{cantEdit}}"></paper-input>
|
||||
|
||||
@@ -66,7 +66,9 @@ Template.libraryItemDialog.helpers({
|
||||
return Template.instance().subscriptionsReady();
|
||||
},
|
||||
cantEdit(){
|
||||
let item = LibraryItems.findOne(this.itemId);
|
||||
// Get itemId from the top level template data regardless of current context
|
||||
let itemId = Blaze.getData(Template.instance().view).itemId;
|
||||
let item = LibraryItems.findOne(itemId);
|
||||
if (!item) return;
|
||||
let library = Libraries.findOne(item.library);
|
||||
if (!library) return;
|
||||
|
||||
Reference in New Issue
Block a user