[wp-trac] [WordPress Trac] #21921: Allow JS Attachments models to be searchable and sortable
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 18 21:42:30 UTC 2012
#21921: Allow JS Attachments models to be searchable and sortable
----------------------------+--------------------------
Reporter: koopersmith | Owner: koopersmith
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 3.5
Component: Media | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------------+--------------------------
Changes (by koopersmith):
* owner: => koopersmith
* status: new => closed
* resolution: => fixed
Comment:
In [21898]:
{{{
#!CommitTicketReference repository="" revision="21898"
Allow JS Attachments models to be searchable and sortable.
Moves `wp.media.model.Query` sorting and searching to the parent
`wp.media.model.Attachments`.
Query parameters are stored in `attachments.props`, which is a
`Backbone.Model`, and supports `order` (`'ASC'` or `'DESC'`), `orderby`
(any `Attachment` model property name), `search` (a search term), and
`query` (a boolean value that ties the `Attachments` collection to the
server).
`wp.media.query( args )` now returns an `Attachments` set that is mapped
to a `Query` collection instead of the `Query` collection itself. This
allows you to change the query arguments by updating `attachments.props`
instead of fetching the mirrored arguments, changing them, and passing
them to `wp.media.query()` again.
fixes #21921, see #21390, #21809.
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21921#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list