diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/batch.inc | 7 | ||||
-rw-r--r-- | includes/form.inc | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/includes/batch.inc b/includes/batch.inc index 22692f0ad..c4f481a05 100644 --- a/includes/batch.inc +++ b/includes/batch.inc @@ -22,6 +22,13 @@ function _batch_page() { // Register database update for end of processing. register_shutdown_function('_batch_shutdown'); + // Add batch-specific css. + foreach ($batch['sets'] as $batch_set) { + foreach ($batch_set['css'] as $css) { + drupal_add_css($css); + } + } + $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; $output = NULL; switch ($op) { diff --git a/includes/form.inc b/includes/form.inc index b2472c68e..3df1a60f4 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2387,6 +2387,7 @@ function form_clean_id($id = NULL, $flush = FALSE) { * 'operations' and 'finished' functions, for instance if they don't * reside in the original '.module' file. The path should be relative to * the base_path(), and thus should be built using drupal_get_path(). + * 'css' : an array of paths to CSS files to be used on the progress page. * * Operations are added as new batch sets. Batch sets are used to ensure * clean code independence, ensuring that several batches submitted by @@ -2419,6 +2420,7 @@ function batch_set($batch_definition) { 'init_message' => $t('Initializing.'), 'progress_message' => $t('Remaining @remaining of @total.'), 'error_message' => $t('An error has occurred.'), + 'css' => array(), ); $batch_set = $init + $batch_definition + $defaults; |