Opened 9 years ago
Closed 9 years ago
#28895 closed defect (bug) (fixed)
Media Grid: Add a date filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | low |
Severity: | major | Version: | 4.0 |
Component: | Media | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
Related: ticket:24716:23
The media list view has a date filter, we should try to add one to the grid view too. But it seems like there is no API to support multiple wp.media.view.AttachmentFilters
in one frame yet.
Related code is trunk/src/wp-includes/js/media-views.js@29166#L5397 and trunk/src/wp-includes/js/media-views.js@29166#L5673. Code for the date dropdown from the list table: trunk/src/wp-admin/includes/class-wp-list-table.php@29166#L442.
If someone can came up with a patch for 4.0, that would be cool.
Attachments (3)
Change History (13)
This ticket was mentioned in IRC in #wordpress-dev by sathishn1. View the logs.
9 years ago
#3
@
9 years ago
- Keywords has-patch added; needs-patch removed
In 28895.diff, introduce a date filter.
#7
follow-up:
↓ 9
@
9 years ago
We now have two <select>
's with the same ID attribute, "media-attachment-filters".
A new
AttachmentFilter
view will be added to theAttachmentBrowser
'sToolbar
, similar to how they are here. So what needs doing is create a new filter view for Date filtering a lamedia.view.AttachmentFilters.mimeTypes
and then conditionally add it to the toolbar, probably inside the conditional checkif ( this.controller.activeModes.where( { id: 'grid' } ).length ) { }