[wp-trac] [WordPress Trac] #28965: Media Grid Javascript Clean-up

WordPress Trac noreply at wordpress.org
Sun Jul 20 18:56:34 UTC 2014


#28965: Media Grid Javascript Clean-up
--------------------------+------------------------------
 Reporter:  ericlewis     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+------------------------------

Comment (by ericlewis):

 In attachment:28965.diff:

 * Instead of using an explicitly stated CSS class at the top-level frame
 of media grid,
 use the `mode-grid` selector to apply styles.
 * Remove the `edit` mode, which is cruft from a different implementation
 of bulk edit.
 * Remove screen options CSS, which is unnecessary since the grid is not
 styled fixed.
 * Use more self-documenting function names, e.g.
 `createViewForContentRegionInBrowseMode`, which while verbose, is more
 useful than `createBrowse`
 * For `media.controller.EditAttachmentMetadata` state, remove unnecessary
 function overloading in lieu of setting region defaults to `false` in the
 options hash.
 * Move mode functionality from media.view.MediaFrame` to
 `media.view.Frame`.
 * Remove the custom events hash from
 media.view.Attachment.Details.TwoColumn, make
 method parity with media.view.Attachment.Details' events hash.
 * Remove unnecessary methods: `media.view.Attachment.Details.render`
 * Fix up the image editor view loading business in
 `media.view.MediaFrame.EditAttachments`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28965#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list