fix times sound events pandora_enterprise#12607

This commit is contained in:
daniel 2023-12-15 09:11:05 +01:00
parent cf692ba7ef
commit e14a2bcb67
2 changed files with 5 additions and 21 deletions

View File

@ -1773,23 +1773,6 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) {
"display",
"none"
);
// Handle the 'change' event for #modal-sound, simply to compact the size of the img "No alerts discovered"
// An image should always have a size assigned!!!
$("#modal-sound").on("change", function() {
// Find the image within the specific div
var image = $(this).find(
'img.invert_filter.forced_title[data-title="No alerts discovered"][alt="No alerts discovered"]'
);
// Set the desired width and height
var width = 48;
var height = 48;
// Resize the image
image.width(width);
image.height(height);
});
}
} catch (e) {
console.log(e);

View File

@ -77,6 +77,7 @@ echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/
echo ui_require_css_file('wizard', 'include/styles/', true);
echo ui_require_css_file('discovery', 'include/styles/', true);
echo ui_require_css_file('sound_events', 'include/styles/', true);
echo ui_require_css_file('events', 'include/styles/', true);
echo '<script type="text/javascript" src="../../include/javascript/jquery.current.js"></script>';
echo '<script type="text/javascript" src="../../include/javascript/jquery.pandora.js"></script>';
@ -126,7 +127,7 @@ $output = '<div id="tabs-sound-modal">';
$output .= '</ul>';
// Content tabs.
$output .= '<div id="tabs-sound-modal-1">';
$output .= '<div id="tabs-sound-modal-1" style="height: 350px;">';
$output .= '<h3 class="title-discovered-alerts">';
$output .= __('Console configuration').ui_print_help_tip(__('Warning: Minimizing this window will cause the Acoustic Console to not work as expected'), true);
$output .= '</h3>';
@ -251,7 +252,7 @@ $output = '<div id="tabs-sound-modal">';
);
$output .= '</div>';
$output .= '<div id="tabs-sound-modal-2" style="height: 290px;">';
$output .= '<div id="tabs-sound-modal-2" style="height: 350px;">';
$output .= '<h3 class="title-discovered-alerts">';
$output .= __('Discovered alerts');
$output .= '</h3>';
@ -268,7 +269,7 @@ $output = '<div id="tabs-sound-modal">';
$output .= __('Congrats! theres nothing to show');
$output .= '</span>';
$output .= '</div>';
$output .= '<div class="elements-discovered-alerts" style="max-height:250px !important;"><ul></ul></div>';
$output .= '<div class="elements-discovered-alerts" style="max-height:315px !important;"><ul></ul></div>';
$output .= html_print_input_hidden(
'ajax_file_sound_console',
ui_get_full_url('ajax.php', false, false, false),
@ -518,7 +519,7 @@ function check_event_sound() {
"beforeend",
'<input type="hidden" value="' + element.event_timestamp + '" class="li-hidden"/>'
);
$("#tabs-sound-modal .elements-discovered-alerts ul").append(li);
$("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li);
});
// -100 delay sound.