update Mi 6. Mai 15:31:01 CEST 2020
This commit is contained in:
parent
274bdd27fa
commit
d144a73526
@ -5,7 +5,7 @@ $(document).ready(function () {
|
|||||||
set_clock();
|
set_clock();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).on("resize", function () {
|
$(window).on('resize', function () {
|
||||||
resize_text();
|
resize_text();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -17,11 +17,11 @@ $(window).on("resize", function () {
|
|||||||
var waipAudio = document.getElementById('audio');
|
var waipAudio = document.getElementById('audio');
|
||||||
|
|
||||||
waipAudio.addEventListener('ended', function(){
|
waipAudio.addEventListener('ended', function(){
|
||||||
$('.ion-md-pause').toggleClass("ion-md-play-circle");
|
$('.ion-md-pause').toggleClass('ion-md-play-circle');
|
||||||
});
|
});
|
||||||
|
|
||||||
waipAudio.addEventListener("play", function () {
|
waipAudio.addEventListener('play', function () {
|
||||||
$('.ion-md-play-circle').toggleClass("ion-md-pause");
|
$('.ion-md-play-circle').toggleClass('ion-md-pause');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#replay').on('click', function (event) {
|
$('#replay').on('click', function (event) {
|
||||||
@ -60,17 +60,17 @@ function resize_text() {
|
|||||||
// Text nach bestimmter Laenge, in Abhaengigkeit von Zeichen, umbrechen
|
// Text nach bestimmter Laenge, in Abhaengigkeit von Zeichen, umbrechen
|
||||||
function break_text_15(text) {
|
function break_text_15(text) {
|
||||||
var new_text;
|
var new_text;
|
||||||
new_text = text.replace(/.{15}(\s+|\-+)+/g, "$&@")
|
new_text = text.replace(/.{15}(\s+|\-+)+/g, '$&@')
|
||||||
new_text = new_text.split(/@/);
|
new_text = new_text.split(/@/);
|
||||||
new_text = new_text.join("<br>");
|
new_text = new_text.join('<br>');
|
||||||
//console.log(new_text);
|
//console.log(new_text);
|
||||||
return new_text;
|
return new_text;
|
||||||
};
|
};
|
||||||
|
|
||||||
function break_text_35(text) {
|
function break_text_35(text) {
|
||||||
var new_text;
|
var new_text;
|
||||||
new_text = text.replace(/.{50}\S*\s+/g, "$&@").split(/\s+@/);
|
new_text = text.replace(/.{50}\S*\s+/g, '$&@').split(/\s+@/);
|
||||||
new_text = new_text.join("<br>");
|
new_text = new_text.join('<br>');
|
||||||
//console.log(new_text);
|
//console.log(new_text);
|
||||||
return new_text;
|
return new_text;
|
||||||
};
|
};
|
||||||
@ -83,15 +83,15 @@ var timeoutID;
|
|||||||
|
|
||||||
// Inactivitaet auswerten
|
// Inactivitaet auswerten
|
||||||
function setup_inactivcheck() {
|
function setup_inactivcheck() {
|
||||||
this.addEventListener("mousemove", resetActivTimer, false);
|
this.addEventListener('mousemove', resetActivTimer, false);
|
||||||
this.addEventListener("mousedown", resetActivTimer, false);
|
this.addEventListener('mousedown', resetActivTimer, false);
|
||||||
this.addEventListener("keypress", resetActivTimer, false);
|
this.addEventListener('keypress', resetActivTimer, false);
|
||||||
this.addEventListener("DOMMouseScroll", resetActivTimer, false);
|
this.addEventListener('DOMMouseScroll', resetActivTimer, false);
|
||||||
this.addEventListener("mousewheel", resetActivTimer, {
|
this.addEventListener('mousewheel', resetActivTimer, {
|
||||||
passive: true
|
passive: true
|
||||||
}, false);
|
}, false);
|
||||||
this.addEventListener("touchmove", resetActivTimer, false);
|
this.addEventListener('touchmove', resetActivTimer, false);
|
||||||
this.addEventListener("MSPointerMove", resetActivTimer, false);
|
this.addEventListener('MSPointerMove', resetActivTimer, false);
|
||||||
start_inactivtimer();
|
start_inactivtimer();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -408,11 +408,11 @@ socket.on('io.neuerEinsatz', function (data) {
|
|||||||
start_counter(data.zeitstempel, data.ablaufzeit);
|
start_counter(data.zeitstempel, data.ablaufzeit);
|
||||||
// alte Rückmeldung entfernen
|
// alte Rückmeldung entfernen
|
||||||
reset_rmld(data.uuid);
|
reset_rmld(data.uuid);
|
||||||
//recount_rmld(pg_waip_uuid);//, item_type, item_agt);
|
recount_rmld(data.uuid);
|
||||||
// TODO: Einzeige vergrößern wenn Felder nicht angezeigt werden
|
// TODO: Einzeige vergrößern wenn Felder nicht angezeigt werden
|
||||||
// Uhr ausblenden
|
// Uhr ausblenden
|
||||||
$("#waipclock").addClass("d-none");
|
$('#waipclock').addClass('d-none');
|
||||||
$("#waiptableau").removeClass("d-none");
|
$('#waiptableau').removeClass('d-none');
|
||||||
// Text anpassen
|
// Text anpassen
|
||||||
resize_text();
|
resize_text();
|
||||||
});
|
});
|
||||||
@ -448,7 +448,7 @@ socket.on('io.response', function (data) {
|
|||||||
// Progressbar hinterlegen
|
// Progressbar hinterlegen
|
||||||
add_resp_progressbar(pg_waip_uuid, pg_rmld_uuid, item_type, item_agt, pg_start, pg_end);
|
add_resp_progressbar(pg_waip_uuid, pg_rmld_uuid, item_type, item_agt, pg_start, pg_end);
|
||||||
// Anzahl der Rückmeldung zählen
|
// Anzahl der Rückmeldung zählen
|
||||||
recount_rmld(pg_waip_uuid);//, item_type, item_agt);
|
recount_rmld(pg_waip_uuid);
|
||||||
});
|
});
|
||||||
// Text anpassen
|
// Text anpassen
|
||||||
resize_text();
|
resize_text();
|
||||||
@ -467,6 +467,16 @@ function reset_rmld(p_uuid) {
|
|||||||
$(this).remove;
|
$(this).remove;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
$('#pg-ma').children().each(function(i) {
|
||||||
|
if (!$(this).hasClass(bar_uuid)) {
|
||||||
|
$(this).remove;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
$('#pg-fk').children().each(function(i) {
|
||||||
|
if (!$(this).hasClass(bar_uuid)) {
|
||||||
|
$(this).remove;
|
||||||
|
};
|
||||||
|
});
|
||||||
/*$('#pg-ek').empty();
|
/*$('#pg-ek').empty();
|
||||||
$('#pg-ma').empty();
|
$('#pg-ma').empty();
|
||||||
$('#pg-fk').empty();
|
$('#pg-fk').empty();
|
||||||
@ -529,60 +539,63 @@ function do_rmld_bar(p_id, start, end) {
|
|||||||
secondsDifference = '0' + secondsDifference;
|
secondsDifference = '0' + secondsDifference;
|
||||||
};
|
};
|
||||||
var minutes = minutesDifference + ':' + secondsDifference;
|
var minutes = minutesDifference + ':' + secondsDifference;
|
||||||
|
|
||||||
// Progressbar anpassen
|
// Progressbar anpassen
|
||||||
if (current_progress >= 100) {
|
if (current_progress >= 100) {
|
||||||
$("#pg-bar-" + p_id)
|
$('#pg-bar-' + p_id)
|
||||||
.css("width", "100%")
|
.css('width', '100%')
|
||||||
.attr("aria-valuenow", 100)
|
.attr('aria-valuenow', 100)
|
||||||
.addClass("ion-md-checkmark-circle");
|
.addClass('ion-md-checkmark-circle');
|
||||||
$("#pg-text" + p_id).text("");
|
$('#pg-text-' + p_id).text('');
|
||||||
clearInterval(counter_ID[p_id]);
|
clearInterval(counter_ID[p_id]);
|
||||||
} else {
|
} else {
|
||||||
$("#pg-bar-" + p_id)
|
$('#pg-bar-' + p_id)
|
||||||
.css("width", current_progress + "%")
|
.css('width', current_progress + '%')
|
||||||
.attr("aria-valuenow", current_progress);
|
.attr('aria-valuenow', current_progress);
|
||||||
$("#pg-text-" + p_id).text(minutes);
|
$('#pg-text-' + p_id).text(minutes);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function recount_rmld(p_uuid) {
|
function recount_rmld(p_uuid) {
|
||||||
var bar_uuid = 'bar-' + p_uuid;
|
var bar_uuid = 'bar-' + p_uuid;
|
||||||
|
var agt_count = 0;
|
||||||
// Zähler auf 0 Setzen
|
// Zähler auf 0 Setzen
|
||||||
$('#ek-counter').text(0);
|
$('#ek-counter').text(0);
|
||||||
$('#ma-counter').text(0);
|
$('#ma-counter').text(0);
|
||||||
$('#fk-counter').text(0);
|
$('#fk-counter').text(0);
|
||||||
|
$('#agt-counter').text(0);
|
||||||
|
// EK zählen
|
||||||
$('#pg-ek').children().each(function(i) {
|
$('#pg-ek').children().each(function(i) {
|
||||||
if ($(this).hasClass(bar_uuid)) {
|
if ($(this).hasClass(bar_uuid)) {
|
||||||
var tmp_count = parseInt($('#ek-counter').text());
|
var tmp_count = parseInt($('#ek-counter').text());
|
||||||
$('#ek-counter').text(tmp_count + 1);
|
$('#ek-counter').text(tmp_count + 1);
|
||||||
|
if ($(this).hasClass('border-warning')) {
|
||||||
|
agt_count++;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
// MA zählen
|
||||||
$('#pg-ma').children().each(function(i) {
|
$('#pg-ma').children().each(function(i) {
|
||||||
if ($(this).hasClass(bar_uuid)) {
|
if ($(this).hasClass(bar_uuid)) {
|
||||||
var tmp_count = parseInt($('#ma-counter').text());
|
var tmp_count = parseInt($('#ma-counter').text());
|
||||||
$('#ma-counter').text(tmp_count + 1);
|
$('#ma-counter').text(tmp_count + 1);
|
||||||
|
if ($(this).hasClass('border-warning')) {
|
||||||
|
agt_count++;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
// FK zählen
|
||||||
$('#pg-fk').children().each(function(i) {
|
$('#pg-fk').children().each(function(i) {
|
||||||
if ($(this).hasClass(bar_uuid)) {
|
if ($(this).hasClass(bar_uuid)) {
|
||||||
var tmp_count = parseInt($('#fk-counter').text());
|
var tmp_count = parseInt($('#fk-counter').text());
|
||||||
$('#fk-counter').text(tmp_count + 1);
|
$('#fk-counter').text(tmp_count + 1);
|
||||||
|
if ($(this).hasClass('border-warning')) {
|
||||||
|
agt_count++;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
// AGT setzen
|
||||||
|
$('#agt-counter').text(agt_count);
|
||||||
/* var tmp_count = parseInt($('#' + item_type + '-counter').text());
|
};
|
||||||
$('#' + item_type + '-counter').text(tmp_count + 1);
|
|
||||||
|
|
||||||
if (pg_agt) {
|
|
||||||
var tmp_agt = parseInt($('#agt-counter').text());
|
|
||||||
$('#agt-counter').text(tmp_agt + 1);
|
|
||||||
};*/
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ########################### */
|
/* ########################### */
|
||||||
/* ####### SCREENSAVER ####### */
|
/* ####### SCREENSAVER ####### */
|
||||||
|
|||||||
@ -370,6 +370,7 @@ module.exports = function (db, uuidv4, turf, app_cfg) {
|
|||||||
// je nach laenge andere SQL ausfuehren
|
// je nach laenge andere SQL ausfuehren
|
||||||
db.get(`SELECT
|
db.get(`SELECT
|
||||||
e.id,
|
e.id,
|
||||||
|
e.uuid,
|
||||||
DATETIME(e.zeitstempel, 'localtime') zeitstempel,
|
DATETIME(e.zeitstempel, 'localtime') zeitstempel,
|
||||||
DATETIME(e.zeitstempel, '+' || (
|
DATETIME(e.zeitstempel, '+' || (
|
||||||
SELECT COALESCE(MAX(reset_counter), ?) reset_counter FROM waip_user_config WHERE user_id = ?
|
SELECT COALESCE(MAX(reset_counter), ?) reset_counter FROM waip_user_config WHERE user_id = ?
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
#map.h-100.rounded
|
#map.h-100.rounded
|
||||||
.col-12.col-7_ls.h-40.h-70_ls
|
.col-12.col-7_ls.h-40.h-70_ls
|
||||||
.row.no-gutters.h-100.pt-3
|
.row.no-gutters.h-100.pt-3
|
||||||
.col-12.h-20.h-100.w-100
|
.col-12.h-20.h-100.w-100#rmld_container
|
||||||
// TODO: Rueckmedlung ohne Rueckmeldung ausbleden
|
// TODO: Rueckmedlung ohne Rueckmeldung ausbleden
|
||||||
.d-flex.fustify-content-between.font-weight-bold
|
.d-flex.fustify-content-between.font-weight-bold
|
||||||
.list-group.list-group-horizontal.text-center.w-100
|
.list-group.list-group-horizontal.text-center.w-100
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user