Make WordPress Core

Changeset 22552


Ignore:
Timestamp:
11/12/2012 11:52:17 PM (12 years ago)
Author:
koopersmith
Message:

Media: Add an "upload more files" button to upload states. see #21390.

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r22547 r22552  
    620620}
    621621
     622
     623.attachments-browser .media-toolbar-primary > .media-button,
     624.attachments-browser .media-toolbar-primary > .media-button-group,
     625.attachments-browser .media-toolbar-secondary > .media-button,
     626.attachments-browser .media-toolbar-secondary > .media-button-group {
     627    margin-top: 10px;
     628}
     629
    622630.attachments-browser .attachments {
    623631    position: absolute;
  • trunk/wp-includes/js/media-views.js

    r22548 r22552  
    471471    media.controller.Upload = media.controller.Library.extend({
    472472        defaults: _.defaults({
    473             id: 'upload'
     473            id:     'upload',
     474            upload: { text: l10n.uploadMoreFiles },
     475            searchable: false
    474476        }, media.controller.Library.prototype.defaults ),
    475477
     
    853855                sortable:   state.get('sortable'),
    854856                search:     state.get('searchable'),
     857                upload:     state.get('upload'),
    855858
    856859                AttachmentView: state.get('AttachmentView')
     
    15271530
    15281531            $placeholder = this.$('.browser');
    1529             $browser.text( $placeholder.text() );
     1532            $browser.detach().text( $placeholder.text() );
    15301533            $browser[0].className = $placeholder[0].className;
    15311534            $placeholder.replaceWith( $browser.show() );
     
    25062509            }
    25072510
     2511            if ( this.options.upload && this.controller.uploader ) {
     2512                this.toolbar.set( 'upload', new media.view.Button( _.extend({
     2513                    el:       this.controller.uploader.$browser.detach()[0],
     2514                    priority: -60,
     2515                    size:     'large',
     2516                    text:     l10n.selectFiles
     2517                }, this.options.upload ) ).render() );
     2518            }
     2519
    25082520            this.attachments = new media.view.Attachments({
    25092521                controller: this.controller,
  • trunk/wp-includes/media.php

    r22547 r22552  
    13401340        'selectFiles'       => __( 'Select files' ),
    13411341        'uploadImagesTitle' => __( 'Upload Images' ),
     1342        'uploadMoreFiles'   => __( 'Upload more files' ),
    13421343
    13431344        // Library
Note: See TracChangeset for help on using the changeset viewer.