mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
remove old format events sounds pandora_enterprise#10208
This commit is contained in:
parent
3f000f403a
commit
95575b4e90
@ -1475,7 +1475,24 @@ if ($pure) {
|
|||||||
|
|
||||||
// Sound events.
|
// Sound events.
|
||||||
$sound_event['active'] = false;
|
$sound_event['active'] = false;
|
||||||
$sound_event['text'] = '<a href="javascript: openSoundEventWindow();">'.html_print_image(
|
|
||||||
|
// Sound Events.
|
||||||
|
$data_sound = base64_encode(
|
||||||
|
json_encode(
|
||||||
|
[
|
||||||
|
'title' => __('Sound Console'),
|
||||||
|
'start' => __('Start'),
|
||||||
|
'stop' => __('Stop'),
|
||||||
|
'noAlert' => __('No alert'),
|
||||||
|
'silenceAlarm' => __('Silence alarm'),
|
||||||
|
'url' => ui_get_full_url('ajax.php'),
|
||||||
|
'page' => 'include/ajax/events',
|
||||||
|
'urlSound' => 'include/sounds/',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$sound_event['text'] = '<a href="javascript: openSoundEventModal(`'.$data_sound.'`);">'.html_print_image(
|
||||||
'images/sound.png',
|
'images/sound.png',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
@ -1565,27 +1582,6 @@ if ($pure) {
|
|||||||
unset($onheader['fullscreen']);
|
unset($onheader['fullscreen']);
|
||||||
ui_meta_print_header(__('Events'), $section_string, $onheader);
|
ui_meta_print_header(__('Events'), $section_string, $onheader);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function openSoundEventWindow() {
|
|
||||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
|
||||||
// devicePixelRatio knows how much zoom browser applied.
|
|
||||||
var windowScale = parseFloat(window.devicePixelRatio);
|
|
||||||
var defaultWidth = 630;
|
|
||||||
var defaultHeight = 630;
|
|
||||||
// If the scale is 1, no zoom has been applied.
|
|
||||||
var windowWidth = windowScale <= 1 ? defaultWidth : windowScale*defaultWidth;
|
|
||||||
var windowHeight = windowScale <= 1 ? defaultHeight : windowScale*defaultHeight + (defaultHeight*0.1);
|
|
||||||
|
|
||||||
window.open(
|
|
||||||
url,
|
|
||||||
'<?php __('Sound Alerts'); ?>',
|
|
||||||
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enterprise_installed() === true) {
|
if (enterprise_installed() === true) {
|
||||||
|
@ -457,26 +457,6 @@ if ($access_console_node === true) {
|
|||||||
|
|
||||||
ui_require_javascript_file('pandora_events');
|
ui_require_javascript_file('pandora_events');
|
||||||
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function openSoundEventWindow() {
|
|
||||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
|
||||||
// devicePixelRatio knows how much zoom browser applied.
|
|
||||||
var windowScale = parseFloat(window.devicePixelRatio);
|
|
||||||
var defaultWidth = 630;
|
|
||||||
var defaultHeight = 630;
|
|
||||||
// If the scale is 1, no zoom has been applied.
|
|
||||||
var windowWidth = windowScale <= 1 ? defaultWidth : windowScale*defaultWidth;
|
|
||||||
var windowHeight = windowScale <= 1 ? defaultHeight : windowScale*defaultHeight + (defaultHeight*0.1);
|
|
||||||
|
|
||||||
window.open(
|
|
||||||
url,
|
|
||||||
'<?php __('Sound Alerts'); ?>',
|
|
||||||
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
$menu_operation['eventos']['sub'] = $sub;
|
$menu_operation['eventos']['sub'] = $sub;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user