Fixed margin in public visual consoles
This commit is contained in:
parent
c8121d7df3
commit
e5a2284b8b
|
@ -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 = '<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;">';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$image_prefix = ($layoutData['id_metaconsole'] != 0) ? "../../" : "";
|
||||
if($layoutData['clock_animation'] == 'analogic_1'){
|
||||
$img = '<img src="' . $image_prefix . 'images/console/signes/clock.png" style="width:'.$width.'px;height:'. ($width+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;">';
|
||||
}
|
||||
}
|
||||
$height_offset = ($layoutData['time_format'] == 'time') ? 20 : 40;
|
||||
$img = '<img src="' . $image_prefix . 'images/console/signes/digital-clock.png" style="width:'.$width.'px;height:'. (($width/3.9)+$height_offset).'px;">';
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if($layoutData['clock_animation'] == 'analogic_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_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>';
|
||||
}
|
||||
if ($layoutData['label_position']=='left') {
|
||||
$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>';
|
||||
}
|
||||
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['label_position']=='right') {
|
||||
$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 {
|
||||
$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>';
|
||||
}
|
||||
|
||||
}
|
||||
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>';
|
||||
}
|
||||
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>';
|
||||
}
|
||||
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_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>';
|
||||
}
|
||||
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>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
// 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(){
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue