fix visual console's percentile item: label color not showing and removed label from view menu

Former-commit-id: a19e1307b326a60bfef6441a7af0c7be2520ac6a
This commit is contained in:
alejandro-campos 2018-12-05 16:25:46 +01:00
parent 1526aa6eee
commit 0af861f5b9
3 changed files with 17 additions and 13 deletions

View File

@ -742,8 +742,10 @@ function readFields() {
var text = tinymce.get('text-label').getContent();
values['label'] = text;
if ($("input[name=percentile_label]").val().length > 0)
values['label'] = $("input[name=percentile_label]").val();
if ($("input[name=percentile_label]").val().length > 0) {
values['percentile_label_color'] = $("input[name=percentile_label_color]").val();
values['label'] = "<span style='color:"+values['percentile_label_color']+";'>" + $("input[name=percentile_label]").val() + "</span>";
}
values['line-height'] = $("#text-label_ifr").contents().find("p").css('line-height');
values['type_graph'] = $("select[name=type_graph]").val();
@ -784,7 +786,6 @@ function readFields() {
values['event_max_time_row'] = $("select[name=event_max_time_row]").val();
values['type_percentile'] = $("select[name=type_percentile]").val();
values['percentile_color'] = $("input[name=percentile_color]").val();
values['percentile_label_color'] = $("input[name=percentile_label_color]").val();
values['percentile_label'] = $("input[name=percentile_label]").val();
values['value_show'] = $("select[name=value_show]").val();

View File

@ -1867,7 +1867,9 @@ function visual_map_print_item($mode = "read", $layoutData,
}
echo $img;
echo io_safe_output($text);
if (get_parameter('tab')=='editor')
echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>";
break;
case PERCENTILE_BUBBLE:
@ -1911,7 +1913,9 @@ function visual_map_print_item($mode = "read", $layoutData,
}
echo $img;
echo io_safe_output($text);
if (get_parameter('tab')=='editor')
echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>";
break;
case CIRCULAR_PROGRESS_BAR:
@ -1955,7 +1959,9 @@ function visual_map_print_item($mode = "read", $layoutData,
}
echo $img;
echo io_safe_output($text);
if (get_parameter('tab')=='editor')
echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>";
break;
case CIRCULAR_INTERIOR_PROGRESS_BAR:
@ -2000,7 +2006,9 @@ function visual_map_print_item($mode = "read", $layoutData,
}
echo $img;
echo io_safe_output($text);
if (get_parameter('tab')=='editor')
echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>";
break;
case MODULE_GRAPH:

View File

@ -510,7 +510,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
__('Max value') . '</td>
<td align="left">' . html_print_input_text('max_percentile', 0, '', 3, 5, true) . '</td>';
$percentile_type = array('percentile' => __('Percentile'), 'bubble' => __('Bubble'), 'circular_progress_bar' => __('Circular porgress bar'), 'interior_circular_progress_bar' => __('Circular progress bar (interior)'));
$percentile_type = array('percentile' => __('Percentile'), 'bubble' => __('Bubble'), 'circular_progress_bar' => __('Circular progress bar'), 'interior_circular_progress_bar' => __('Circular progress bar (interior)'));
$percentile_value = array('percent' => __('Percent'), 'value' => __('Value'));
if (is_metaconsole()){
$form_items['percentile_item_row_3'] = array();
@ -903,11 +903,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
</tbody>
</table>
<?php
//------------------------------------------------------------------------------
echo '</div>';