mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Working in the new elements for the visualmap. Ticket #1478
This commit is contained in:
parent
9f7c8d4483
commit
93c1089cff
@ -143,6 +143,10 @@ foreach ($layoutDatas as $layoutData) {
|
||||
$table->data[$i + 1]['icon'] =
|
||||
html_print_image('images/photo.png', true, array('title' => __('Icon')));
|
||||
break;
|
||||
case BOX_ITEM:
|
||||
$table->data[$i + 1]['icon'] =
|
||||
html_print_image('images/box_item.png', true, array('title' => __('Box')));
|
||||
break;
|
||||
default:
|
||||
if (enterprise_installed()) {
|
||||
$table->data[$i + 1]['icon'] =
|
||||
@ -159,26 +163,34 @@ foreach ($layoutDatas as $layoutData) {
|
||||
//First row
|
||||
|
||||
//Label
|
||||
if ($layoutData['type'] != ICON) {
|
||||
switch ($layoutData['type']) {
|
||||
case ICON:
|
||||
case BOX_ITEM:
|
||||
// hasn't the label.
|
||||
$table->data[$i + 1][0] = '';
|
||||
break;
|
||||
default:
|
||||
$table->data[$i + 1][0] = '<span style="width: 150px; display: block;">' .
|
||||
html_print_input_hidden('label_' . $idLayoutData, $layoutData['label'], true) .
|
||||
'<a href="javascript: show_dialog_label_editor(' . $idLayoutData . ');">' . __('Edit label') .'</a>' .
|
||||
'</span>';
|
||||
break;
|
||||
}
|
||||
else {
|
||||
//Icon haven't the label.
|
||||
$table->data[$i + 1][0] = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Image
|
||||
if (($layoutData['type'] == STATIC_GRAPH) || ($layoutData['type'] == ICON)) {
|
||||
$table->data[$i + 1][1] = html_print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', 'None', '', true, false, true, '', false, "width: 120px");
|
||||
}
|
||||
else {
|
||||
switch ($layoutData['type']) {
|
||||
case STATIC_GRAPH:
|
||||
case ICON:
|
||||
$table->data[$i + 1][1] =
|
||||
html_print_select ($images_list,
|
||||
'image_' . $idLayoutData, $layoutData['image'], '',
|
||||
'None', '', true, false, true, '', false,
|
||||
"width: 120px");
|
||||
break;
|
||||
default:
|
||||
$table->data[$i + 1][1] = '';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -194,8 +206,14 @@ foreach ($layoutDatas as $layoutData) {
|
||||
')';
|
||||
|
||||
//Parent
|
||||
switch ($layoutData['type']) {
|
||||
case BOX_ITEM:
|
||||
$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,
|
||||
'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true, false, true, false, 'width: 120px;');
|
||||
}
|
||||
|
||||
//Delete row button
|
||||
if (!defined('METACONSOLE')) {
|
||||
@ -217,6 +235,7 @@ foreach ($layoutDatas as $layoutData) {
|
||||
|
||||
//Agent
|
||||
switch ($layoutData['type']) {
|
||||
case BOX_ITEM:
|
||||
case ICON:
|
||||
case LABEL:
|
||||
$table->data[$i + 2][0] = '';
|
||||
@ -268,6 +287,7 @@ foreach ($layoutDatas as $layoutData) {
|
||||
switch ($layoutData['type']) {
|
||||
case ICON:
|
||||
case LABEL:
|
||||
case BOX_ITEM:
|
||||
$table->data[$i + 2][1] = '';
|
||||
break;
|
||||
default:
|
||||
@ -328,9 +348,17 @@ foreach ($layoutDatas as $layoutData) {
|
||||
}
|
||||
|
||||
//Map linked
|
||||
switch ($layoutData['type']) {
|
||||
case BOX_ITEM:
|
||||
$table->data[$i + 2][4] = "";
|
||||
break;
|
||||
default:
|
||||
$table->data[$i + 2][4] = html_print_select_from_sql(
|
||||
'SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
|
||||
'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true, false, true, '', false, "width: 120px");
|
||||
break;
|
||||
}
|
||||
|
||||
$table->data[$i + 2][5] = '';
|
||||
|
||||
if ($alternativeStyle) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user