mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-08-16 15:28:43 +02:00
#13083 fixed tz time acoustic console
This commit is contained in:
parent
69333a88e0
commit
9bd75bdf74
@ -437,7 +437,7 @@ function check_event_sound() {
|
||||
let element_time = $(this)
|
||||
.children(".li-hidden")
|
||||
.val();
|
||||
let obj_time = new Date(element_time);
|
||||
let obj_time = new Date(element_time * 1000);
|
||||
let current_dt = new Date();
|
||||
let timestamp = current_dt.getTime() - obj_time.getTime();
|
||||
timestamp = timestamp / 1000;
|
||||
@ -492,13 +492,13 @@ function check_event_sound() {
|
||||
// Remove audio.
|
||||
remove_audio();
|
||||
var urlSound = '../../include/sounds/'+$('#sound_id :selected').val();
|
||||
console.log(urlSound)
|
||||
|
||||
// Apend audio.
|
||||
add_audio(urlSound);
|
||||
|
||||
// Add elements.
|
||||
data.forEach(function(element) {
|
||||
console.log(element);
|
||||
|
||||
var li = document.createElement("li");
|
||||
var b64 = btoa(JSON.stringify(element));
|
||||
li.insertAdjacentHTML(
|
||||
@ -519,7 +519,7 @@ function check_event_sound() {
|
||||
);
|
||||
li.insertAdjacentHTML(
|
||||
"beforeend",
|
||||
'<input type="hidden" value="' + element.event_timestamp + '" class="li-hidden"/>'
|
||||
'<input type="hidden" value="' + element.utimestamp + '" class="li-hidden"/>'
|
||||
);
|
||||
$("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user