diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index e8cc2cb4c4..d6112fb0bb 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1437,88 +1437,37 @@ function visual_map_print_item($mode = "read", $layoutData, } } else{ - if ($layoutData['id_metaconsole'] != 0) { - - if($layoutData['clock_animation'] == 'analogic_1'){ - $img = ''; - } - else{ - - if($layoutData['time_format'] == 'time'){ - $img = ''; - } - else{ - $img = ''; - } - - } - + $image_prefix = ($layoutData['id_metaconsole'] != 0) ? "../../" : ""; + if($layoutData['clock_animation'] == 'analogic_1'){ + $img = ''; } else{ - if($layoutData['clock_animation'] == 'analogic_1'){ - $img = ''; - } - else{ - if($layoutData['time_format'] == 'time'){ - $img = ''; - } - else{ - $img = ''; - } - } + $height_offset = ($layoutData['time_format'] == 'time') ? 20 : 40; + $img = ''; } } } else{ if($layoutData['clock_animation'] == 'analogic_1'){ - - if ($width == 0) { - if ($layoutData['label_position']=='left') { - $img = '
' .print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - elseif ($layoutData['label_position']=='right') { - $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - else { - $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } + if ($layoutData['label_position']=='left') { + $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; } - else{ - if ($layoutData['label_position']=='left') { - $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - elseif ($layoutData['label_position']=='right') { - $img = '
' .print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - else { - $img ='
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } + elseif ($layoutData['label_position']=='right') { + $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; + } + else { + $img = '
' . print_clock_analogic_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; } - } elseif($layoutData['clock_animation'] == 'digital_1'){ - - if ($width == 0) { - if ($layoutData['label_position']=='left') { - $img = '
' .print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - elseif ($layoutData['label_position']=='right') { - $img = '
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - else { - $img = '
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } + if ($layoutData['label_position']=='left') { + $img = '
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; } - else{ - if ($layoutData['label_position']=='left') { - $img = '
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - elseif ($layoutData['label_position']=='right') { - $img = '
' .print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } - else { - $img ='
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; - } + elseif ($layoutData['label_position']=='right') { + $img = '
' .print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; + } + else { + $img ='
' . print_clock_digital_1 ($layoutData['time_format'], $layoutData['timezone'],$layoutData['clock_animation'],$layoutData['width'],$layoutData['height'],$layoutData['id'],$layoutData['fill_color']).'
'; } } } diff --git a/pandora_console/operation/visual_console/public_console.php b/pandora_console/operation/visual_console/public_console.php index 371981ce28..a06404109f 100755 --- a/pandora_console/operation/visual_console/public_console.php +++ b/pandora_console/operation/visual_console/public_console.php @@ -160,27 +160,6 @@ $ignored_params['refr'] = ''; } }); } - - //~ var fetchMap = function () { - //~ $.ajax({ - //~ url: 'public_console.php', - //~ type: 'GET', - //~ dataType: 'html', - //~ data: { - //~ hash: '', - //~ id_layout: , - //~ graph_javascript: , - //~ 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); // Auto hide controls var controls = document.getElementById('vc-controls'); @@ -196,7 +175,6 @@ $ignored_params['refr'] = ''; $('body').css('margin','0'); $('body').css('height','100%'); $('body').css('overflow','hidden'); - $('p').css('margin-top','25px'); $(".module_graph .menu_graph").css('display','none'); $(".parent_graph").each(function(){ diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 7597828a8b..4e3429ad9b 100755 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -311,7 +311,6 @@ $ignored_params['refr'] = ''; }); $('.item > div').each( function() { - $(this).css('margin-bottom','20px'); if ($(this).css('float')=='left' || $(this).css('float')=='right') { 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');