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_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',
|
||||
true,
|
||||
[
|
||||
|
@ -1565,27 +1582,6 @@ if ($pure) {
|
|||
unset($onheader['fullscreen']);
|
||||
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) {
|
||||
|
|
|
@ -457,26 +457,6 @@ if ($access_console_node === true) {
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue