diff --git a/core/includes/batch.inc b/core/includes/batch.inc index 786ee3c..ffcb75c 100644 --- a/core/includes/batch.inc +++ b/core/includes/batch.inc @@ -164,6 +164,7 @@ function _batch_progress_page() { '#percent' => $percentage, '#message' => $message, '#label' => $label, + '#animate' => TRUE, '#attached' => array( 'drupal_add_html_head' => array( array( diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 47fda81..041669e 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2282,7 +2282,7 @@ function drupal_common_theme() { 'template' => 'feed-icon', ), 'progress_bar' => array( - 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL), + 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL, 'animate' => TRUE), 'template' => 'progress-bar', ), 'indentation' => array( @@ -2396,3 +2396,15 @@ function drupal_common_theme() { ), ); } + +/** + * 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']), + ); +} diff --git a/core/misc/progress.js b/core/misc/progress.js index 52127e6..886f1bd 100644 --- a/core/misc/progress.js +++ b/core/misc/progress.js @@ -25,6 +25,9 @@ '