mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 11:32:38 +02:00
Styling
This commit is contained in:
parent
399b942ed1
commit
d1b92cc639
4 changed files with 34 additions and 17 deletions
|
@ -363,9 +363,7 @@ thead tr * {
|
||||||
thead th + th {
|
thead th + th {
|
||||||
border-left: 1px solid white;
|
border-left: 1px solid white;
|
||||||
}
|
}
|
||||||
th, td {
|
|
||||||
padding: 5px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr .producer {
|
tr .producer {
|
||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
|
@ -382,7 +380,7 @@ article.order {
|
||||||
}
|
}
|
||||||
|
|
||||||
table th.product {
|
table th.product {
|
||||||
min-width: 10rem;
|
min-width: 6rem;
|
||||||
width: inherit;
|
width: inherit;
|
||||||
max-width: 15em;
|
max-width: 15em;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
@ -398,11 +396,17 @@ table.order td.quantity {
|
||||||
}
|
}
|
||||||
|
|
||||||
td.with-input {
|
td.with-input {
|
||||||
padding: 0;
|
padding: 3em;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
td.with-input input {
|
|
||||||
text-align: center;
|
.product_unit {
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.with-input > input {
|
||||||
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chrome, Safari, Edge, Opera */
|
/* Chrome, Safari, Edge, Opera */
|
||||||
|
@ -464,7 +468,6 @@ hr {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
height: 3rem;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
}
|
}
|
||||||
|
@ -541,13 +544,14 @@ ul.delivery > li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
ul.delivery-head {
|
ul.delivery-head {
|
||||||
|
padding: 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px , 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(10em , 1fr));
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
}
|
}
|
||||||
ul.delivery-head li {
|
ul.delivery-head li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0.5em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,15 +75,23 @@
|
||||||
<script src="{{ url_for('/static/js/flash.min.js') }}"></script>
|
<script src="{{ url_for('/static/js/flash.min.js') }}"></script>
|
||||||
<script src="{{ url_for('/static/js/app.js') }}"></script>
|
<script src="{{ url_for('/static/js/app.js') }}"></script>
|
||||||
<script src="{{ url_for('/static/js/menus.js') }}"></script>
|
<script src="{{ url_for('/static/js/menus.js') }}"></script>
|
||||||
|
<script>
|
||||||
{% if message %}
|
{% if message %}
|
||||||
<script>
|
|
||||||
new window.FlashMessage("{{ message[0] }}", "{{ message[1] }}", {
|
new window.FlashMessage("{{ message[0] }}", "{{ message[1] }}", {
|
||||||
progress: true,
|
progress: true,
|
||||||
interactive: true,
|
interactive: true,
|
||||||
timeout: 8000,
|
timeout: 8000,
|
||||||
theme: "dark"
|
theme: "dark"
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
// Disable scrolling on inputs, as it make users do weird things.
|
||||||
|
// Taken from https://stackoverflow.com/a/38589039/147077
|
||||||
|
document.addEventListener("wheel", function(event){
|
||||||
|
if(document.activeElement.type === "number"){
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -35,16 +35,18 @@
|
||||||
{% for product in delivery.get_products_by(producer.id) %}
|
{% for product in delivery.get_products_by(producer.id) %}
|
||||||
{% if not product.rupture %}
|
{% if not product.rupture %}
|
||||||
<tr>
|
<tr>
|
||||||
<th class="product {% if product.rupture %}rupture{% endif %}">{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}
|
<th class="product {% if product.rupture %}rupture{% endif %}"><div {% if product.description %}title="{{ product.description }}"{% endif %}>{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}</div>
|
||||||
{% if product.description %}
|
{% if product.description and product.description | length > 30 %}
|
||||||
<br /><small title="{{ product.description }}">{{ product.description }}</small>
|
<small title="{{ product.description }}">+ d'infos…</small>
|
||||||
|
{% else %}
|
||||||
|
<small title="{{ product.description }}">{{ product.description }}</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</th>
|
</th>
|
||||||
<td>{{ product.price | round(2) }} €</td>
|
<td>{{ product.price | round(2) }} €</td>
|
||||||
{% if producer.has_packing %}
|
{% if producer.has_packing %}
|
||||||
<td {% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} class="missing" title="Les commandes individuelles ne correspondent pas aux conditionnements"{% endif %}>{{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %}</td>
|
<td {% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} class="missing" title="Les commandes individuelles ne correspondent pas aux conditionnements"{% endif %}>{{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="with-input"><input {% if not request.user.is_referent(delivery) and delivery.status != delivery.OPEN or product.rupture %}type="text" readonly{% else%}type="number"{% endif%} min=0 name="wanted:{{ product.ref }}" value="{{ order[product].wanted }}">{% if not (delivery.status == delivery.ADJUSTMENT or force_adjustments) %} x {{ product.unit }}{% endif %}</td>
|
<td class="with-input"><input {% if not request.user.is_referent(delivery) and delivery.status != delivery.OPEN or product.rupture %}type="text" readonly{% else%}type="number"{% endif%} min=0 name="wanted:{{ product.ref }}" value="{{ order[product].wanted }}"><br />{% if not (delivery.status == delivery.ADJUSTMENT or force_adjustments) %}<div class="product_unit"> x {{ product.unit }}</div>{% endif %}</td>
|
||||||
{% if delivery.status == delivery.ADJUSTMENT or force_adjustments %}
|
{% if delivery.status == delivery.ADJUSTMENT or force_adjustments %}
|
||||||
<td class="with-input"><input type="number" name="adjustment:{{ product.ref }}" value="{{ order[product].adjustment }}" min="{{ order[product].wanted * -1 }}" {% if not (delivery.product_missing(product) or force_adjustment) %}readonly{% endif %}> x {{ product.unit }}</td>
|
<td class="with-input"><input type="number" name="adjustment:{{ product.ref }}" value="{{ order[product].adjustment }}" min="{{ order[product].wanted * -1 }}" {% if not (delivery.product_missing(product) or force_adjustment) %}readonly{% endif %}> x {{ product.unit }}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
<a class="pure-menu-link" href="{{ url_for('create_producer', delivery_id=delivery.id) }}"><i class="icon-heart"></i> Ajouter un⋅e producteur⋅rice</a>
|
<a class="pure-menu-link" href="{{ url_for('create_producer', delivery_id=delivery.id) }}"><i class="icon-heart"></i> Ajouter un⋅e producteur⋅rice</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
<a class="pure-menu-link" href="{{ url_for('copy_products', id=delivery.id) }}"><i class="icon-hotairballoon"></i> Réutiliser les produits d'une autre distrib</a>
|
<a class="pure-menu-link" href="{{ url_for('copy_products', id=delivery.id) }}"><i class="icon-hotairballoon"></i> Copier une distribution</a>
|
||||||
|
</li>
|
||||||
|
<li class="pure-menu-item">
|
||||||
|
<a class="pure-menu-link" href="{{ url_for('mark_all_prices_as_ok', delivery_id=delivery.id) }}"><i class="icon-megaphone"></i> Valider tous les prix</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue