Make WordPress Core

Ticket #24291: 24291.28.diff

File 24291.28.diff, 2.0 KB (added by azaozz, 12 years ago)
  • wp-admin/css/wp-admin.css

     
    40614061.wp-format-media-holder div {
    40624062        display: none;
    40634063}
     4064
    40644065.wp-format-media-holder.drag-over div {
    40654066        position: absolute;
    40664067        top: 10px;
     
    40724073}
    40734074
    40744075#poststuff .wp-format-media-holder.drag-over div h3 {
    4075 
    40764076        position: absolute;
    40774077        top: 50%;
    40784078        left: 0;
     
    41114111        text-align: center;
    41124112}
    41134113
    4114 body.wp-format-image .attachment-display-settings {
    4115         display: none;
    4116 }
    4117 
     4114body.wp-format-image .attachment-display-settings,
    41184115body.wp-format-status #titlewrap,
    41194116body.wp-format-image .wp-media-buttons .insert-media,
    41204117body.wp-format-audio .wp-media-buttons .insert-media,
     
    41244121        display: none;
    41254122}
    41264123
     4124.wp-format-media-select .media-progress-bar,
     4125.wp-format-media-select .media-progress-bar div,
    41274126.mejs-audio audio,
    41284127.mejs-video video {
    41294128        display: block;
  • wp-admin/js/post-formats.js

     
    5959                '</div>'].join( '' ) );
    6060        }
    6161
     62        function imageFormatUploadFilesAdded( uploader, files ) {
     63                $.each( files, function( i, file ) {
     64                        if ( i > 0 )
     65                                uploader.removeFile(file);
     66                });
     67        }
     68
    6269        var uploader = {
    6370                dropzone:  $('.wp-format-media-holder[data-format=image]'),
    6471                success:   imageFormatUploadSuccess,
    65                 error: imageFormatUploadError,
    66                 plupload:  {},
     72                error:     imageFormatUploadError,
     73                plupload:  {
     74                        runtimes: 'html5',
     75                        filters: [ {title: 'Image', extensions: 'jpg,jpeg,gif,png'} ]
     76                },
    6777                params:    {}
    6878        };
    6979        uploader = new wp.Uploader( uploader );
    7080        uploader.uploader.bind( 'BeforeUpload', imageFormatUploadStart );
    7181        uploader.uploader.bind( 'UploadProgress', imageFormatUploadProgress );
     82        uploader.uploader.bind( 'FilesAdded', imageFormatUploadFilesAdded );
    7283
    7384        function switchFormatClass( format ) {
    7485                formatField.val( format );