diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php index d9832ab514..f0395c99f6 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.data.php +++ b/pandora_console/godmode/reporting/visual_console_builder.data.php @@ -281,6 +281,10 @@ $(document).ready (function () { } }); + + //Preload image size and activate auto image size changer when user click over a image in the selector + + var size_changer_state = false; $("#background").change(function() { $('#imagen2').attr('src','images/console/background/'+$('#background').val()); @@ -288,12 +292,18 @@ $(document).ready (function () { $('#imagen2').show(); }); - $("#background").mouseout(function() { - $('#imagen').attr('src','images/console/background/'+$('#background').val()); - $('input[name=width]').val($('#imagen').width()); - $('input[name=height]').val($('#imagen').height()); - $('#preimagew').html($('#imagen').width()); - $('#preimageh').html($('#imagen').height()); + $("#background").click(function(){ + size_changer_state = true; + }); + + $("#background").mouseout(function() { + if(size_changer_state){ + $('#imagen').attr('src','images/console/background/'+$('#background').val()); + $('input[name=width]').val($('#imagen').width()); + $('input[name=height]').val($('#imagen').height()); + $('#preimagew').html($('#imagen').width()); + $('#preimageh').html($('#imagen').height()); + } }); $("#file-background_image").change(function(){ diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 5aff41f3e2..8e62969ad4 100755 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -198,10 +198,16 @@ if ($config['pure']) { /* Avoid the main_pure container 1000px height */ body.pure { min-height: 100px; + } div#main_pure { height: 100%; margin: 0px; + }