mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fixed margin in public visual consoles
This commit is contained in:
parent
c8121d7df3
commit
e5a2284b8b
@ -1437,79 +1437,29 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if ($layoutData['id_metaconsole'] != 0) {
|
$image_prefix = ($layoutData['id_metaconsole'] != 0) ? "../../" : "";
|
||||||
|
|
||||||
if($layoutData['clock_animation'] == 'analogic_1'){
|
if($layoutData['clock_animation'] == 'analogic_1'){
|
||||||
$img = '<img src="../../images/console/signes/clock.png" style="width:'.$width.'px;height:'. ($width+40).'px;">';
|
$img = '<img src="' . $image_prefix . 'images/console/signes/clock.png" style="width:'.$width.'px;height:'. ($width+40).'px;">';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
$height_offset = ($layoutData['time_format'] == 'time') ? 20 : 40;
|
||||||
if($layoutData['time_format'] == 'time'){
|
$img = '<img src="' . $image_prefix . 'images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+$height_offset).'px;">';
|
||||||
$img = '<img src="../../images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+20).'px;">';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$img = '<img src="../../images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+40).'px;">';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if($layoutData['clock_animation'] == 'analogic_1'){
|
|
||||||
$img = '<img src="images/console/signes/clock.png" style="width:'.$width.'px;height:'. ($width+40).'px;">';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if($layoutData['time_format'] == 'time'){
|
|
||||||
$img = '<img src="images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+20).'px;">';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$img = '<img src="images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+40).'px;">';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if($layoutData['clock_animation'] == 'analogic_1'){
|
if($layoutData['clock_animation'] == 'analogic_1'){
|
||||||
|
|
||||||
if ($width == 0) {
|
|
||||||
if ($layoutData['label_position']=='left') {
|
if ($layoutData['label_position']=='left') {
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' .print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;margin-bottom:15px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
||||||
}
|
}
|
||||||
elseif ($layoutData['label_position']=='right') {
|
elseif ($layoutData['label_position']=='right') {
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;margin-bottom:15px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';height:'.$himg.'px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';height:'.$himg.'px;margin-bottom:15px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
if ($layoutData['label_position']=='left') {
|
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
elseif ($layoutData['label_position']=='right') {
|
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;">' .print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$img ='<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';height:'.$himg.'px;">' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
elseif($layoutData['clock_animation'] == 'digital_1'){
|
elseif($layoutData['clock_animation'] == 'digital_1'){
|
||||||
|
|
||||||
if ($width == 0) {
|
|
||||||
if ($layoutData['label_position']=='left') {
|
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' .print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
elseif ($layoutData['label_position']=='right') {
|
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;">' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';height:'.$himg.'px;">' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if ($layoutData['label_position']=='left') {
|
if ($layoutData['label_position']=='left') {
|
||||||
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
$img = '<div id="clock_'.$layoutData['id'].'" style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'</div>';
|
||||||
}
|
}
|
||||||
@ -1521,7 +1471,6 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case AUTO_SLA_GRAPH:
|
case AUTO_SLA_GRAPH:
|
||||||
if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) {
|
if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) {
|
||||||
|
@ -160,27 +160,6 @@ $ignored_params['refr'] = '';
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//~ var fetchMap = function () {
|
|
||||||
//~ $.ajax({
|
|
||||||
//~ url: 'public_console.php',
|
|
||||||
//~ type: 'GET',
|
|
||||||
//~ dataType: 'html',
|
|
||||||
//~ data: {
|
|
||||||
//~ hash: '<?php echo $hash; ?>',
|
|
||||||
//~ id_layout: <?php echo $id_layout; ?>,
|
|
||||||
//~ graph_javascript: <?php echo (int) $graph_javascript; ?>,
|
|
||||||
//~ id_user: '<?php echo $config['id_user']; ?>',
|
|
||||||
//~ width: $(window).width(),
|
|
||||||
//~ height: $(window).height(),
|
|
||||||
//~ xhr: true
|
|
||||||
//~ }
|
|
||||||
//~ })
|
|
||||||
//~ .done(function (data, textStatus, xhr) {
|
|
||||||
//~ $('div#vc-container').html(data);
|
|
||||||
//~ startCountDown(refr, fetchMap);
|
|
||||||
//~ });
|
|
||||||
//~ }
|
|
||||||
startCountDown(refr, false);
|
startCountDown(refr, false);
|
||||||
// Auto hide controls
|
// Auto hide controls
|
||||||
var controls = document.getElementById('vc-controls');
|
var controls = document.getElementById('vc-controls');
|
||||||
@ -196,7 +175,6 @@ $ignored_params['refr'] = '';
|
|||||||
$('body').css('margin','0');
|
$('body').css('margin','0');
|
||||||
$('body').css('height','100%');
|
$('body').css('height','100%');
|
||||||
$('body').css('overflow','hidden');
|
$('body').css('overflow','hidden');
|
||||||
$('p').css('margin-top','25px');
|
|
||||||
$(".module_graph .menu_graph").css('display','none');
|
$(".module_graph .menu_graph").css('display','none');
|
||||||
|
|
||||||
$(".parent_graph").each(function(){
|
$(".parent_graph").each(function(){
|
||||||
|
@ -311,7 +311,6 @@ $ignored_params['refr'] = '';
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.item > div').each( function() {
|
$('.item > div').each( function() {
|
||||||
$(this).css('margin-bottom','20px');
|
|
||||||
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
||||||
if($(this).attr('id').indexOf('clock') || $(this).attr('id').indexOf('overlay')){
|
if($(this).attr('id').indexOf('clock') || $(this).attr('id').indexOf('overlay')){
|
||||||
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
|
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user