Opened 10 years ago
Closed 10 years ago
#28965 closed defect (bug) (fixed)
Media Grid JavaScript Clean-up
Reported by: | ericlewis | Owned by: | |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Media | Keywords: | has-patch |
Focuses: | javascript, docs | Cc: |
Description
Media Grid has been developed in a flurry.
Let's sweep through and fix up where urgency previously trumped cleanliness.
Attachments (3)
Change History (17)
#2
@
10 years ago
- More documentation.
- Replace
media.view.MediaFrame.EditAttachments.editMetadataContent
withmedia.view.MediaFrame.EditAttachments.createViewForContentRegionInEditMetadataMode
(self-documenting method naming), and clean up the implementation.
#7
@
10 years ago
I left out the iOS-style method name changes for now - I think better docs would alleviate the need for those.
#8
in reply to:
↑ 6
@
10 years ago
Replying to wonderboymusic:
In 29266:
Media Grid: general JS cleanup.
hi,
after this I get a blank media grid, no grid items at all, no js errors in the console. I have to add back "router: false" to the default states in media-grid.js but I'm totally new to backbone.js sorry I can't help more.
#10
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
In attachment:28965.3.diff: per @koop, don't select body with jQuery.
#12
@
10 years ago
For clarity's sake: document.body
is the body element itself, not a jQuery collection. In this case, it'll happen to work either way (which I dislike, I'd rather a more specific API).
Also, I think the container
property might be vestigial at this point.
(Also, hey everyone.)
In attachment:28965.diff:
use the
mode-grid
selector to apply styles.edit
mode, which is cruft from a different implementation of bulk edit.createViewForContentRegionInBrowseMode
, which while verbose, is more useful thancreateBrowse
media.controller.EditAttachmentMetadata
state, remove unnecessary function overloading in lieu of setting region defaults tofalse
in the options hash.to
media.view.Frame`.media.view.Attachment.Details.render
media.view.MediaFrame.EditAttachments