Some fixes in the code.

This commit is contained in:
mdtrooper 2015-06-11 20:17:54 +02:00
parent a364542454
commit 37a7cf6cf2
5 changed files with 34 additions and 26 deletions

View File

@ -288,8 +288,8 @@ $table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"]
$row++;
$table->data[$row][0] = __('Default line thickness for the Custom Graph.');
$table->data[$row][1] = html_print_input_text ('custom_graph_widht',
$config["custom_graph_widht"], '', 5, 5, true);
$table->data[$row][1] = html_print_input_text ('custom_graph_width',
$config["custom_graph_width"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Use round corners');

View File

@ -457,7 +457,7 @@ function config_update_config () {
$error_update[] = __('Shortened module graph data');
if (!config_update_value ('show_group_name', get_parameter('show_group_name')))
$error_update[] = __('Show the group name instead the group icon.');
if (!config_update_value ('custom_graph_widht', (int) get_parameter('custom_graph_widht', 1)))
if (!config_update_value ('custom_graph_width', (int) get_parameter('custom_graph_width', 1)))
$error_update[] = __('Default line thickness for the Custom Graph.');
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
$error_update[] = __('Render data of module type is proc.');
@ -1248,8 +1248,8 @@ function config_process_config () {
config_update_value ('show_group_name', 0);
}
if (!isset($config['custom_graph_widht'])) {
config_update_value ('custom_graph_widht', 1);
if (!isset($config['custom_graph_width'])) {
config_update_value ('custom_graph_width', 1);
}
if (!isset($config['render_proc'])) {
config_update_value ('render_proc', 0);

View File

@ -118,8 +118,8 @@ function html_print_side_layer ($params) {
// Check mandatory values, if any of them is missed, return ''
$mandatory = array('icon_closed', 'body_text');
foreach($mandatory as $man) {
if(!isset($params[$man])) {
foreach ($mandatory as $man) {
if (!isset($params[$man])) {
return '';
}
}
@ -141,15 +141,15 @@ function html_print_side_layer ($params) {
'icon_open' => $params['icon_closed']
);
foreach($defaults as $token => $value) {
if(!isset($params[$token])) {
foreach ($defaults as $token => $value) {
if (!isset($params[$token])) {
$params[$token] = $value;
}
}
//z-index is 1 because 2 made the calendar show under the side_layer
switch($params['position']) {
switch ($params['position']) {
case 'left':
$round_class = 'menu_sidebar_radius_right';
$body_float = 'left';
@ -175,17 +175,24 @@ function html_print_side_layer ($params) {
$table->cellpadding = 2;
$table->class = 'none';
$top = '<div id="side_top_text" style="width: 100%";">' . $params['top_text'] . '</div>';
$top = '<div id="side_top_text" style="width: 100%";">' .
$params['top_text'] . '</div>';
$button = '<div id="show_menu" style="vertical-align: middle; position: relative; width: ' . $params['icon_width'] . 'px; padding-right: 17px; text-align: right; height: ' . $params['icon_height'] . 'px;">';
$button .= html_print_image($params['position'] == 'left' ? $params['icon_open'] : $params['icon_closed'], true, array('id' => 'graph_menu_arrow'));
$button .= html_print_image(
$params['position'] == 'left' ?
$params['icon_open']
:
$params['icon_closed'],
true, array('id' => 'graph_menu_arrow'));
$button .= '</div>';
$body = '<div id="side_body_text" style="width: 100%;">' . $params['body_text'] . '</div>';
$bottom = '<div id="side_bottom_text" style="text-align: ' . $params['position'] . ';">' . $params['bottom_text'] . '</div>';
$bottom = '<div id="side_bottom_text" style="text-align: ' . $params['position'] . ';">' .
$params['bottom_text'] . '</div>';
switch($params['position']) {
switch ($params['position']) {
case 'left':
$table->size[1] = '15%';

View File

@ -436,6 +436,7 @@ ui_pagination ($total_agents,
ui_get_url_refresh (array ('group_id' => $group_id, 'recursion' => $recursion, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status)));
// Show data.
$table = new stdClass();
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->width = "100%";

View File

@ -103,7 +103,7 @@ if ($view_graph) {
include ("general/noaccess.php");
exit;
}
html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_widht']);
html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_width']);
$url = "index.php?" .
"sec=reporting&" .
"sec2=operation/reporting/graph_viewer&" .