From fe1e7da0eda1f380fdd1df0c54d2ac88417b364b Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 18 Nov 2019 17:36:16 +0100 Subject: [PATCH] Adjusted margin on static image item --- .../visual_console_builder.editor.js | 52 +++++++++++++------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index a4c18d3737..946fe0422c 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1892,33 +1892,53 @@ function toggle_item_palette() { $("#text-label_ifr") .contents() .find("p") - .attr("data-mce-style", "line-height:" + $(this).val() + ";"); + .attr("data-mce-style", "line-height:" + $(this).val() + ";") + .attr("data-mce-style", "margin-top:", "-10px;"); $("#text-label_ifr") .contents() .find("p") - .css("line-height", $(this).val()); + .css("line-height", $(this).val()) + .css("margin-top", "-10px"); $("#text-label_ifr") .contents() .find("span") - .attr("data-mce-style", "line-height:" + $(this).val() + ";"); + .attr("data-mce-style", "line-height:" + $(this).val() + ";") + .attr("data-mce-style", "margin-top:", "-10px;"); $("#text-label_ifr") .contents() .find("span") - .css("line-height", $(this).val()); + .css("line-height", $(this).val()) + .css("margin-top", "-10px"); }); - $("#text-label_ifr") - .contents() - .find("p") - .css("line-height", $("#lineheight").val()); - $("#text-label_ifr") - .contents() - .find("span") - .css("line-height", $("#lineheight").val()); - $("#text-label_ifr") - .contents() - .find("body") - .css("background", "lightgray"); + if (item == "static_graph") { + $("#text-label_ifr") + .contents() + .find("p") + .css("line-height", $("#lineheight").val()) + .css("margin-top", "-10px"); + $("#text-label_ifr") + .contents() + .find("span") + .css("line-height", $("#lineheight").val()); + $("#text-label_ifr") + .contents() + .find("body") + .css("background", "lightgray"); + } else { + $("#text-label_ifr") + .contents() + .find("p") + .css("line-height", $("#lineheight").val()); + $("#text-label_ifr") + .contents() + .find("span") + .css("line-height", $("#lineheight").val()); + $("#text-label_ifr") + .contents() + .find("body") + .css("background", "lightgray"); + } } if (creationItem != "simple_value") {