X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmisc%2Fbatch.js;fp=web%2Fcore%2Fmisc%2Fbatch.js;h=83ecf5a748357918439b1d5f5be7d4e801875c4a;hp=411badba4272ef1756e901cb294deb8f93ce2248;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/misc/batch.js b/web/core/misc/batch.js index 411badba4..83ecf5a74 100644 --- a/web/core/misc/batch.js +++ b/web/core/misc/batch.js @@ -1,24 +1,17 @@ /** - * @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(); @@ -35,12 +28,11 @@ 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