From 775f32765236e40a513b9a3adbfc765c5357314e Mon Sep 17 00:00:00 2001 From: alexhigh Date: Wed, 18 Jun 2014 10:33:13 +0000 Subject: [PATCH] 2014-06-18 Alejandro Gallardo * godmode/reporting/visual_console_builder.editor.php: Added some buttons, like a control to edit the html code of the tinymce's textarea. * godmode/reporting/visual_console_builder.editor.js: Modified the funtion "hiddenFields" to enable the tinymce's code control only if the item is a label. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10231 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ .../godmode/reporting/visual_console_builder.editor.js | 8 ++++++++ .../reporting/visual_console_builder.editor.php | 9 +++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 936cc30ba1..23edf163ed 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2014-06-18 Alejandro Gallardo + + * godmode/reporting/visual_console_builder.editor.php: + Added some buttons, like a control to edit the html code + of the tinymce's textarea. + + * godmode/reporting/visual_console_builder.editor.js: + Modified the funtion "hiddenFields" to enable the tinymce's + code control only if the item is a label. + 2014-06-18 Sergio Martin * include/graphs/flot/pandora.flot.js: Fixed position of the diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 0bc749db0f..48130f2abf 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -761,6 +761,14 @@ function hiddenFields(item) { if (typeof(enterprise_hiddenFields) == 'function') { enterprise_hiddenFields(item); } + + var code_control = tinyMCE.activeEditor.controlManager.controls['text-label_code']; + if (item == 'label') { + code_control.setDisabled(false); + } + else { + code_control.setDisabled(true); + } } function cleanFields(item) { diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index 3e4c49cef4..4d3ea50524 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -139,12 +139,17 @@ ui_require_javascript_file ('encode_decode_base64'); theme_advanced_font_sizes : "8pt=.visual_font_size_8pt, 14pt=.visual_font_size_14pt, 24pt=.visual_font_size_24pt, 36pt=.visual_font_size_36pt, 72pt=.visual_font_size_72pt", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", - theme_advanced_buttons1 : "bold,italic, |, image, link, |, forecolor, fontsizeselect", + theme_advanced_buttons1 : "bold,italic, |, justifyleft, justifycenter, justifyright, |,undo, redo, |, image, link, |, forecolor, fontsizeselect, |, code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_statusbar_location : "none", width: "400", height: "200", - nowrap: true + nowrap: true, + plugins : "noneditable", + inline_styles : true, + valid_children : "+body[style]", + element_format : "html", + editor_deselector : "noselected" });