2013-10-11 Sergio Martin <sergio.martin@artica.es>

* include/graphs/flot/pandora.flot.js: Fixed strange
	random fail of flot graphs menus and improve allocation
	of this menu. Incident: #253

	* images/normalscreen.png: Change icon to modern style



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-10-11 11:20:25 +00:00
parent 107a8e1701
commit bf13ec972a
3 changed files with 20 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2013-10-11 Sergio Martin <sergio.martin@artica.es>
* include/graphs/flot/pandora.flot.js: Fixed strange
random fail of flot graphs menus and improve allocation
of this menu. Incident: #253
* images/normalscreen.png: Change icon to modern style
2013-10-11 Sergio Martin <sergio.martin@artica.es> 2013-10-11 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php * include/functions_ui.php

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1001,19 +1001,18 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
}); });
// Adjust the menu image on top of the plot // Adjust the menu image on top of the plot
$('#menu_overview_'+graph_id)[0].onload = function() {
// If there is no legend we increase top-padding to make space to the menu // If there is no legend we increase top-padding to make space to the menu
if (legends.length == 0) { if (legends.length == 0) {
$('#menu_'+graph_id).parent().css('padding-top',$('#menu_'+graph_id).css('height')); $('#menu_'+graph_id).parent().css('padding-top',$('#menu_'+graph_id).css('height'));
} }
// Add bottom margin in the legend // Add bottom margin in the legend
var menu_height = parseInt($('#menu_'+graph_id).css('height').split('px')[0]); // Estimated height of 24 (works fine with this data in all browsers)
menu_height = 24;
var legend_margin_bottom = parseInt($('#legend_'+graph_id).css('margin-bottom').split('px')[0]); var legend_margin_bottom = parseInt($('#legend_'+graph_id).css('margin-bottom').split('px')[0]);
$('#legend_'+graph_id).css('margin-bottom', menu_height+legend_margin_bottom+'px'); $('#legend_'+graph_id).css('margin-bottom', menu_height+legend_margin_bottom+'px');
parent_height = parseInt($('#menu_'+graph_id).parent().css('height').split('px')[0]); parent_height = parseInt($('#menu_'+graph_id).parent().css('height').split('px')[0]);
adjust_menu(graph_id, plot, parent_height); adjust_menu(graph_id, plot, parent_height);
} }
}
if (water_mark) { if (water_mark) {
set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src')); set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src'));
@ -1040,7 +1039,8 @@ function adjust_menu(graph_id, plot, parent_height) {
$('#menu_'+graph_id).css('top', $('#menu_'+graph_id).css('top',
(-parent_height+legend_height-overview_height-7)+'px'); (-parent_height+legend_height-overview_height-7)+'px');
$('#menu_'+graph_id).css('left',plot.width()-(left_ticks_width/2));
$('#menu_'+graph_id).css('left',plot.width()-$('#menu_'+graph_id).width() + 10);
$('#menu_'+graph_id).show(); $('#menu_'+graph_id).show();
} }