add sound events to metaconsole pandora_enterprise#8854
This commit is contained in:
parent
c678207f5d
commit
ccc2e830f4
|
@ -2270,7 +2270,7 @@ if ($drawConsoleSound === true) {
|
|||
],
|
||||
],
|
||||
[
|
||||
'label' => __('Time Sound'),
|
||||
'label' => __('Sound duration'),
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $times_sound,
|
||||
|
|
|
@ -920,7 +920,7 @@ function openSoundEventModal(settings) {
|
|||
sound = true;
|
||||
}
|
||||
|
||||
test_sound_button(sound);
|
||||
test_sound_button(sound, settings.urlSound);
|
||||
});
|
||||
|
||||
// Play Stop.
|
||||
|
@ -977,9 +977,9 @@ function openSoundEventModal(settings) {
|
|||
.show();
|
||||
}
|
||||
|
||||
function test_sound_button(test_sound) {
|
||||
function test_sound_button(test_sound, urlSound) {
|
||||
if (test_sound === true) {
|
||||
add_audio();
|
||||
add_audio(urlSound);
|
||||
} else {
|
||||
remove_audio();
|
||||
}
|
||||
|
@ -1035,8 +1035,8 @@ function action_events_sound(mode, settings) {
|
|||
}
|
||||
}
|
||||
|
||||
function add_audio() {
|
||||
var sound = "./include/sounds/" + $("#tabs-sound-modal #sound_id").val();
|
||||
function add_audio(urlSound) {
|
||||
var sound = urlSound + $("#tabs-sound-modal #sound_id").val();
|
||||
$(".actions-sound-modal").append(
|
||||
"<audio id='id_sound_event' src='" +
|
||||
sound +
|
||||
|
@ -1062,7 +1062,7 @@ function listen_event_sound(settings) {
|
|||
|
||||
function check_event_sound(settings) {
|
||||
jQuery.post(
|
||||
"./ajax.php",
|
||||
settings.url,
|
||||
{
|
||||
page: "include/ajax/events",
|
||||
get_events_fired: 1,
|
||||
|
@ -1091,7 +1091,7 @@ function check_event_sound(settings) {
|
|||
remove_audio();
|
||||
|
||||
// Apend audio.
|
||||
add_audio();
|
||||
add_audio(settings.urlSound);
|
||||
|
||||
// Add elements.
|
||||
data.forEach(function(element) {
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 18px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#tabs-sound-modal ul.wizard li.interval-sounds label,
|
||||
|
@ -225,6 +226,7 @@ input.upd {
|
|||
background-position: 70px 17px;
|
||||
color: #ffffff;
|
||||
padding-left: 20px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.actions-sound-modal .buttons-sound-modal button.stop,
|
||||
|
@ -234,6 +236,7 @@ input.upd {
|
|||
background-position: 70px 17px;
|
||||
color: #ffffff;
|
||||
padding-left: 20px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.actions-sound-modal .buttons-sound-modal button.alerts,
|
||||
|
|
|
@ -426,10 +426,6 @@ if ($access_console_node === true) {
|
|||
}
|
||||
|
||||
// Sound Events.
|
||||
// $javascript = 'javascript: openSoundEventWindow();';
|
||||
// $sub[$javascript]['text'] = __('Sound Events');
|
||||
// $sub[$javascript]['id'] = 'Sound Events';
|
||||
// $sub[$javascript]['type'] = 'direct';
|
||||
$data_sound = base64_encode(
|
||||
json_encode(
|
||||
[
|
||||
|
@ -440,6 +436,7 @@ if ($access_console_node === true) {
|
|||
'silenceAlarm' => __('Silence alarm'),
|
||||
'url' => ui_get_full_url('ajax.php'),
|
||||
'page' => 'include/ajax/events',
|
||||
'urlSound' => 'include/sounds/',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue