diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 25e6a1c2e8..9b7e4fd5c5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2010-03-24 Miguel de Dios + + * include/config_process.php, + godmode/reporting/visual_console_builder.editor.php, + godmode/reporting/visual_console_builder.editor.js: worked about the new + visual console builder editor, now it is developing, don't afray. + + * include/javascript/jquery.colorpicker.js: we used the old versiĆ³n, and + patch with self code for z-index to upper position. + 2010-03-24 Miguel de Dios * include/functions_visual_map.php, diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 238724ffea..470592c1e7 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -6,7 +6,7 @@ var lines = Array(); function showAdvanceOptions(close) { if ($("#advance_options").css('display') == 'none') { - $("#advance_options").css('display', 'inline'); + $("#advance_options").css('display', ''); } else { $("#advance_options").css('display', 'none'); @@ -19,6 +19,8 @@ function showAdvanceOptions(close) { // Main function, execute in event documentReady function editorMain2() { + $(".label_color").attachColorPicker(); + eventsBackground(); eventsButtonsToolbox(); eventsItems(); @@ -94,6 +96,12 @@ function eventsTextAgent() { ); } +function cancelAction() { + if (openPropertiesPanel) { + actionClick(); + } +} + function updateAction() { var values = {}; @@ -183,15 +191,15 @@ function actionClick() { if (creationItem != null) { activeToolboxButton(creationItem, true); item = creationItem; - $("#button_update_div").css('display', 'none'); - $("#button_create_div").css('display', 'block'); + $("#button_update_row").css('display', 'none'); + $("#button_create_row").css('display', ''); cleanFields(); unselectAll(); } else if (selectedItem != null) { item = selectedItem; - $("#button_create_div").css('display', 'none'); - $("#button_update_div").css('display', 'block'); + $("#button_create_row").css('display', 'none'); + $("#button_update_row").css('display', ''); cleanFields(); loadFieldsFromDB(item); @@ -259,35 +267,38 @@ function hiddenFields(item) { $(".tittle_panel_span").css('display', 'none'); $("#tittle_panel_span_" + item).css('display', 'inline'); - $("#label_div").css('display', 'none'); - $("#label_div." + item).css('display', 'block'); + $("#label_row").css('display', 'none'); + $("#label_row." + item).css('display', ''); - $("#image_div").css('display', 'none'); - $("#image_div." + item).css('display', 'block'); + $("#image_row").css('display', 'none'); + $("#image_row." + item).css('display', ''); - $("#position_div").css('display', 'none'); - $("#position_div." + item).css('display', 'block'); + $("#position_row").css('display', 'none'); + $("#position_row." + item).css('display', ''); - $("#agent_div").css('display', 'none'); - $("#agent_div." + item).css('display', 'block'); + $("#agent_row").css('display', 'none'); + $("#agent_row." + item).css('display', ''); - $("#module_div").css('display', 'none'); - $("#module_div." + item).css('display', 'block'); + $("#module_row").css('display', 'none'); + $("#module_row." + item).css('display', ''); - $("#background_div").css('display', 'none'); - $("#background_div." + item).css('display', 'block'); + $("#background_row").css('display', 'none'); + $("#background_row." + item).css('display', ''); - $("#period_div").css('display', 'none'); - $("#period_div." + item).css('display', 'block'); + $("#period_row").css('display', 'none'); + $("#period_row." + item).css('display', ''); - $("#parent_div").css('display', 'none'); - $("#parent_div." + item).css('display', 'block'); + $("#size_row").css('display', 'none'); + $("#size_row." + item).css('display', ''); - $("#map_linked_div").css('display', 'none'); - $("#map_linked_div." + item).css('display', 'block'); + $("#parent_row").css('display', 'none'); + $("#parent_row." + item).css('display', ''); - $("#label_color_div").css('display', 'none'); - $("#label_color_div." + item).css('display', 'block'); + $("#map_linked_row").css('display', 'none'); + $("#map_linked_row." + item).css('display', ''); + + $("#label_color_row").css('display', 'none'); + $("#label_color_row." + item).css('display', ''); } function cleanFields() { @@ -454,11 +465,20 @@ function updateDB(type, idElement , values) { dataType: 'text', success: function (data) { - if ((typeof(values['mov_left']) != 'undefined') && - (typeof(values['mov_top']) != 'undefined')) { - $("#" + idElement).css('top', '0px').css('margin-top', top + 'px'); - $("#" + idElement).css('left', '0px').css('margin-left', left + 'px'); - refresh_lines(lines, 'background'); + switch (type) { + case 'static_graph': + if ((typeof(values['mov_left']) != 'undefined') && + (typeof(values['mov_top']) != 'undefined')) { + $("#" + idElement).css('top', '0px').css('margin-top', top + 'px'); + $("#" + idElement).css('left', '0px').css('margin-left', left + 'px'); + refresh_lines(lines, 'background'); + } + $("#" + idElement).css('color', values['label_color']); + break; + case 'background': + $("#background").css('width', values['width'] + 'px'); + $("#background").css('height', values['height'] + 'px'); + break; } } }); @@ -542,6 +562,13 @@ function eventsItems() { } }); + $('.item').bind('dblclick', function(event, ui) { + event.stopPropagation(); + if (!openPropertiesPanel) { + actionClick(); + } + }); + $(".item").draggable(); $('.item').bind('dragstart', function(event, ui) { @@ -608,6 +635,13 @@ function eventsBackground() { selectedItem = 'background'; } }); + + $('#background').bind('dblclick', function(event, ui) { + event.stopPropagation(); + if (!openPropertiesPanel) { + actionClick(); + } + }); } function unselectAll() { diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index 463a00b17b..f54c09a2c4 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -87,103 +87,111 @@ $intervals[4838400] = __('Last month'); $intervals[9676800] = "2 ".__('months'); $intervals[29030400] = "6 ".__('months'); -echo '