Make WordPress Core

Changeset 22824


Ignore:
Timestamp:
11/22/2012 12:35:05 PM (12 years ago)
Author:
koopersmith
Message:

Media: Add uploader error detection to the inline uploader view as well. see #21390.

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r22821 r22824  
    798798}
    799799
    800 .media-uploader-status .upload-error {
    801     margin: 8px 0 0 0;
     800.upload-errors .upload-error {
     801    max-width: 400px;
     802    margin: 8px auto 0 auto;
    802803    padding: 8px;
    803804    border: 1px #c00 solid;
     
    806807}
    807808
    808 .media-uploader-status .upload-error-label {
     809.upload-errors .upload-error-label {
    809810    padding: 2px 4px;
    810811    margin-right: 8px;
     
    816817}
    817818
    818 .media-uploader-status .upload-error-message {
     819.upload-errors .upload-error-message {
    819820    display: block;
    820821    padding-top: 8px;
  • trunk/wp-includes/js/media-views.js

    r22823 r22824  
    17931793            if ( ! this.options.$browser && this.controller.uploader )
    17941794                this.options.$browser = this.controller.uploader.$browser;
     1795
     1796            wp.Uploader.errors.on( 'add', this.error, this );
     1797        },
     1798
     1799        dispose: function() {
     1800            wp.Uploader.errors.off( null, null, this );
     1801            media.View.prototype.dispose.apply( this, arguments );
     1802            return this;
     1803        },
     1804
     1805        error: function( error ) {
     1806            this.views.set( '.upload-errors', new media.view.UploaderStatusError({
     1807                filename: error.get('file').name,
     1808                message:  error.get('message')
     1809            }) );
    17951810        },
    17961811
  • trunk/wp-includes/media.php

    r22821 r22824  
    14981498            </div>
    14991499
     1500            <div class="upload-errors"></div>
     1501
    15001502            <div class="post-upload-ui">
    15011503                <?php do_action( 'pre-upload-ui' ); ?>
     
    15461548            <span class="upload-filename"></span>
    15471549        </div>
    1548         <div class="upload-errors">
    1549         </div>
     1550        <div class="upload-errors"></div>
    15501551    </script>
    15511552
Note: See TracChangeset for help on using the changeset viewer.