Fixed menu smtp from agent detail and modify agent

This commit is contained in:
m-lopez-f 2015-04-15 10:26:48 +02:00
parent 2d9168ac8f
commit 25277eb550
3 changed files with 44 additions and 40 deletions

View File

@ -355,6 +355,26 @@ if ($id_agente) {
. html_print_image ("images/wand_agent.png", true, array ( "title" => __('Agent wizard'))) . html_print_image ("images/wand_agent.png", true, array ( "title" => __('Agent wizard')))
. '</a>'; . '</a>';
// Hidden subtab layer
$agent_wizard['sub_menu'] .= '<ul class="mn subsubmenu" style="display:none; float:none;">';
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
. '</a>';
$agent_wizard['sub_menu'] .= '</li>';
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
. '</a>';
$agent_wizard['sub_menu'] .= '</li>';
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
. '</a>';
$agent_wizard['sub_menu'] .= '</li>';
$agent_wizard['sub_menu'] .= '</ul>';
if ($tab == "agent_wizard") if ($tab == "agent_wizard")
$agent_wizard['active'] = true; $agent_wizard['active'] = true;
else else
@ -1539,31 +1559,8 @@ switch ($tab) {
break; break;
} }
// Hidden subtab layer
echo '<div id="agent_wizard_subtabs">';
echo '<ul class="mn subsubmenu" style="background: #555555;">';
echo '<li class="nomn tab_godmode" style="text-align: center;">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
. '</a>';
echo '<li>';
echo '<li class="nomn tab_godmode" style="text-align: center;">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
. '</a>';
echo '<li>';
echo '<li class="nomn tab_godmode" style="text-align: center;">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'
. html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
. '</a>';
echo '<li>';
echo '</ul>';
echo '</div>';
?> ?>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
var wizard_tab_showed = 0; var wizard_tab_showed = 0;
@ -1572,39 +1569,36 @@ echo '</div>';
// Control the tab and subtab hover. When mouse leave one, // Control the tab and subtab hover. When mouse leave one,
// check if is hover the other before hide the subtab // check if is hover the other before hide the subtab
$('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide); $('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
$('#agent_wizard_subtabs').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
}); });
// Set the position and width of the subtab // Set the position and width of the subtab
/*
function agent_wizard_tab_setup() { function agent_wizard_tab_setup() {
$('#agent_wizard_subtabs').css('left', $('.agent_wizard_tab').offset().left-5) $('#agent_wizard_subtabs').css('left', $('.agent_wizard_tab').offset().left-5)
$('#agent_wizard_subtabs').css('top', $('.agent_wizard_tab').offset().top + $('.agent_wizard_tab').height() + 7) $('#agent_wizard_subtabs').css('top', $('.agent_wizard_tab').offset().top + $('.agent_wizard_tab').height() + 7)
$('#agent_wizard_subtabs').css('width', $('.agent_wizard_tab').width() + 19) $('#agent_wizard_subtabs').css('width', $('.agent_wizard_tab').width() + 19)
} }
*/
function agent_wizard_tab_show() { function agent_wizard_tab_show() {
agent_wizard_tab_setup();
console.log("ENTRO");
wizard_tab_showed = wizard_tab_showed + 1; wizard_tab_showed = wizard_tab_showed + 1;
if(wizard_tab_showed == 1) { if(wizard_tab_showed == 1) {
$('#agent_wizard_subtabs').show("fast"); $('.subsubmenu').show("fast");
} }
} }
function agent_wizard_tab_hide() { function agent_wizard_tab_hide() {
wizard_tab_showed = wizard_tab_showed - 1; wizard_tab_showed = wizard_tab_showed - 1;
console.log("salgo");
setTimeout(function() { setTimeout(function() {
if(wizard_tab_showed <= 0) { if(wizard_tab_showed <= 0) {
$('#agent_wizard_subtabs').hide("fast"); $('.subsubmenu').hide("fast");
} }
},500); },1500);
} }
$(window).resize(function() {
agent_wizard_tab_setup();
});
/* ]]> */ /* ]]> */
</script> </script>

View File

@ -2434,7 +2434,10 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
$buffer .= '<li class="' . $class . '">'; $buffer .= '<li class="' . $class . '">';
$buffer .= $option['text']; $buffer .= $option['text'];
if (isset($option['sub_menu']))
$buffer .= $option['sub_menu'];
$buffer .= '</li>'; $buffer .= '</li>';
} }
else { else {
$buffer .= '<li class="nomn">'; $buffer .= '<li class="nomn">';

View File

@ -1144,10 +1144,6 @@ div.title_line {
#menu_tab li:hover a { #menu_tab li:hover a {
/*background: #b2b08a url("../../images/arrow.png") no-repeat right 3px;*/ /*background: #b2b08a url("../../images/arrow.png") no-repeat right 3px;*/
} }
#menu_tab li:hover ul a, #menu_tab .mn ul {
background: #db6351;
border-top: none;
}
#menu_tab li.nomn { #menu_tab li.nomn {
min-width: 30px; min-width: 30px;
@ -2922,6 +2918,17 @@ table#policy_modules td * {
background: none !important ; background: none !important ;
} }
.subsubmenu{
position: absolute;
float: right;
z-index: 9999;
display: none;
margin-top: 6px !important ;
left: 0px !important;
}
.subsubmenu li{
margin-top: 0px !important ;
}
.databox.filters td{ .databox.filters td{
padding: 10px; padding: 10px;