Merge branch 'ent-8854-13786-alertas-sonoras-en-metaconsola' into 'develop'
add sound events to metaconsole pandora_enterprise#8854 See merge request artica/pandorafms!5246
This commit is contained in:
commit
8a6e3e5e06
|
@ -2270,7 +2270,7 @@ if ($drawConsoleSound === true) {
|
|||
],
|
||||
],
|
||||
[
|
||||
'label' => __('Time Sound'),
|
||||
'label' => __('Sound duration'),
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $times_sound,
|
||||
|
|
|
@ -969,7 +969,7 @@ function openSoundEventModal(settings) {
|
|||
sound = true;
|
||||
}
|
||||
|
||||
test_sound_button(sound);
|
||||
test_sound_button(sound, settings.urlSound);
|
||||
});
|
||||
|
||||
// Play Stop.
|
||||
|
@ -1026,9 +1026,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();
|
||||
}
|
||||
|
@ -1084,8 +1084,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 +
|
||||
|
@ -1111,7 +1111,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,
|
||||
|
@ -1140,7 +1140,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 @@
|
|||
background-position: 70px 17px;
|
||||
color: #ffffff;
|
||||
padding-left: 20px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.actions-sound-modal .buttons-sound-modal button.stop,
|
||||
|
@ -234,6 +236,7 @@
|
|||
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