Minor: format +/-

Utiliser des classes pour formattage commun plutôt que des ids
This commit is contained in:
Vincent Vandemeulebrouck 2021-11-26 01:00:28 +01:00
parent 05398a74f0
commit 2ea69c4077
5 changed files with 27 additions and 24 deletions

View File

@ -108,11 +108,11 @@ export class RdDActorEntiteSheet extends ActorSheet {
this.actor.rollCompetence( compName );
});
html.find('#endurance-plus').click((event) => {
html.find('.endurance-plus').click((event) => {
this.actor.santeIncDec("endurance", 1);
this.render(true);
});
html.find('#endurance-moins').click((event) => {
html.find('.endurance-moins').click((event) => {
this.actor.santeIncDec("endurance", -1);
this.render(true);
});

View File

@ -468,10 +468,10 @@ export class RdDActorSheet extends ActorSheet {
this.actor.jetEthylisme();
});
html.find('#jet-vie').click(async event => {
html.find('.jet-vie').click(async event => {
this.actor.jetVie();
});
html.find('#jet-endurance').click(async event => {
html.find('.jet-endurance').click(async event => {
this.actor.jetEndurance();
});
@ -484,28 +484,28 @@ export class RdDActorSheet extends ActorSheet {
this.actor.monnaieIncDec(li.data("item-id"), -1);
});
html.find('#vie-plus').click(async event => {
html.find('.vie-plus').click(async event => {
this.actor.santeIncDec("vie", 1);
});
html.find('#vie-moins').click(async event => {
html.find('.vie-moins').click(async event => {
this.actor.santeIncDec("vie", -1);
});
html.find('#endurance-plus').click(async event => {
html.find('.endurance-plus').click(async event => {
this.actor.santeIncDec("endurance", 1);
});
html.find('#endurance-moins').click(async event => {
html.find('.endurance-moins').click(async event => {
this.actor.santeIncDec("endurance", -1);
});
html.find('#ptreve-actuel-plus').click(async event => {
html.find('.ptreve-actuel-plus').click(async event => {
this.actor.reveActuelIncDec(1);
});
html.find('#ptreve-actuel-moins').click(async event => {
html.find('.ptreve-actuel-moins').click(async event => {
this.actor.reveActuelIncDec(-1);
});
html.find('#fatigue-plus').click(async event => {
html.find('.fatigue-plus').click(async event => {
this.actor.santeIncDec("fatigue", 1);
});
html.find('#fatigue-moins').click(async event => {
html.find('.fatigue-moins').click(async event => {
this.actor.santeIncDec("fatigue", -1);
});
}

View File

@ -644,7 +644,7 @@ section.sheet-body:after {
max-width: 90%;
}
#vie-plus, #vie-moins, #endurance-plus, #endurance-moins, #fatigue-plus, #fatigue-moins, #ptreve-actuel-plus, #ptreve-actuel-moins, .monnaie-plus, .monnaie-moins {
.plus-moins {
display: inline-block;
width: 1.25rem;
background: rgba(30, 25, 20, 1);

View File

@ -5,7 +5,10 @@
<img class="sheet-competence-img" src="{{piece.img}}" title="{{piece.name}}"/>
<span class="competence-title competence-label">{{piece.name}}</span>
<span class="competence-title competence-label">{{piece.data.quantite}}</span>
<span class="competence-title"><a class="monnaie-plus">+</a><a class="monnaie-moins">-</a></span>
<span class="competence-title">
<a class="monnaie-plus plus-moins">+</a>
<a class="monnaie-moins plus-moins">-</a>
</span>
<div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>

View File

@ -11,39 +11,39 @@
<ul class="flex-group-center flex-compteurs">
<li>
<label class="ctn-vie">
<a id="jet-vie">Vie</a>
<a id="vie-moins">-</a>
<a class="jet-vie">Vie</a>
<a class="vie-moins plus-moins">-</a>
<input class="resource-content" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>
<span>/ {{data.sante.vie.max}}</span>
<a id="vie-plus">+</a>
<a class="vie-plus plus-moins">+</a>
</label>
</li>
<li>
<label class="ctn-endu">
<a id="jet-endurance">Endurance</a>
<a id="endurance-moins">-</a>
<a class="jet-endurance">Endurance</a>
<a class="endurance-moins plus-moins">-</a>
<input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/>
<span>/ {{data.sante.endurance.max}}</span>
<a id="endurance-plus">+</a>
<a class="endurance-plus plus-moins">+</a>
</label>
</li>
<li>
<label class="appliquerFatigue ctn-fatigue tooltip">
<span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
Fatigue
<a id="fatigue-moins">-</a>
<a class="fatigue-moins plus-moins">-</a>
<input class="resource-content" id="fatigue-value" type="text" name="data.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" />
<span>/ {{data.sante.fatigue.max}}</span>
<a id="fatigue-plus">+</a>
<a class="fatigue-plus plus-moins">+</a>
</label>
</li>
<li>
<label class="ctn-reve">
<span class="ptreve-actuel"><a>Rêve</a></span>
<a id="ptreve-actuel-moins">-</a>
<a class="ptreve-actuel-moins plus-moins">-</a>
<input class="resource-content" id="pointsreve-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" />
<span>/ {{data.reve.seuil.value}}</span>
<a id="ptreve-actuel-plus">+</a>
<a class="ptreve-actuel-plus plus-moins">+</a>
</label>
</li>
</ul>