From b497e573fef4254514b5a080b53adbdc0fe729af Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 23 Nov 2023 14:18:29 +0100 Subject: [PATCH] fix modal events sound bottom bar pandora_enterprise#12378 --- pandora_console/images/desacoplar-ventana.svg | 14 +++++ pandora_console/images/minimizar.svg | 7 +++ .../include/javascript/pandora_events.js | 62 ++++--------------- pandora_console/include/styles/events.css | 4 ++ .../include/styles/js/jquery-ui_custom.css | 22 ++----- pandora_console/include/styles/pandora.css | 13 ++++ 6 files changed, 55 insertions(+), 67 deletions(-) create mode 100644 pandora_console/images/desacoplar-ventana.svg create mode 100644 pandora_console/images/minimizar.svg diff --git a/pandora_console/images/desacoplar-ventana.svg b/pandora_console/images/desacoplar-ventana.svg new file mode 100644 index 0000000000..0b3cbca31d --- /dev/null +++ b/pandora_console/images/desacoplar-ventana.svg @@ -0,0 +1,14 @@ + + + Icons/Dark/20/desacoplar-ventana + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/minimizar.svg b/pandora_console/images/minimizar.svg new file mode 100644 index 0000000000..957268b4ea --- /dev/null +++ b/pandora_console/images/minimizar.svg @@ -0,0 +1,7 @@ + + + Icons/Dark/20/minimizar + + + + \ No newline at end of file diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 86b84376c5..eb93608ff9 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1004,6 +1004,7 @@ function openSoundEventsDialog(settings, dialog_parameters, reload) { modal: false, width: 600, height: 600, + dialogClass: "modal-sound", open: function() { $.ajax({ method: "post", @@ -1064,10 +1065,10 @@ function openSoundEventsDialog(settings, dialog_parameters, reload) { if (reload == false && dialog_parameters != undefined) { if ($("#button-start-search").hasClass("play")) { - $("#filter_id").val(dialog_parameters["filter_id"]); - $("#interval").val(dialog_parameters["interval"]); - $("#time_sound").val(dialog_parameters["time_sound"]); - $("#sound_id").val(dialog_parameters["sound_id"]); + $("#filter_id").val(dialog_parameters.filter_id); + $("#interval").val(dialog_parameters.interval); + $("#time_sound").val(dialog_parameters.time_sound); + $("#sound_id").val(dialog_parameters.sound_id); $("#filter_id").trigger("change"); $("#interval").trigger("change"); @@ -1124,14 +1125,15 @@ function openSoundEventsDialog(settings, dialog_parameters, reload) { } function openSoundEventModal(settings) { + var win = ""; if ($("#hidden-metaconsole_activated").val() === "1") { - var win = open( + win = open( "../../operation/events/sound_events.php", "day_123", "width=600,height=500" ); } else { - var win = open( + win = open( "operation/events/sound_events.php", "day_123", "width=600,height=500" @@ -1502,11 +1504,6 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) { typeof requestBody.includes === "function" && requestBody.includes("drawConsoleSound=1") ) { - console.log( - "AJAX request sent with drawConsoleSound=1:", - ajaxOptions.url - ); - // Find the dialog element by the aria-describedby attribute var dialog = $('[aria-describedby="modal-sound"]'); @@ -1516,62 +1513,32 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) { // Add the minimize button before the close button var minimizeButton = $("