Added the lost fields for item group in the editor.

(cherry picked from commit a3e6b09758)
This commit is contained in:
mdtrooper 2014-12-02 11:39:45 +01:00
parent 4f7bfea51c
commit 7f4d642679
3 changed files with 22 additions and 13 deletions

View File

@ -208,6 +208,7 @@ foreach ($layoutDatas as $layoutData) {
',' . html_print_input_text('top_' . $idLayoutData, $layoutData['pos_y'], '', 2, 5, true) .
')';
//Parent
switch ($layoutData['type']) {
case BOX_ITEM:
@ -215,14 +216,10 @@ foreach ($layoutDatas as $layoutData) {
$table->data[$i + 1][4] = "";
break;
default:
$table->data[$i + 1][4] = html_print_select_from_sql(
'SELECT id, label
FROM tlayout_data
WHERE id_layout = '. $idVisualConsole . '
AND id !=' . $idLayoutData,
$parents = visual_map_get_items_parents($idVisualConsole);
$table->data[$i + 1][4] = html_print_select($parents,
'parent_' . $idLayoutData, $layoutData['parent_item'],
'', 'None', 0, true, false, true, false,
'width: 120px;');
'', __('None'), 0, true);
}
//Delete row button
@ -243,6 +240,7 @@ foreach ($layoutDatas as $layoutData) {
//Second row
$table->data[$i + 2]['icon'] = '';
//Agent
switch ($layoutData['type']) {
case GROUP_ITEM:

View File

@ -2246,6 +2246,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age
case LABEL:
$text = __('Label');
break;
case GROUP_ITEM:
case 'group_item':
$text = __('Group') . " - ";
break;
case 'icon':
case ICON:
$text = __('Icon') . " - " .
@ -2285,8 +2289,12 @@ function visual_map_get_items_parents($idVisual) {
$agent = io_safe_output(agents_get_name($item['id_agent']));
}
$return[$item['id']] = visual_map_create_internal_name_item($item['label'],
$item['type'], $item['image'], $agent, $item['id_agente_modulo'],
$return[$item['id']] = visual_map_create_internal_name_item(
$item['label'],
$item['type'],
$item['image'],
$agent,
$item['id_agente_modulo'],
$item['id']);
}

View File

@ -367,7 +367,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
')</td>';
$form_items_advance['size_row'] = array();
$form_items_advance['size_row']['items'] = array('background',
$form_items_advance['size_row']['items'] = array(
'group_item', 'background',
'static_graph', 'icon datos');
$form_items_advance['size_row']['html'] = '<td align="left">' .
__('Size') .
@ -382,7 +383,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$parents = visual_map_get_items_parents($visualConsole_id);
$form_items_advance['parent_row'] = array();
$form_items_advance['parent_row']['items'] = array('static_graph',
$form_items_advance['parent_row']['items'] = array(
'group_item', 'static_graph',
'percentile_bar', 'percentile_item', 'module_graph',
'simple_value', 'label', 'icon', 'datos');
$form_items_advance['parent_row']['html'] = '<td align="left">' .
@ -394,8 +396,9 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items_advance['map_linked_row'] = array();
$form_items_advance['map_linked_row']['items'] = array(
'static_graph', 'percentile_bar', 'percentile_item',
'module_graph', 'simple_value', 'icon', 'label', 'datos');
'group_item', 'static_graph', 'percentile_bar',
'percentile_item', 'module_graph', 'simple_value',
'icon', 'label', 'datos');
$form_items_advance['map_linked_row']['html'] = '<td align="left">'.
__('Map linked') . '</td>' .
'<td align="left">' . html_print_select_from_sql (