update Mo 2. Mär 09:31:01 CET 2020
This commit is contained in:
parent
24541d5d8a
commit
38257ce6f1
@ -48,7 +48,7 @@ function add_resp_progressbar(p_id, p_type, p_start, p_end) {
|
|||||||
//
|
//
|
||||||
//<div class="progress mt-1">
|
//<div class="progress mt-1">
|
||||||
//<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">2min</div></div>
|
//<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">2min</div></div>
|
||||||
$( '#pg-fk' ).append( '<div class="progress mt-1" id="pg-' + p_id + '"></div>' );
|
$( '#pg-fk' ).append( '<div class="progress mt-1" id="pg-' + p_id + ' style="height: 0.9375rem; font-size: 0.9375rem;"></div>' );
|
||||||
$( '#pg-'+ p_id ).append( '<div id="pg-bar'+ p_id +'" class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>' );
|
$( '#pg-'+ p_id ).append( '<div id="pg-bar'+ p_id +'" class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>' );
|
||||||
|
|
||||||
|
|
||||||
@ -56,12 +56,12 @@ function add_resp_progressbar(p_id, p_type, p_start, p_end) {
|
|||||||
|
|
||||||
clearInterval(counter_ID[p_id]);
|
clearInterval(counter_ID[p_id]);
|
||||||
counter_ID[p_id] = setInterval(function() {
|
counter_ID[p_id] = setInterval(function() {
|
||||||
do_progressbar('pg-bar'+ p_id, p_start, p_end);
|
do_progressbar(p_id, p_start, p_end);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function do_progressbar(div_id, start, end) {
|
function do_progressbar(p_id, start, end) {
|
||||||
today = new Date();
|
today = new Date();
|
||||||
// restliche Zeit ermitteln
|
// restliche Zeit ermitteln
|
||||||
//var current_progress = Math.round(100 / (end.getTime() - start.getTime()) * (end.getTime() - today.getTime()));
|
//var current_progress = Math.round(100 / (end.getTime() - start.getTime()) * (end.getTime() - today.getTime()));
|
||||||
@ -78,11 +78,20 @@ function add_resp_progressbar(p_id, p_type, p_start, p_end) {
|
|||||||
|
|
||||||
|
|
||||||
// Progressbar anpassen
|
// Progressbar anpassen
|
||||||
$("#"+div_id)
|
if (current_progress >= 100) {
|
||||||
|
$("#pg-bar"+p_id)
|
||||||
|
.css("width", "100%")
|
||||||
|
.attr("aria-valuenow", 100)
|
||||||
|
.text("")
|
||||||
|
.addClass("ion-md-checkmark-circle");
|
||||||
|
clearInterval(counter_ID[p_id]);
|
||||||
|
} else {
|
||||||
|
$("#pg-bar"+p_id)
|
||||||
.css("width", current_progress + "%")
|
.css("width", current_progress + "%")
|
||||||
.attr("aria-valuenow", current_progress)
|
.attr("aria-valuenow", current_progress)
|
||||||
.text(minutes + " min");
|
.text(minutes + " min");
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -296,9 +305,7 @@ var item_id = Math.floor(Math.random() * 100) + Math.floor(Math.random() * 100);
|
|||||||
end: new Date(arrayItem.arrival_time),
|
end: new Date(arrayItem.arrival_time),
|
||||||
content: item_content
|
content: item_content
|
||||||
};
|
};
|
||||||
if (arrayItem.fuehrungskraft == 1){
|
|
||||||
add_resp_progressbar(item_id, item_classname, new Date(arrayItem.set_time), new Date(arrayItem.arrival_time));
|
add_resp_progressbar(item_id, item_classname, new Date(arrayItem.set_time), new Date(arrayItem.arrival_time));
|
||||||
};
|
|
||||||
items.add(new_item);
|
items.add(new_item);
|
||||||
groups.update({ id: arrayItem.wache, content: arrayItem.wache });
|
groups.update({ id: arrayItem.wache, content: arrayItem.wache });
|
||||||
});
|
});
|
||||||
|
|||||||
@ -237,10 +237,12 @@ style(type='text/css').
|
|||||||
//a.badge.badge-warning 2 AGT
|
//a.badge.badge-warning 2 AGT
|
||||||
.row
|
.row
|
||||||
.col-4
|
.col-4
|
||||||
.progress.mt-1
|
.progress.mt-1(style='height: 0.9375rem;font-size: 0.9375rem;')
|
||||||
.progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 2min
|
.progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100')
|
||||||
.progress.mt-1.border.border-warning
|
a(style='') 2min
|
||||||
.progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 2min
|
.progress.mt-1.border.border-warning(style='height: 20px;')
|
||||||
|
.progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100')
|
||||||
|
h 2min
|
||||||
.progress.mt-1
|
.progress.mt-1
|
||||||
.progress-bar.progress-bar-striped.bg-success.ion-md-checkmark-circle(role='progressbar', style='width: 100%', aria-valuenow='100', aria-valuemin='0', aria-valuemax='100')
|
.progress-bar.progress-bar-striped.bg-success.ion-md-checkmark-circle(role='progressbar', style='width: 100%', aria-valuenow='100', aria-valuemin='0', aria-valuemax='100')
|
||||||
.col-4
|
.col-4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user