diff --git a/core/includes/batch.inc b/core/includes/batch.inc index 7d905cd..5343920 100644 --- a/core/includes/batch.inc +++ b/core/includes/batch.inc @@ -165,6 +165,7 @@ '#percent' => $percentage, '#message' => $message, '#label' => $label, + '#animate' => TRUE, '#attached' => array( 'html_head' => array( array( diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 9ce21ff..46f5f56 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1869,7 +1869,7 @@ 'variables' => array('url' => NULL, 'title' => NULL), ), 'progress_bar' => array( - 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL), + 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL, 'animate' => TRUE), ), 'indentation' => array( 'variables' => array('size' => 1), @@ -1960,3 +1960,15 @@ ), ); } + +/** + * Implements hook_preprocess_HOOK() for the progress bar. + */ +function template_preprocess_progress_bar(&$variables) { + // Allow ajax version of progress to be animated. + // @see progress.js + $variables['#attached']['js'][] = array( + 'type' => 'setting', + 'data' => array('progressBarAnimate' => $variables['animate']), + ); +} \ No newline at end of file diff --git a/core/misc/progress.js b/core/misc/progress.js index 52127e6..32090eb 100644 --- a/core/misc/progress.js +++ b/core/misc/progress.js @@ -22,7 +22,8 @@ // have completed their current activity and not interrupt the screen reader. this.element = $('
').attr('id', id); this.element.html('