media.admin.js is a mess of closures and WTFs.

Comments

james.elliott’s picture

Status: Active » Needs review
StatusFileSize
new8.54 KB

This patch affects media.module as well as media.admin.js

In media module:

  1. Removed menu item for admin/content/media/browser that created a dead link as a local task
  2. Added admin/content/media/add so that it was no longer necessary to have a fake "add file" link added via JS
    1. In media.admin.js:

      1. Moved all closures to named functions
      2. Removed the code that added the "Add file" link and hid the other action links
      3. Cleaned up the code that handled selection in the thumbnail view

Status: Needs review » Needs work

The last submitted patch, 0008-1124682-UnWTFing-media.admin_.js_.patch, failed testing.

JacobSingh’s picture

Will this still work w/o JS? If so RTBC. I think that git format-patch and d.o. aren't friends yet.

dave reid’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue tags: +JavaScript

Would need to be re-rolled against 7.x-2.x and likely no longer applies now.

dddave’s picture

Status: Needs work » Closed (won't fix)

Given the amount of time passed and the changes the code underwent in the meantime I take the liberty to close this issue. Feel free to provide a new patch to attack any problems still out there.