/**
- * @file
- * Drupal's batch API.
- */
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
(function ($, Drupal) {
-
- 'use strict';
-
- /**
- * Attaches the batch behavior to progress bars.
- *
- * @type {Drupal~behavior}
- */
Drupal.behaviors.batch = {
- attach: function (context, settings) {
+ attach: function attach(context, settings) {
var batch = settings.batch;
var $progress = $('[data-drupal-progress]').once('batch');
- var progressBar;
+ var progressBar = void 0;
- // Success: redirect to the summary.
function updateCallback(progress, status, pb) {
if (progress === '100') {
pb.stopMonitoring();
progressBar = new Drupal.ProgressBar('updateprogress', updateCallback, 'POST', errorCallback);
progressBar.setProgress(-1, batch.initMessage);
progressBar.startMonitoring(batch.uri + '&op=do', 10);
- // Remove HTML from no-js progress bar.
+
$progress.empty();
- // Append the JS progressbar element.
+
$progress.append(progressBar.element);
}
}
};
-
-})(jQuery, Drupal);
+})(jQuery, Drupal);
\ No newline at end of file