1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 15:01:33 +02:00

[ticket/13740] Implement progress bar for AJAX UI

PHPBB3-13740
This commit is contained in:
MateBartus
2015-06-03 01:31:48 +02:00
committed by Mate Bartus
parent 37b0134aa4
commit b7ef709549
3 changed files with 146 additions and 35 deletions

View File

@@ -177,6 +177,16 @@ class ajax_iohandler extends iohandler_base
$this->form = '';
}
// If current task name is set, we push progress message to the client side
if (!empty($this->current_task_name))
{
$json_array['progress'] = array(
'task_name' => $this->current_task_name,
'task_num' => $this->current_task_progress,
'task_count' => $this->task_progress_count,
);
}
$this->errors = array();
$this->warnings = array();
$this->logs = array();
@@ -184,6 +194,15 @@ class ajax_iohandler extends iohandler_base
return $json_array;
}
/**
* {@inheritdoc}
*/
public function set_progress($task_lang_key, $task_number)
{
parent::set_progress($task_lang_key, $task_number);
$this->send_response();
}
/**
* Callback function for language replacing
*