Make WordPress Core

Changeset 22529


Ignore:
Timestamp:
11/10/2012 09:11:33 AM (11 years ago)
Author:
koopersmith
Message:

Media: Add instructions to drag and drop to reorder images on gallery and batch edit pages.

Removes search boxes from these pages as well.

see #21390.

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r22523 r22529  
    276276    color: #464646;
    277277    font-family: sans-serif;
     278}
     279
     280.media-toolbar-secondary .search {
     281    margin-right: 16px;
    278282}
    279283
     
    497501}
    498502
     503.attachments-browser .instructions {
     504    display: inline-block;
     505    margin-top: 16px;
     506    line-height: 18px;
     507    font-size: 13px;
     508    color: #999;
     509}
     510
    499511
    500512/**
  • trunk/wp-includes/js/media-views.js

    r22523 r22529  
    264264    media.controller.Library = media.controller.State.extend({
    265265        defaults: {
    266             id:       'library',
    267             multiple: false,
    268             describe: false,
    269             toolbar:  'main-attachments',
    270             sidebar:  'settings'
     266            id:         'library',
     267            multiple:   false,
     268            describe:   false,
     269            toolbar:    'main-attachments',
     270            sidebar:    'settings',
     271            searchable: true
    271272        },
    272273
     
    502503            editing:    false,
    503504            sortable:   true,
     505            searchable: false,
    504506            toolbar:    'gallery-edit',
    505507            sidebar:    'settings'
     
    810812                model:      state,
    811813                sortable:   state.get('sortable'),
     814                search:     state.get('searchable'),
    812815
    813816                AttachmentView: state.get('AttachmentView')
     
    946949                // Batch states.
    947950                new media.controller.Library({
    948                     id:       'batch-edit',
    949                     multiple: false,
    950                     describe: true,
    951                     edge:     199,
    952                     sortable: true,
    953                     menu:     'batch',
    954                     toolbar:  'batch-edit',
    955                     sidebar:  'attachment-settings'
     951                    id:         'batch-edit',
     952                    multiple:   false,
     953                    describe:   true,
     954                    edge:       199,
     955                    sortable:   true,
     956                    searchable: false,
     957                    menu:       'batch',
     958                    toolbar:    'batch-edit',
     959                    sidebar:    'attachment-settings'
    956960                }),
    957961
     
    23172321                    controller: this.controller,
    23182322                    model:      this.collection.props,
    2319                     priority:   -40
     2323                    priority:   -60
    23202324                }).render() );
     2325            }
     2326
     2327            if ( this.options.sortable ) {
     2328                this.toolbar.add( 'dragInfo', new Backbone.View({
     2329                    el: $( '<div class="instructions">' + l10n.dragInfo + '</div>' )[0],
     2330                    priority: -40
     2331                }) );
    23212332            }
    23222333
  • trunk/wp-includes/media.php

    r22524 r22529  
    13291329        'addImages'   => __( 'Add images' ),
    13301330        'selected'    => __( 'selected' ),
     1331        'dragInfo'    => __( 'Drag and drop to reorder images.' ),
    13311332
    13321333        // Upload
Note: See TracChangeset for help on using the changeset viewer.