New menu module graph - #3617

This commit is contained in:
Tatiana Llorente 2019-05-08 09:35:28 +02:00
parent 283be8f632
commit 5e0b53e3c2
2 changed files with 106 additions and 64 deletions

View File

@ -3598,6 +3598,78 @@ div.simple_value > a > span.text p {
cursor: pointer; cursor: pointer;
} }
.events_show_more_table {
border-spacing: 0px;
text-align: left;
}
/* Modal window - Show More */
table.events_show_more_table tr:nth-child(odd) td {
background-color: #ffffff;
}
table.events_show_more_table tr:nth-child(even) td {
background-color: #f5f5f5;
border-top: 1px solid #cacaca;
border-bottom: 1px solid #cacaca;
}
table.events_show_more_table tr td {
height: 22px;
padding: 4px;
}
table.events_show_more_table tr td:first-child {
width: 35%;
font-weight: bold;
padding-left: 20px;
}
ul.events_tabs {
background: #ffffff !important;
border: 0px;
display: flex;
justify-content: space-between;
padding: 0px !important;
}
ul.events_tabs:before,
ul.events_tabs:after {
content: none !important;
}
ul.events_tabs > li {
margin: 0 !important;
width: 20%;
text-align: center;
float: none !important;
outline-width: 0;
}
ul.events_tabs > li.ui-state-default {
background: #fff !important;
border: none !important;
border-bottom: 2px solid black !important;
}
ul.events_tabs > li a {
text-align: center;
float: none !important;
padding: 8px !important;
display: block;
}
ul.events_tabs > li span {
position: relative;
top: -6px;
left: 5px;
margin-right: 10px;
}
ul.events_tabs > li.ui-tabs-active {
border-bottom: 2px solid #82b92e !important;
border-top: 2px solid #82b92e !important;
}
/* /*
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* - modal window and edit user - * - modal window and edit user -
@ -5439,36 +5511,18 @@ table.info_table.policy_sub_table {
align-items: flex-start; align-items: flex-start;
} }
/* mergear esto antes */ /*
* ---------------------------------------------------------------------
table.events_show_more_table tr:nth-child(odd) td { * - MODULE GRAPHS
background-color: #ffffff; * ---------------------------------------------------------------------
} */
table.events_show_more_table tr:nth-child(even) td {
background-color: #f5f5f5;
border-top: 1px solid #cacaca;
border-bottom: 1px solid #cacaca;
}
table.events_show_more_table tr td {
height: 22px;
padding: 4px;
}
table.events_show_more_table tr td:first-child {
width: 35%;
font-weight: bold;
padding-left: 20px;
}
/* nuevassss */
.module_graph_menu_dropdown { .module_graph_menu_dropdown {
padding-top: 20px; padding-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
position: absolute; position: absolute;
top: 10px; top: 10px;
width: 100%; width: 100%;
z-index: 1; z-index: 1001;
} }
.module_graph_menu_content, .module_graph_menu_content,
@ -5480,13 +5534,6 @@ table.events_show_more_table tr td:first-child {
background-color: #fff; background-color: #fff;
} }
.module_graph_menu_content {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
padding: 15px;
border-top: none;
}
.module_graph_menu_header { .module_graph_menu_header {
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
@ -5501,3 +5548,10 @@ table.events_show_more_table tr td:first-child {
vertical-align: middle; vertical-align: middle;
padding-left: 5px; padding-left: 5px;
} }
.module_graph_menu_content {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
padding: 15px;
border-top: none;
}

View File

@ -176,26 +176,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id); $unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id);
// Graph.
// MENU
$menu_form = "<form method='get' action='stat_win.php'>".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true);
if (!empty($server_id)) {
$menu_form .= html_print_input_hidden('server', $server_id, true);
}
if (isset($_GET['type'])) {
$type = get_parameter_get('type');
$menu_form .= html_print_input_hidden('type', $type, true);
}
echo $menu_form;
echo '<div class="print_menu"></div>';
echo '</form>';
echo '<div style="padding-top: 60px;">'; echo '<div style="padding-top: 60px;">';
$width = '90%'; $width = '90%';
$height = '450'; $height = '450';
@ -250,7 +231,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
// FORM TABLE // FORM TABLE.
$table = html_get_predefined_table('transparent', 2); $table = html_get_predefined_table('transparent', 2);
$table->width = '100%'; $table->width = '100%';
$table->id = 'stat_win_form_div'; $table->id = 'stat_win_form_div';
@ -405,15 +386,28 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
).'</div>'; ).'</div>';
// Menu.
$menu_form = "<form method='get' action='stat_win.php'>".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true);
echo '<div class="module_graph_menu_dropdown"> if (!empty($server_id)) {
$menu_form .= html_print_input_hidden('server', $server_id, true);
}
if (isset($_GET['type'])) {
$type = get_parameter_get('type');
$menu_form .= html_print_input_hidden('type', $type, true);
}
echo $menu_form;
echo '<div class="module_graph_menu_dropdown">
<div id="module_graph_menu_header" class="module_graph_menu_header"> <div id="module_graph_menu_header" class="module_graph_menu_header">
<img src="'.$urlImage.'images/arrow_down_green.png" class="imagen" style="float:left" alt="show/hide"/> '.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).'
<span>'.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).'</span> <span>'.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).'</span>
<img src="'.$urlImage.'images/config.png" style="float:right;" alt="Manage"> '.html_print_image('images/config.png', true, ['float' => 'right'], false, false, true).'
</div> </div>
<div class="module_graph_menu_content module_graph_menu_content_closed" style="display:none;">'.$form_table.'</div> <div class="module_graph_menu_content module_graph_menu_content_closed" style="display:none;">'.$form_table.'</div>
</div>'; </div>';
echo '</form>';
// Hidden div to forced title // Hidden div to forced title
html_print_div( html_print_div(
@ -462,24 +456,18 @@ ui_include_time_picker(true);
$.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]); $.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]);
//$(window).ready(function() { // Menu.
$('.print_menu').append($('.module_graph_menu_dropdown'));
//});
$('#module_graph_menu_header').on('click', function(){ $('#module_graph_menu_header').on('click', function(){
if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){ if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){
$('.module_graph_menu_content').show(); $('.module_graph_menu_content').show();
$('.module_graph_menu_content').removeClass('module_graph_menu_content_closed'); $('.module_graph_menu_content').removeClass('module_graph_menu_content_closed');
$('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_down_green','arrow_up_green')) $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_down_green','arrow_up_green'))
} }
else{ else{
$('.module_graph_menu_content').hide(); $('.module_graph_menu_content').hide();
$('.module_graph_menu_content').addClass('module_graph_menu_content_closed'); $('.module_graph_menu_content').addClass('module_graph_menu_content_closed');
$('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_up_green','arrow_down_green')) $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_up_green','arrow_down_green'))
} }
}); });
</script> </script>