Alignement de prix/quantité/enc

- alignement à droite
- affichage des prix avec 2 décimales
This commit is contained in:
Vincent Vandemeulebrouck 2022-12-20 00:50:36 +01:00
parent 7f27399f3c
commit 4ba2c384d7
6 changed files with 41 additions and 11 deletions

View File

@ -771,11 +771,41 @@ div.placeholder-resolution span.table-proba-reussite{
input[type="date"],
input[type="time"]) {
color: rgba(255, 255, 255, 0.75);
background: rgba(255, 255, 255, 0.05);
background: rgba(255, 255, 255, 0.1);
border: 0 none;
margin-bottom: 0.2rem;
}
input[type="number"] {
text-align: right;
padding-right: 0.5rem;
max-width: 7rem;
}
select:is(.number-x,.number-x2,.number-x3,.number-x4,.number-x5) {
padding-right: 0.2rem;
text-align: center;
}
input:is(.number,.number-x,.number-x2,.number-x3,.number-x4,.number-x5) {
padding-right: 0.2rem;
text-align: right;
}
:is(input,select).number-x {
max-width: 1.4rem;
}
:is(input,select).number-x2 {
max-width: 2.4rem;
}
:is(input,select).number-x3 {
max-width: 3.4rem;
}
:is(input,select).number-x4 {
max-width: 4.4rem;
}
:is(input,select).number-x5 {
max-width: 4.4rem;
}
form.rdddialogchrono input[type=datetime-local] {
min-width: 20px;
padding: 0;

View File

@ -40,7 +40,7 @@
{{else}}Quantité{{/if}}
</label>
<div class="flexrow">
<input name="nombreLots" class="nombreLots flex-shrink" type="number" min="1" max="{{quantiteNbLots}}"
<input name="nombreLots" class="nombreLots flex-shrink number-x2" type="number" min="1" max="{{quantiteNbLots}}"
value="{{choix.nombreLots}}" data-dtype="Number" />
</div>
</div>

View File

@ -3,7 +3,7 @@
<h4>{{item.name}}</h4>
<div class="flexrow">
<label class="flex-grow">Quantité à {{#if item.system.boisson}}boire{{else}}manger{{/if}}</label>
<input class="attribute-value consommer-doses flex-shrink" type="number" name="doses" value="{{choix.doses}}"
<input class="attribute-value consommer-doses flex-shrink number-x2" type="number" name="doses" value="{{choix.doses}}"
min="0" max="{{item.system.quantite}}" data-dtype="Number" />
</div>
{{#if item.system.sust}}

View File

@ -4,7 +4,7 @@
<label>Quantité totale : {{item.system.quantite}}</label>
<div class="flexrow">
<label class="flex-grow">Quantité à séparer</label>
<input class="attribute-value choix-quantite flex-shrink" type="number" name="choix.quantite" value="{{choix.quantite}}"
<input class="attribute-value choix-quantite flex-shrink number-x2" type="number" name="choix.quantite" value="{{choix.quantite}}"
min="1" max="{{choix.max}}" data-dtype="Number" />
</div>
</form>

View File

@ -16,13 +16,13 @@
quantiteIllimite}}checked{{/if}} />
<label class="label-quantiteIllimite flex-shrink">Illimités</label>
{{/unless}}
<input name="quantiteNbLots" class="quantiteNbLots flex-shrink" type="number" min="1"
<input name="quantiteNbLots" class="quantiteNbLots flex-shrink number-x2" type="number" min="1"
max="{{quantiteMaxLots}}" value="{{quantiteNbLots}}" data-dtype="Number" />
</div>
</div>
<div class="flexrow flex-group-left">
<label for="tailleLot">Taille d'un lot</label>
<input name="tailleLot" class="tailleLot flex-shrink" type="number" min="1"
<input name="tailleLot" class="tailleLot flex-shrink number-x2" type="number" min="1"
max="{{quantiteMax}}" value="{{tailleLot}}" data-dtype="Number" />
</div>
<div class="flexrow flex-group-left">

View File

@ -1,25 +1,25 @@
<div class="form-group">
<label for="system.qualite">Qualité</label>
<input class="attribute-value" type="text" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"
<input class="attribute-value number-x3" type="number" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'qualite')}}disabled{{/unless}}/>
</div>
<div class="form-group">
<label for="system.encombrement">Encombrement</label>
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"
<input class="attribute-value number-x3" type="number" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'encombrement')}}disabled{{/unless}}/>
</div>
<div class="form-group">
<label for="system.quantite">Quantité {{uniteQuantite id actorId}}</label>
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number"
<input class="attribute-value number-x3" type="number" name="system.quantite" value="{{system.quantite}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'quantite')}}disabled{{/unless}}/>
</div>
<div class="form-group item-cout">
<label for="system.cout">Prix (sols)</label>
{{#if (or (ne type 'monnaie') (gt system.cout 0))}}
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"
<input class="input-prix attribute-value number-x3" type="number" name="system.cout" value="{{numberFormat system.cout decimals=2 sign=false}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'cout')}}disabled{{/unless}}/>
{{else}}
<input class="attribute-value field-error" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"
<input class="input-prix attribute-value field-error number-x3" type="number" name="system.cout" value="{{numberFormat system.cout decimals=2 sign=false}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'cout')}}disabled{{/unless}}/>
{{/if}}
</div>