Removed the scoped .find() an ID is unique on a page and doesn't need to be scoped.
Added the Drupal object to the closure like we're doing with the jQuery object (see #1089300-5: Clean up drupal.js)
removed the closure in .once() instead we check that .once() returned an element and process it.
Changed the name of progress to progressBar to avoid confusion with the new $progress variable.

Comments

nod_’s picture

Status: Active » Needs review
nod_’s picture

Title: Selectors clean-up: batch.js » Clean-up: batch.js
Status: Needs review » Active
StatusFileSize
new1.91 KB

Extended the scope of this clean-up a little.

Debug-friendly: turned anonymous function into named functions.
Declared all variables at the top.
reorder some things to make more sense.

This patch removes 3 anonymous function we were not really using.

nod_’s picture

Status: Active » Needs review
robloach’s picture

Issue tags: -JavaScript clean-up

#2: core-js-selectors-batch-1.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +JavaScript clean-up

The last submitted patch, core-js-selectors-batch-1.patch, failed testing.

nod_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.91 KB

reroll

frega’s picture

StatusFileSize
new2.07 KB

Rerolled patch from #6 to apply and reflect changes introduced in 722f615437d82c175d1135af12a5cde94255e2f1, f047851a7a5ade6be7ae87e899963594675cf5be (20120819).

frega’s picture

StatusFileSize
new2.14 KB

Added missing second parameter to self invoking function wrapping code. Re-rolled patch.

pivica’s picture

Status: Needs review » Needs work

Installer progress bar does not work after this patch - its displayed but not updated with progress. Will take a more look.

frega’s picture

StatusFileSize
new2.12 KB

Tested with the installation progress bar. Merged holder and $progress variables.

pivica’s picture

Status: Needs work » Reviewed & tested by the community

Looks fine now - progress bar works as expected.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.