Regrouper vue détaillée avec dévérouiller
This commit is contained in:
parent
5d36ea9e0c
commit
322506250b
@ -29,7 +29,6 @@ export class RdDActorSheet extends ActorSheet {
|
||||
width: 640,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editCaracComp: false,
|
||||
showCompNiveauBase: false,
|
||||
vueDetaillee: false
|
||||
});
|
||||
@ -387,7 +386,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
this.actor.updateCompetenceStress(RdDSheetUtility.getItemId(event));
|
||||
});
|
||||
|
||||
if (this.options.editCaracComp) {
|
||||
if (this.options.vueDetaillee) {
|
||||
// On carac change
|
||||
html.find('.carac-value').change(async event => {
|
||||
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
|
||||
@ -424,10 +423,6 @@ export class RdDActorSheet extends ActorSheet {
|
||||
this.options.showCompNiveauBase = !this.options.showCompNiveauBase;
|
||||
this.render(true);
|
||||
});
|
||||
html.find('.lock-unlock-sheet').click(async event => {
|
||||
this.options.editCaracComp = !this.options.editCaracComp;
|
||||
this.render(true);
|
||||
});
|
||||
|
||||
html.find('.recherche')
|
||||
.each((index, field) => {
|
||||
|
@ -93,9 +93,10 @@
|
||||
{{!-- Carac Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="carac">
|
||||
<div class="flexrow">
|
||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||
>{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
<span><a class="vue-detaillee">
|
||||
<i class="fas {{#if options.vueDetaillee}}fa-eye-slash{{else}}fa-eye{{/if}}"></i>
|
||||
{{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left flexcol">
|
||||
@ -108,7 +109,7 @@
|
||||
{{/if}}
|
||||
{{#if (eq key 'taille')}}
|
||||
<span class="carac-label" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||
<label class="carac-xp"/>
|
||||
{{else}}
|
||||
{{#if carac.derivee}}
|
||||
@ -125,9 +126,9 @@
|
||||
{{else}}
|
||||
<span class="carac-label tooltip" name="system.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
|
||||
{{/if}}
|
||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||
<span class="carac-xp tooltip">
|
||||
<input class="carac-xp" type="text" name="system.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-xp" type="text" name="system.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||
<span class="tooltiptext ttt-xp">Vous devez acquérir {{carac.xpNext}} points d'Experience pour augmenter de 1 votre {{carac.label}}</span>
|
||||
</span>
|
||||
{{#if carac.isLevelUp}}
|
||||
@ -149,7 +150,7 @@
|
||||
<ul class="carac-list">
|
||||
<li class="caracteristique flexrow list-item">
|
||||
<span class="carac-label" name="beaute">Beauté :</span>
|
||||
<input class="description-value" type="text" name="system.beaute" value="{{system.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="description-value" type="text" name="system.beaute" value="{{system.beaute}}" data-dtype="String" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
|
||||
<label class="carac-xp"/>
|
||||
</li>
|
||||
{{#each system.attributs as |attr key|}}
|
||||
@ -211,21 +212,19 @@
|
||||
|
||||
{{!-- Compétences Tab --}}
|
||||
<div class="tab competences" data-group="primary" data-tab="competences">
|
||||
<div class="grid grid-4col">
|
||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer">
|
||||
{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
<span>
|
||||
<input class="recherche flex-grow" type="text" value="{{options.recherche.text}}" name="recherche"
|
||||
size="8" data-dtype="String" placeholder="chercher"/>
|
||||
<div class="flexrow">
|
||||
<span><a class="vue-detaillee">
|
||||
<i class="fas {{#if options.vueDetaillee}}fa-eye-slash{{else}}fa-eye{{/if}}"></i>
|
||||
{{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}}</a>
|
||||
</span>
|
||||
<span><a class="show-hide-competences"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout">
|
||||
{{#if options.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a>
|
||||
</span>
|
||||
<span><a class="vue-detaillee">
|
||||
<i class="fas {{#if options.vueDetaillee}}fa-eye-slash{{else}}fa-eye{{/if}}"></i>
|
||||
{{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}}</a>
|
||||
<span class="flexrow">
|
||||
<i class="fas fa-search flex-shrink"></i>
|
||||
<input class="recherche flex-grow" type="text" value="{{options.recherche.text}}" name="recherche"
|
||||
size="8" data-dtype="String" placeholder="chercher"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="grid grid-2col">
|
||||
|
@ -6,7 +6,6 @@
|
||||
<ul class="item-list alterne-list competence-list">
|
||||
{{#if @root.options.vueDetaillee}}
|
||||
<li class="item flexrow list-item ">
|
||||
|
||||
<span class="competence-label"></span>
|
||||
<span class="competence-value" >Niv.</span>
|
||||
<span class="competence-xp">xp</span>
|
||||
@ -15,7 +14,7 @@
|
||||
{{/if}}
|
||||
<div class="item-controls">
|
||||
<i class="far fa-arrow-alt-circle-up"></i>
|
||||
<span class="competence-archetype">Arch</span>
|
||||
<span class="competence-archetype">Arch.</span>
|
||||
<i class="far fa-edit"></i>
|
||||
{{#if @root.options.isGM}}
|
||||
<i class="far fa-trash"></i>
|
||||
|
@ -14,19 +14,19 @@
|
||||
|
||||
<input class="competence-value" type="text" compname="{{name}}" name="comp-value-{{name}}"
|
||||
value="{{numberFormat system.niveau decimals=0 sign=true}}" data-dtype="number"
|
||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
{{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||
|
||||
{{#if @root.options.vueDetaillee}}
|
||||
<span class="competence-xp tooltip">
|
||||
<input class="competence-xp " type="text" compname="{{name}}" name="comp-xp-{{name}}"
|
||||
value="{{numberFormat system.xp decimals=0 sign=false}}" data-dtype="number"
|
||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
value="{{numberFormat system.xp decimals=0 sign=false}}" data-dtype="number"/>
|
||||
<span class="tooltiptext left-competence ttt-xp">Vous devez acquérir {{system.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span>
|
||||
</span>
|
||||
|
||||
{{/if}}
|
||||
{{#if (eq system.categorie 'draconic')}}
|
||||
<input class="competence-xp-sort" type="text" compname="{{name}}" name="comp-xp-sort-{{name}}"
|
||||
value="{{numberFormat system.xp_sort decimals=0 sign=false}}" data-dtype="number"
|
||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
{{#if @root.options.vueDetaillee}}
|
||||
<div class="item-controls">
|
||||
@ -39,8 +39,7 @@
|
||||
<i class="far fa-circle"></i>
|
||||
{{/if}}
|
||||
<input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}"
|
||||
value="{{numberFormat system.niveau_archetype decimals=0 sign=true}}" data-dtype="number"
|
||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
value="{{numberFormat system.niveau_archetype decimals=0 sign=true}}" data-dtype="number"/>
|
||||
<a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
||||
{{#if @root.options.isGM}}
|
||||
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
Loading…
Reference in New Issue
Block a user