2010-06-29 Sergio Martin <sergio.martin@artica.es>

* godmode/reporting/visual_console_builder.editor.js
	godmode/reporting/visual_console_builder.editor.php: Fixed
	storing of width and height of the background of the visual map



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2933 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-06-29 12:58:54 +00:00
parent 45038412ab
commit 7414748d73
3 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2010-06-29 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.editor.js
godmode/reporting/visual_console_builder.editor.php: Fixed
storing of width and height of the background of the visual map
2010-06-29 Sergio Martin <sergio.martin@artica.es> 2010-06-29 Sergio Martin <sergio.martin@artica.es>
* include/Image/image_functions.php: Reverted an * include/Image/image_functions.php: Reverted an

View File

@ -171,6 +171,10 @@ function readFields() {
values['period'] = $("select[name=period]").val(); values['period'] = $("select[name=period]").val();
values['width'] = $("input[name=width]").val(); values['width'] = $("input[name=width]").val();
values['height'] = $("input[name=height]").val(); values['height'] = $("input[name=height]").val();
if(values['width'] == 0 && values['height'] == 0) {
values['width'] = $("#hidden-background_original_width").val();
values['height'] = $("#hidden-background_original_height").val();
}
values['parent'] = $("select[name=parent]").val(); values['parent'] = $("select[name=parent]").val();
values['map_linked'] = $("select[name=map_linked]").val(); values['map_linked'] = $("select[name=map_linked]").val();
values['label_color'] = $("input[name=label_color]").val(); values['label_color'] = $("input[name=label_color]").val();

View File

@ -63,12 +63,6 @@ $background = $visualConsole['background'];
$widthBackground = $visualConsole['width']; $widthBackground = $visualConsole['width'];
$heightBackground = $visualConsole['height']; $heightBackground = $visualConsole['height'];
if (($widthBackground == 0) && ($heightBackground == 0)) {
$backgroundSizes = getimagesize('images/console/background/' . $background);
$widthBackground = $backgroundSizes[0];
$heightBackground = $backgroundSizes[1];
}
$layoutDatas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $idVisualConsole); $layoutDatas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $idVisualConsole);
if ($layoutDatas === false) if ($layoutDatas === false)
$layoutDatas = array(); $layoutDatas = array();
@ -235,6 +229,11 @@ echo '</div>';
print_input_hidden('background_width', $widthBackground); print_input_hidden('background_width', $widthBackground);
print_input_hidden('background_height', $heightBackground); print_input_hidden('background_height', $heightBackground);
$backgroundSizes = getimagesize('images/console/background/' . $background);
print_input_hidden('background_original_width', $backgroundSizes[0]);
print_input_hidden('background_original_height', $backgroundSizes[1]);
echo "</form>"; echo "</form>";
//Hack to translate messages in javascript //Hack to translate messages in javascript