Make WordPress Core

Changeset 32228


Ignore:
Timestamp:
04/20/2015 07:48:08 PM (10 years ago)
Author:
helen
Message:

Media: Date filtering does not need to be on for all contexts.

Affected areas include customizer upload controls and video playlist editing.

props ocean90.
fixes #32004.

Location:
trunk/src/wp-includes/js
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r32125 r32228  
    125125 * @param {boolean}                    [attributes.searchable=false]     Whether the library is searchable.
    126126 * @param {boolean}                    [attributes.sortable=true]        Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
     127 * @param {boolean}                    [attributes.date=true]            Whether to show the date filter in the browser's toolbar.
    127128 * @param {boolean}                    [attributes.describe=true]        Whether to offer UI to describe the attachments - e.g. captioning images in a gallery.
    128129 * @param {boolean}                    [attributes.dragInfo=true]        Whether to show instructional text about the attachments being sortable.
     
    148149        multiple:         false,
    149150        sortable:         true,
     151        date:             false,
    150152        searchable:       false,
    151153        content:          'browse',
     
    836838 * @param {boolean}                    [attributes.searchable=false]      Whether the library is searchable.
    837839 * @param {boolean}                    [attributes.sortable=true]         Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
     840 * @param {boolean}                    [attributes.date=true]             Whether to show the date filter in the browser's toolbar.
    838841 * @param {string|false}               [attributes.content=browse]        Initial mode for the content region.
    839842 * @param {string|false}               [attributes.toolbar=image-details] Initial mode for the toolbar region.
     
    860863        searchable:       false,
    861864        sortable:         true,
     865        date:             false,
    862866        display:          false,
    863867        content:          'browse',
     
    36813685 * @augments Backbone.View
    36823686 *
    3683  * @param {object}      options
    3684  * @param {object}      [options.filters=false] Which filters to show in the browser's toolbar.
    3685  *                                              Accepts 'uploaded' and 'all'.
    3686  * @param {object}      [options.search=true]   Whether to show the search interface in the
    3687  *                                              browser's toolbar.
    3688  * @param {object}      [options.date=true]     Whether to show the date filter in the
    3689  *                                              browser's toolbar.
    3690  * @param {object}      [options.display=false] Whether to show the attachments display settings
    3691  *                                              view in the sidebar.
    3692  * @param {bool|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
    3693  *                                              Accepts true, false, and 'errors'.
     3687 * @param {object}         [options]               The options hash passed to the view.
     3688 * @param {boolean|string} [options.filters=false] Which filters to show in the browser's toolbar.
     3689 *                                                 Accepts 'uploaded' and 'all'.
     3690 * @param {boolean}        [options.search=true]   Whether to show the search interface in the
     3691 *                                                 browser's toolbar.
     3692 * @param {boolean}        [options.date=true]     Whether to show the date filter in the
     3693 *                                                 browser's toolbar.
     3694 * @param {boolean}        [options.display=false] Whether to show the attachments display settings
     3695 *                                                 view in the sidebar.
     3696 * @param {boolean|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
     3697 *                                                 Accepts true, false, and 'errors'.
    36943698 */
    36953699var View = wp.media.View,
     
    59575961            search:     state.get('searchable'),
    59585962            filters:    state.get('filterable'),
     5963            date:       state.get('date'),
    59595964            display:    state.has('display') ? state.get('display') : state.get('displaySettings'),
    59605965            dragInfo:   state.get('dragInfo'),
  • trunk/src/wp-includes/js/media/controllers/collection-edit.js

    r31935 r32228  
    2121 * @param {boolean}                    [attributes.searchable=false]     Whether the library is searchable.
    2222 * @param {boolean}                    [attributes.sortable=true]        Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
     23 * @param {boolean}                    [attributes.date=true]            Whether to show the date filter in the browser's toolbar.
    2324 * @param {boolean}                    [attributes.describe=true]        Whether to offer UI to describe the attachments - e.g. captioning images in a gallery.
    2425 * @param {boolean}                    [attributes.dragInfo=true]        Whether to show instructional text about the attachments being sortable.
     
    4445        multiple:         false,
    4546        sortable:         true,
     47        date:             false,
    4648        searchable:       false,
    4749        content:          'browse',
  • trunk/src/wp-includes/js/media/controllers/gallery-edit.js

    r31935 r32228  
    1919 * @param {boolean}                    [attributes.searchable=false]      Whether the library is searchable.
    2020 * @param {boolean}                    [attributes.sortable=true]         Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
     21 * @param {boolean}                    [attributes.date=true]             Whether to show the date filter in the browser's toolbar.
    2122 * @param {string|false}               [attributes.content=browse]        Initial mode for the content region.
    2223 * @param {string|false}               [attributes.toolbar=image-details] Initial mode for the toolbar region.
     
    4344        searchable:       false,
    4445        sortable:         true,
     46        date:             false,
    4547        display:          false,
    4648        content:          'browse',
  • trunk/src/wp-includes/js/media/views/attachments/browser.js

    r31935 r32228  
    99 * @augments Backbone.View
    1010 *
    11  * @param {object}      options
    12  * @param {object}      [options.filters=false] Which filters to show in the browser's toolbar.
    13  *                                              Accepts 'uploaded' and 'all'.
    14  * @param {object}      [options.search=true]   Whether to show the search interface in the
    15  *                                              browser's toolbar.
    16  * @param {object}      [options.date=true]     Whether to show the date filter in the
    17  *                                              browser's toolbar.
    18  * @param {object}      [options.display=false] Whether to show the attachments display settings
    19  *                                              view in the sidebar.
    20  * @param {bool|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
    21  *                                              Accepts true, false, and 'errors'.
     11 * @param {object}         [options]               The options hash passed to the view.
     12 * @param {boolean|string} [options.filters=false] Which filters to show in the browser's toolbar.
     13 *                                                 Accepts 'uploaded' and 'all'.
     14 * @param {boolean}        [options.search=true]   Whether to show the search interface in the
     15 *                                                 browser's toolbar.
     16 * @param {boolean}        [options.date=true]     Whether to show the date filter in the
     17 *                                                 browser's toolbar.
     18 * @param {boolean}        [options.display=false] Whether to show the attachments display settings
     19 *                                                 view in the sidebar.
     20 * @param {boolean|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
     21 *                                                 Accepts true, false, and 'errors'.
    2222 */
    2323var View = wp.media.View,
  • trunk/src/wp-includes/js/media/views/frame/select.js

    r31935 r32228  
    132132            search:     state.get('searchable'),
    133133            filters:    state.get('filterable'),
     134            date:       state.get('date'),
    134135            display:    state.has('display') ? state.get('display') : state.get('displaySettings'),
    135136            dragInfo:   state.get('dragInfo'),
Note: See TracChangeset for help on using the changeset viewer.