mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-7959-problemas-visualizacion-alertas-sonoras' into 'develop'
Fixed visual issues and handle browser zoom Closes pandora_enterprise#7959 See merge request artica/pandorafms!4484
This commit is contained in:
commit
b36318c450
@ -6162,9 +6162,8 @@ div.graph div.legend table {
|
|||||||
|
|
||||||
.sound_events {
|
.sound_events {
|
||||||
background-color: #494949;
|
background-color: #494949;
|
||||||
max-width: 550px;
|
margin: 40px 2em 0;
|
||||||
max-height: 400px;
|
min-height: auto;
|
||||||
margin-top: 40px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.w16px {
|
.w16px {
|
||||||
|
@ -427,11 +427,18 @@ if (check_acl($config['id_user'], 0, 'ER')
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function openSoundEventWindow() {
|
function openSoundEventWindow() {
|
||||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
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 = 600;
|
||||||
|
var defaultHeight = 450;
|
||||||
|
// 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(
|
window.open(
|
||||||
url,
|
url,
|
||||||
'<?php __('Sound Alerts'); ?>',
|
'<?php __('Sound Alerts'); ?>',
|
||||||
'width=600, height=450, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user