From abb14c3120e85b589ef712104fb36ab5ff5d40f3 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 30 Jan 2012 12:40:01 +0000 Subject: [PATCH] 2012-01-30 Juan Manuel Ramon * godmode/reporting/visual_console_builder.editor.js godmode/reporting/visual_console_builder.editor.php: Added optional grid in visual console editor. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5445 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++ .../visual_console_builder.editor.js | 28 +++++++++++++++++++ .../visual_console_builder.editor.php | 3 ++ 3 files changed, 37 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b043005202..eb66d1cc1a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-01-30 Juan Manuel Ramon + + * godmode/reporting/visual_console_builder.editor.js + godmode/reporting/visual_console_builder.editor.php: Added optional + grid in visual console editor. + 2012-01-27 Vanessa Gil * extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index a99b23174f..df97b7a12d 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -396,6 +396,7 @@ function actionClick() { activeToolboxButton('edit_item', false); activeToolboxButton('delete_item', false); + activeToolboxButton('show_grid', false); if (creationItem != null) { //Create a item @@ -1163,6 +1164,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } if ($(divParent).hasClass('percentile_bar')) { creationItem = null; @@ -1170,6 +1172,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } if ($(divParent).hasClass('module_graph')) { creationItem = null; @@ -1177,6 +1180,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } if ($(divParent).hasClass('simple_value')) { creationItem = null; @@ -1184,6 +1188,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } if ($(divParent).hasClass('label')) { creationItem = null; @@ -1191,6 +1196,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } if ($(divParent).hasClass('icon')) { creationItem = null; @@ -1198,6 +1204,7 @@ function eventsItems() { idItem = $(divParent).attr('id'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); } } }); @@ -1329,6 +1336,9 @@ function eventsBackground() { original_height = ui.originalSize['height']; move_elements_resize(original_width, original_height, width, height); + + $('#background_grid').css('width', width); + $('#background_grid').css('height', height); } }); @@ -1340,6 +1350,7 @@ function eventsBackground() { $("#background").css('border', '2px blue dotted'); activeToolboxButton('edit_item', true); activeToolboxButton('delete_item', false); + activeToolboxButton('show_grid', true); idItem = 0; creationItem = null; @@ -1393,6 +1404,9 @@ function click2(id) { case 'delete_item': deleteItem(); break; + case 'show_grid': + showGrid(); + break; } } @@ -1459,3 +1473,17 @@ function showPreviewIcon(icon) { }); } } + +function showGrid() { + var display = $("#background_grid").css('display'); + if (display == 'none'){ + $("#background_grid").css('display', ''); + $("#background_img").css('opacity', '0.55'); + $("#background_img").css('filter', 'alpha(opacity=55)'); + $("#background_grid").css('background', 'url("images/console/background/white_boxed.jpg")'); + }else{ + $("#background_grid").css('display', 'none'); + $("#background_img").css('opacity', '1'); + $("#background_img").css('filter', 'alpha(opacity=100)'); + } +} diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index f63aa0c859..6931d1a28c 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -68,6 +68,7 @@ echo '
'; visual_map_print_button_editor('label', __('Label'), 'left', false, 'label_min', true); visual_map_print_button_editor('icon', __('Icon'), 'left', false, 'icon_min', true); + visual_map_print_button_editor('show_grid', __('Show grid'), 'right', true, 'grid_min', true); visual_map_print_button_editor('edit_item', __('Edit item'), 'right', true, 'config_min', true); visual_map_print_button_editor('delete_item', __('Delete item'), 'right', true, 'delete_min', true); echo '
'; @@ -264,6 +265,8 @@ echo '
'; echo '
'; +//echo ""; +echo ""; //
"; echo ""; foreach ($layoutDatas as $layoutData) {