Next contact to seconds

This commit is contained in:
fbsanchez 2019-05-29 12:42:55 +02:00
parent 5131c24772
commit 49dee1e2bc
2 changed files with 16 additions and 3 deletions

View File

@ -2712,6 +2712,7 @@ function ui_print_module_status(
* @param integer $height Height in 'em'.
* @param string $color Color.
* @param boolean $return Return or paint (if false).
* @param boolean $text Text to be displayed,by default progress %.
*
* @return string HTML code.
*/
@ -2720,7 +2721,8 @@ function ui_progress(
$width='100%',
$height='2.5',
$color='#80ba27',
$return=true
$return=true,
$text=''
) {
if (!$progress) {
$progress = 0;
@ -2734,9 +2736,13 @@ function ui_progress(
$progress = 0;
}
if (empty($text)) {
$text = $progress.'%';
}
ui_require_css_file('progress');
$output .= '<div class="progress_main" style="width: '.$width.'; height: '.$height.'em; border: 1px solid '.$color.'">';
$output .= '<span class="progress_text" style="font-size:'.($height - 0.5).'em;">'.$progress.'%</span>';
$output .= '<span class="progress_text" style="font-size:'.($height - 0.5).'em;">'.$text.'</span>';
$output .= '<div class="progress" style="width: '.$progress.'%; background: '.$color.'"></div>';
$output .= '</div>';

View File

@ -314,7 +314,14 @@ $table_contact->data[] = $data;
$data = [];
$table_contact->colspan[3][0] = 2;
$data[0] = ui_progress($progress, '80%');
$data[0] = ui_progress(
$progress,
'60%',
2,
'#BBB',
true,
($agent['intervalo'] * (100 - $progress) / 100).' s'
);
if ($progress > 100) {
$data[0] .= clippy_context_help('agent_out_of_limits');