- Update items embed permissions on add

- hide the + on title sheet if non editable
This commit is contained in:
Vlyan
2021-05-28 16:11:09 +02:00
parent 1ec3b5700d
commit 4961d3bba3
2 changed files with 4 additions and 1 deletions

View File

@@ -148,6 +148,9 @@ export class ItemL5r5e extends Item {
item.data._id = foundry.utils.randomID(); item.data._id = foundry.utils.randomID();
} }
// Copy the parent permission to the sub item
item.data.permission = this.data.permission;
// Tag parent (flags won't work as we have no id in db) // Tag parent (flags won't work as we have no id in db)
item.data.data.parent_id = this.getParentsIds(); item.data.data.parent_id = this.getParentsIds();

View File

@@ -32,7 +32,7 @@
<article class="tab experience" data-group="primary" data-tab="experience"> <article class="tab experience" data-group="primary" data-tab="experience">
{{!-- Others progession (does not count in school xp) --}} {{!-- Others progession (does not count in school xp) --}}
<fieldset class="xp-spent xp-spent-body"> <fieldset class="xp-spent xp-spent-body">
<legend class="tools">{{localize 'l5r5e.advancements.title'}} <a data-item-type="advancement-others" class="advancement-others-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a></legend> <legend class="tools">{{localize 'l5r5e.advancements.title'}} {{#if options.editable}}<a data-item-type="advancement-others" class="advancement-others-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>{{/if}}</legend>
<table> <table>
<thead class="flex"> <thead class="flex">
<tr class="flexrow row"> <tr class="flexrow row">