mirror of https://gitlab.crans.org/bde/nk20
Do not use JavaScript to hide double conso after loading
This commit is contained in:
parent
658d402242
commit
cf67e17e85
|
@ -26,7 +26,7 @@ $(document).ready(function() {
|
|||
// Switching in double consumptions mode should update the layout
|
||||
let double_conso_obj = $("#double_conso");
|
||||
double_conso_obj.click(function() {
|
||||
$("#consos_list_div").show();
|
||||
$("#consos_list_div").attr('class', 'col-xl-5');
|
||||
$("#infos_div").attr('class', 'col-sm-5 col-xl-6');
|
||||
$("#note_infos_div").attr('class', 'col-xl-3');
|
||||
$("#user_select_div").attr('class', 'col-xl-4');
|
||||
|
@ -46,7 +46,7 @@ $(document).ready(function() {
|
|||
|
||||
let single_conso_obj = $("#single_conso");
|
||||
single_conso_obj.click(function() {
|
||||
$("#consos_list_div").hide();
|
||||
$("#consos_list_div").attr('class', 'col-xl-5 d-none');
|
||||
$("#infos_div").attr('class', 'col-sm-5 col-md-4');
|
||||
$("#note_infos_div").attr('class', 'col-xl-5');
|
||||
$("#user_select_div").attr('class', 'col-xl-7');
|
||||
|
@ -74,8 +74,6 @@ $(document).ready(function() {
|
|||
double_conso_obj.removeAttr('checked');
|
||||
$("label[for='double_conso']").attr('class', 'btn btn-sm btn-outline-primary');
|
||||
|
||||
$("#consos_list_div").hide();
|
||||
|
||||
$("#consume_all").click(consumeAll);
|
||||
});
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-5" id="consos_list_div">
|
||||
<div class="col-xl-5 d-none" id="consos_list_div">
|
||||
<div class="card border-info shadow mb-4">
|
||||
<div class="card-header">
|
||||
<p class="card-text font-weight-bold">
|
||||
|
@ -150,7 +150,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script type="text/javascript" src="/static/js/consos.js"></script>
|
||||
<script type="text/javascript" src="{% static "js/consos.js" %}"></script>
|
||||
<script type="text/javascript">
|
||||
{% for button in most_used %}
|
||||
{% if button.display %}
|
||||
|
|
Loading…
Reference in New Issue