From cf4de8461cd5c058ec130c2c0f5b0079d57e03d7 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 30 Jun 2010 15:01:41 +0000 Subject: [PATCH] 2010-06-30 Sergio Martin * godmode/reporting/visual_console_builder.editor.js: Fixed the storing of width and height of item in visual maps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2934 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../reporting/visual_console_builder.editor.js | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2aa4229c47..a81aa0c032 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-06-30 Sergio Martin + + * godmode/reporting/visual_console_builder.editor.js: Fixed + the storing of width and height of item in visual maps + 2010-06-29 Sergio Martin * godmode/reporting/visual_console_builder.editor.js diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 1599dab23d..49930502ba 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -114,12 +114,13 @@ function updateAction() { values = readFields(); - // TODO VALIDATE DATA - - updateDB(selectedItem, idItem , values); - + // TODO VALIDATE DATA switch (selectedItem) { case 'background': + if(values['width'] == 0 && values['height'] == 0) { + values['width'] = $("#hidden-background_original_width").val(); + values['height'] = $("#hidden-background_original_height").val(); + } $("#background").css('width', values['width']); $("#background").css('height', values['height']); @@ -155,6 +156,8 @@ function updateAction() { break; } + updateDB(selectedItem, idItem , values); + actionClick(); } @@ -171,10 +174,6 @@ function readFields() { values['period'] = $("select[name=period]").val(); values['width'] = $("input[name=width]").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['map_linked'] = $("select[name=map_linked]").val(); values['label_color'] = $("input[name=label_color]").val();