2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: added into the function "get_group_icon" the return icon for "all" group. * godmode/groups/configure_group.php: fixed and cleaned source code, for the dinamic change of parent icon, show the select of parent with the parent selected, and fixed the position of parent icon image. Fixes: #3034677 * godmode/groups/group_list.php: changed the source code for to show the "all" group open branch by default. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3063 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7bc29f1899
commit
44548d82aa
|
@ -1,3 +1,15 @@
|
|||
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* include/functions_db.php: added into the function "get_group_icon" the
|
||||
return icon for "all" group.
|
||||
|
||||
* godmode/groups/configure_group.php: fixed and cleaned source code, for
|
||||
the dinamic change of parent icon, show the select of parent with the
|
||||
parent selected, and fixed the position of parent icon image.
|
||||
Fixes: #3034677
|
||||
|
||||
* godmode/groups/group_list.php: changed the source code for to show the
|
||||
"all" group open branch by default.
|
||||
|
||||
2010-07-26 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_networkmap.php: Changed the color of the
|
||||
|
|
|
@ -79,17 +79,15 @@ if ($id_group)
|
|||
$sql .= sprintf ('WHERE id_grupo != %d', $id_group);
|
||||
$groups = get_user_groups();
|
||||
if ($id_group) {
|
||||
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', 0,
|
||||
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', $id_parent,
|
||||
'', '', '', true, false, true, '', false, false, false, $id_group);
|
||||
}
|
||||
else {
|
||||
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', 0, '', '', '', true);
|
||||
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', $id_parent, '', '', '', true);
|
||||
}
|
||||
$table->data[2][1] .= ' <span id="parent_preview">';
|
||||
if ($id_parent) {
|
||||
echo '<img src="images/groups_small/'.get_group_icon ($id_parent).'.png" />';
|
||||
}
|
||||
echo'</span>';
|
||||
$table->data[2][1] .= '<img src="images/groups_small/'.get_group_icon ($id_parent).'.png" />';
|
||||
$table->data[2][1] .= '</span>';
|
||||
|
||||
$table->data[3][0] = __('Alerts');
|
||||
$table->data[3][1] = print_checkbox ('alerts_enabled', 1, ! $alerts_disabled, true);
|
||||
|
@ -153,6 +151,6 @@ function parent_changed () {
|
|||
|
||||
$(document).ready (function () {
|
||||
$('#icon').change (icon_changed);
|
||||
$('#parent').change (parent_changed);
|
||||
$('#id_parent').change (parent_changed);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -184,7 +184,9 @@ foreach ($groups as $id_group => $group) {
|
|||
$table->rowstyle[$iterator] = '';
|
||||
}
|
||||
else {
|
||||
$table->rowstyle[$iterator] = 'display: none;';
|
||||
if ($group['parent'] != 0) {
|
||||
$table->rowstyle[$iterator] = 'display: none;';
|
||||
}
|
||||
}
|
||||
|
||||
$symbolBranchs = '';
|
||||
|
@ -236,9 +238,16 @@ foreach ($groups as $id_group => $group) {
|
|||
|
||||
$tabulation = str_repeat(' ', $group['deep']);
|
||||
|
||||
if ($group['id_grupo'] == 0) {
|
||||
$symbol = '-';
|
||||
}
|
||||
else {
|
||||
$symbol = '+';
|
||||
}
|
||||
|
||||
if ($group['hash_branch']) {
|
||||
$data[0] = '<strong>'.$tabulation . ' ' .
|
||||
'<a href="javascript: showBranch(' . $group['id_grupo'] . ', ' . $group['parent'] . ');" title="' . __('Show branch children') . '"><span class="symbol_' . $group['id_grupo'] . ' ' . $symbolBranchs . '">+</span> '. $group['nombre'].'</a></strong>';
|
||||
'<a href="javascript: showBranch(' . $group['id_grupo'] . ', ' . $group['parent'] . ');" title="' . __('Show branch children') . '"><span class="symbol_' . $group['id_grupo'] . ' ' . $symbolBranchs . '">' . $symbol . '</span> '. $group['nombre'].'</a></strong>';
|
||||
}
|
||||
else {
|
||||
$data[0] = '<strong>'.$tabulation . ' '. $group['nombre'].'</strong>';
|
||||
|
|
|
@ -677,7 +677,12 @@ function get_agent_modules_count ($id_agent = 0) {
|
|||
* @return string Icon path of the given group
|
||||
*/
|
||||
function get_group_icon ($id_group) {
|
||||
return (string) get_db_value ('icon', 'tgrupo', 'id_grupo', (int) $id_group);
|
||||
if ($id_group == 0) {
|
||||
return 'world';
|
||||
}
|
||||
else {
|
||||
return (string) get_db_value ('icon', 'tgrupo', 'id_grupo', (int) $id_group);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue