Minor fixes and improves
This commit is contained in:
parent
3a741f8ed9
commit
f14d324490
|
@ -956,6 +956,25 @@ if ($agents !== false) {
|
|||
|
||||
html_print_table($tableAgents);
|
||||
|
||||
$tablePagination = ui_pagination(
|
||||
$total_agents,
|
||||
ui_get_url_refresh(
|
||||
[
|
||||
'group_id' => $group_id,
|
||||
'search' => $search,
|
||||
'sort_field' => $sortField,
|
||||
'sort' => $sort,
|
||||
'status' => $status,
|
||||
]
|
||||
),
|
||||
0,
|
||||
0,
|
||||
true,
|
||||
'offset',
|
||||
false,
|
||||
'dataTables_paginate paging_simple_numbers'
|
||||
);
|
||||
|
||||
/*
|
||||
ui_pagination(
|
||||
$total_agents,
|
||||
|
@ -964,6 +983,7 @@ if ($agents !== false) {
|
|||
);
|
||||
*/
|
||||
} else {
|
||||
$tablePagination = '';
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined agents') ]);
|
||||
}
|
||||
|
||||
|
@ -980,8 +1000,9 @@ if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|||
true
|
||||
),
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
|
|
|
@ -3504,7 +3504,7 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $
|
|||
}
|
||||
|
||||
if ($imageButton === false) {
|
||||
$content = $label;
|
||||
$content = '<span style="margin-top: 4px;" class="font_11">'.$label.'</span>';
|
||||
$content .= $iconDiv;
|
||||
} else {
|
||||
$content = $iconDiv;
|
||||
|
|
|
@ -2187,7 +2187,7 @@ function ui_pagination(
|
|||
// Visualize only $block_limit blocks.
|
||||
if ($count <= $pagination) {
|
||||
if ($print_total_items) {
|
||||
$output = "<div class='pagination ".$other_class."' ".$set_id.'>';
|
||||
$output = "<div class='".$other_class."' ".$set_id.'>';
|
||||
// Show the count of items.
|
||||
$output .= '<div class="total_pages">'.sprintf(__('Total items: %s'), $count).'</div>';
|
||||
// End div and layout.
|
||||
|
@ -2211,7 +2211,7 @@ function ui_pagination(
|
|||
$end_page = ($number_of_pages - 1);
|
||||
}
|
||||
|
||||
$output = "<div class='pagination ".$other_class."' ".$set_id.'>';
|
||||
$output = "<div class='".$other_class."' ".$set_id.'>';
|
||||
|
||||
// Show the count of items.
|
||||
if ($print_total_items) {
|
||||
|
@ -2222,7 +2222,7 @@ function ui_pagination(
|
|||
|
||||
// Show GOTO FIRST PAGE button.
|
||||
if ($number_of_pages > $block_limit) {
|
||||
if (!empty($script)) {
|
||||
if (empty($script) === false) {
|
||||
$script_modified = $script;
|
||||
$script_modified = str_replace(
|
||||
$parameter_script['count'],
|
||||
|
@ -2235,11 +2235,19 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination-arrows ".$other_class." offset_0'
|
||||
href='javascript: ".$script_modified.";'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$firstHref = 'javascript: '.$script_modified.';';
|
||||
} else {
|
||||
$output .= "<a class='pagination-arrows ".$other_class." offset_0' href='".io_safe_output($url).'&'.$offset_name."=0'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$firstHref = io_safe_output($url).'&'.$offset_name.'=0';
|
||||
}
|
||||
|
||||
$output .= html_print_anchor(
|
||||
[
|
||||
'href' => $firstHref,
|
||||
'class' => 'pandora_pagination '.$other_class.' offset_0 previous',
|
||||
'content' => __('First'),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2267,26 +2275,30 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_previous_page."'
|
||||
href='javacript: ".$script_modified.";'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$previousHref = 'javascript: '.$script_modified.';';
|
||||
} else {
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_previous_page."' href='".$url.'&'.$offset_name.'='.$offset_previous_page."'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$previousHref = io_safe_output($url).'&'.$offset_name.'='.$offset_previous_page;
|
||||
}
|
||||
|
||||
$output .= html_print_anchor(
|
||||
[
|
||||
'href' => $previousHref,
|
||||
'class' => 'pandora_pagination '.$other_class.' offset_'.$offset_previous_page,
|
||||
'content' => __('Previous'),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Show pages.
|
||||
for ($iterator = $ini_page; $iterator <= $end_page; $iterator++) {
|
||||
$actual_page = (int) ($offset / $pagination);
|
||||
|
||||
if ($iterator == $actual_page) {
|
||||
$output .= "<div class='page_number page_number_active'>";
|
||||
} else {
|
||||
$output .= "<div class='page_number'>";
|
||||
}
|
||||
$activePageClass = ((int) $iterator === (int) $actual_page) ? 'current' : '';
|
||||
|
||||
$offset_page = ($iterator * $pagination);
|
||||
|
||||
if (!empty($script)) {
|
||||
if (empty($script) === false) {
|
||||
$script_modified = $script;
|
||||
$script_modified = str_replace(
|
||||
$parameter_script['count'],
|
||||
|
@ -2299,15 +2311,24 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination ".$other_class.' offset_'.$offset_page."'
|
||||
href='javascript: ".$script_modified.";'>";
|
||||
$anchorHref = 'javascript: ".$script_modified.";';
|
||||
} else {
|
||||
$output .= "<a class='pagination ".$other_class.' offset_'.$offset_page."' href='".$url.'&'.$offset_name.'='.$offset_page."'>";
|
||||
$anchorHref = $url.'&'.$offset_name.'='.$offset_page;
|
||||
}
|
||||
|
||||
$output .= $iterator;
|
||||
|
||||
$output .= '</a></div>';
|
||||
$output .= html_print_anchor(
|
||||
[
|
||||
'href' => $anchorHref,
|
||||
'class' => sprintf(
|
||||
'pandora_pagination %s offset_%s %s',
|
||||
$other_class,
|
||||
$offset_page,
|
||||
$activePageClass
|
||||
),
|
||||
'content' => $iterator,
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2335,11 +2356,19 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_next_page."'
|
||||
href='javascript: ".$script_modified.";'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$nextHref = 'javascript: ".$script_modified.";';
|
||||
} else {
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_next_page."' href='".$url.'&'.$offset_name.'='.$offset_next_page."'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$nextHref = $url.'&'.$offset_name.'='.$offset_next_page;
|
||||
}
|
||||
|
||||
$output .= html_print_anchor(
|
||||
[
|
||||
'href' => $nextHref,
|
||||
'class' => 'pandora_pagination '.$other_class.' offset_'.$offset_next_page,
|
||||
'content' => __('Next'),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Show GOTO LAST PAGE button.
|
||||
|
@ -2359,11 +2388,19 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_lastpage."'
|
||||
href='javascript: ".$script_modified.";'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$lastHref = 'javascript: ".$script_modified.";';
|
||||
} else {
|
||||
$output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_lastpage."' href='".$url.'&'.$offset_name.'='.$offset_lastpage."'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot invert_filter']).'</a>';
|
||||
$lastHref = $url.'&'.$offset_name.'='.$offset_lastpage;
|
||||
}
|
||||
|
||||
$output .= html_print_anchor(
|
||||
[
|
||||
'href' => $lastHref,
|
||||
'class' => 'pandora_pagination '.$other_class.' offset_'.$offset_lastpage.' next',
|
||||
'content' => __('Last'),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
|
|
@ -9992,7 +9992,7 @@ button.submitButton {
|
|||
border-radius: 8px;
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
z-index: 10001;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
button.buttonButton.mini,
|
||||
|
@ -10375,7 +10375,7 @@ button.ui-button.ui-widget.submit-cancel:active {
|
|||
}
|
||||
|
||||
.moduleIdBox {
|
||||
height: 40px;
|
||||
height: 41px;
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
margin-left: -56px;
|
||||
|
@ -10732,7 +10732,7 @@ tr.bring_next_field {
|
|||
|
||||
.action_buttons_right_content {
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
z-index: 10000;
|
||||
left: 250px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -10756,7 +10756,7 @@ tr.bring_next_field {
|
|||
top: -8px;
|
||||
border: 1px solid #e5e9ed;
|
||||
background-color: #fff;
|
||||
z-index: 10000;
|
||||
/*z-index: 10000;*/
|
||||
}
|
||||
|
||||
.fixed_action_buttons_size > .action_buttons_background_mask {
|
||||
|
|
|
@ -339,15 +339,17 @@ a.pandora_pagination {
|
|||
a.pandora_pagination.next {
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
border-right: 1px solid #c0ccdc;
|
||||
}
|
||||
|
||||
a.pandora_pagination.previous {
|
||||
border-top-left-radius: 8px;
|
||||
border-bottom-left-radius: 8px;
|
||||
border-left: 1px solid #c0ccdc;
|
||||
}
|
||||
.dataTables_paginate > span > span.ellipsis + a.pandora_pagination:last-child,
|
||||
.dataTables_paginate {
|
||||
border-left: 1px solid #c0ccdc;
|
||||
/*/border-left: 1px solid #c0ccdc;*/
|
||||
}
|
||||
|
||||
a.pandora_pagination.disabled {
|
||||
|
|
|
@ -37,6 +37,8 @@ require_once $config['homedir'].'/include/functions_users.php';
|
|||
require_once $config['homedir'].'/include/functions_modules.php';
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
|
||||
ui_require_css_file('tables');
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], 0, 'AW')) {
|
||||
|
@ -697,13 +699,6 @@ $url_down_group = 'index.php?sec=view&sec2=operation/agentes/estado_agente&a
|
|||
$url_up_last = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=last_contact&sort=up';
|
||||
$url_down_last = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=last_contact&sort=down';
|
||||
|
||||
|
||||
// Prepare pagination.
|
||||
ui_pagination(
|
||||
$total_agents,
|
||||
ui_get_url_refresh(['group_id' => $group_id, 'recursion' => $recursion, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status])
|
||||
);
|
||||
|
||||
// Show data.
|
||||
$tableAgents = new stdClass();
|
||||
$tableAgents->cellpadding = 0;
|
||||
|
@ -934,7 +929,7 @@ foreach ($agents as $agent) {
|
|||
if (empty($tableAgents->data) === false) {
|
||||
html_print_table($tableAgents);
|
||||
|
||||
ui_pagination(
|
||||
$tablePagination = ui_pagination(
|
||||
$total_agents,
|
||||
ui_get_url_refresh(
|
||||
[
|
||||
|
@ -947,15 +942,16 @@ if (empty($tableAgents->data) === false) {
|
|||
),
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
'offset',
|
||||
true,
|
||||
'pagination-bottom'
|
||||
'offset',
|
||||
false,
|
||||
'dataTables_paginate paging_simple_numbers'
|
||||
);
|
||||
|
||||
unset($table);
|
||||
} else {
|
||||
ui_print_info_message([ 'no_close' => true, 'message' => __('There are no defined agents') ]);
|
||||
$tablePagination = '';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'AM') === true) {
|
||||
|
@ -969,8 +965,9 @@ if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($
|
|||
true
|
||||
),
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
|
|
|
@ -533,25 +533,11 @@ $table_contact->data[] = $data;
|
|||
|
||||
$data_opcional = new stdClass();
|
||||
$data_opcional->id = 'agent_data_main';
|
||||
// $data_opcional->styleTable = 'width: 100%; padding: 0; border: 0; margin: 0';
|
||||
$data_opcional->class = 'floating_form';
|
||||
$data_opcional->cellspacing = 0;
|
||||
$data_opcional->cellpadding = 0;
|
||||
// $table_data->class = 'box-shadow agent_details_col mrgn_lft_20px mrgn_right_20px white_table white_table_droppable align-top';
|
||||
$data_opcional->style[0] = 'height: 46px; width: 25%; padding-right: 5px; font-family: \'Pandora-Bold\'; text-align: end;';
|
||||
$data_opcional->style[1] = 'height: 46px; width: 75%; padding-left: 5px; font-family: \'Pandora-Regular\';';
|
||||
/*
|
||||
$table_data->headstyle[0] = 'border-bottom: 0';
|
||||
$table_data->headstyle[1] = 'border-bottom: 0';
|
||||
|
||||
$table_data->head[0] = html_print_image(
|
||||
'images/arrow_down_green.png',
|
||||
true,
|
||||
[ 'class' => 'pdd_r_10px' ]
|
||||
);
|
||||
$table_data->head[0] .= '<span class="subsection_header_title">'.__('Agent info').'</span>';
|
||||
$table_data->head_colspan[0] = 4;
|
||||
*/
|
||||
// Gis and url address.
|
||||
$agentAdditionalContent = '';
|
||||
// Position Information.
|
||||
|
@ -611,12 +597,6 @@ if ((int) $agent['timezone_offset'] !== 0) {
|
|||
$data_opcional->data['timezone_offset'][1] = $agent['timezone_offset'];
|
||||
}
|
||||
|
||||
/*
|
||||
$data_opcional = array_chunk($data_opcional, 2);
|
||||
foreach ($data_opcional as $key => $value) {
|
||||
$table_data->data[] = $data_opcional[$key];
|
||||
}
|
||||
*/
|
||||
// Custom fields.
|
||||
$fields = db_get_all_rows_filter(
|
||||
'tagent_custom_fields',
|
||||
|
@ -672,14 +652,14 @@ for ($i = 0; $i < $custom_fields_count; $i++) {
|
|||
$columns = array_merge($first_column, $second_column);
|
||||
} else {
|
||||
$columns = $first_column;
|
||||
if ($table_data->data !== null) {
|
||||
$filas = count($table_data->data);
|
||||
if ($data_opcional->data !== null) {
|
||||
$filas = count($data_opcional->data);
|
||||
}
|
||||
|
||||
$table_data->colspan[$filas][1] = 3;
|
||||
$data_opcional->colspan[$filas][1] = 3;
|
||||
}
|
||||
|
||||
$table_data->data[] = $columns;
|
||||
$data_opcional->data[] = $columns;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue