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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user