Commit c14fce2d by François C.

#4712: Improve color background render for members in 'Borne accueil'

parent 5790b181
...@@ -29,7 +29,7 @@ video {max-width:none;} ...@@ -29,7 +29,7 @@ video {max-width:none;}
#webcam_button {min-width:115px; max-width:115px;} #webcam_button {min-width:115px; max-width:115px;}
#multi_results_preview button {margin:2px;} #multi_results_preview button {margin:2px;}
#member_slide {grid-gap:0;padding:5px;display:none;} #member_slide {grid-gap:0;padding:5px;display:none;}
#member_slide .coop-info {background: #fbfbd5;} #member_slide .coop-info {background: #449d44;}
#image_medium {width:128px;float:left;} #image_medium {width:128px;float:left;}
#image_medium:hover {cursor: url(/static/img/ip-camera.png), url(/static/img/ip-camera.svg) 5 5, pointer;} #image_medium:hover {cursor: url(/static/img/ip-camera.png), url(/static/img/ip-camera.svg) 5 5, pointer;}
#barcode {height:128px;} #barcode {height:128px;}
......
...@@ -101,18 +101,23 @@ function fill_member_slide(member) { ...@@ -101,18 +101,23 @@ function fill_member_slide(member) {
} }
html_elts.image_medium.html('<img src="'+img_src+'" width="128" />'); html_elts.image_medium.html('<img src="'+img_src+'" width="128" />');
html_elts.cooperative_state.html(member.cooperative_state); html_elts.cooperative_state.html(member.cooperative_state);
if (member.cooperative_state == 'Rattrapage') { if (member.cooperative_state == 'Suspendu(e)') {
var explanation = "Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre."; var explanation = "Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre.";
html_elts.status_explanation.html(explanation); html_elts.status_explanation.html(explanation);
} }
if (member.cooperative_state == 'Désinscrit(e)' || member.cooperative_state == 'Parti(e)') coop_info.addClass('b_red'); if (member.cooperative_state == 'Désinscrit(e)' || member.cooperative_state == 'Parti(e)') {
else if (member.cooperative_state == 'En alerte' || member.cooperative_state == 'Délai accordé' || member.cooperative_state == 'Rattrapage') coop_info.addClass('b_orange'); coop_info.addClass('b_red');
}
else if (member.cooperative_state == 'En alerte' || member.cooperative_state == 'Délai accordé') {
coop_info.addClass('b_yellow')
} else if (member.cooperative_state == 'Suspendu(e)') {
coop_info.addClass('b_orange');
}
if (member.shifts.length > 0) { if (member.shifts.length > 0) {
html_elts.next_shifts.append('Prochains services : '); html_elts.next_shifts.append('Prochains services : ');
var slist = $('<ul>'); var slist = $('<ul>');
for (i in member.shifts) { for (i in member.shifts) {
var s = $('<li>').text(member.shifts[i].start); var s = $('<li>').text(member.shifts[i].start);
......
.green {color:#60B000;} .green {color:#60B000;}
.b_green, .b_more_than_50pc {background:#d9ebd2} .b_green, .b_more_than_50pc {background:#d9ebd2 !important;}
.orange {color:#FFA500;} .orange {color:#FFA500;}
.b_orange, .b_less_than_50pc {background:#F0B000 !important;} .b_orange, .b_less_than_50pc {background:#F0B000 !important;}
.yellow {color:#F0B000;} .yellow {color:#F0B000;}
.b_yellow {background: #fcf3cc;} .b_yellow {background: #fcf3cc !important;}
.red {color:#FF0000;} .red {color:#FF0000;}
.b_red, .b_less_than_25pc {background:#ff3333 !important;} .b_red, .b_less_than_25pc {background:#ff3333 !important;}
.loading {background-image: url("/static/img/ajax-loader.gif"); background-repeat:no-repeat; background-position: center; background-color: #efefef;} .loading {background-image: url("/static/img/ajax-loader.gif"); background-repeat:no-repeat; background-position: center; background-color: #efefef;}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment