WordPress.org

Make WordPress Core

Changeset 20758


Ignore:
Timestamp:
05/09/12 21:26:19 (2 years ago)
Author:
koopersmith
Message:

Uploader & Theme Customizer: Refresh uploader flash/silverlight shims when the mouse enters the browse button. Add class to body based on uploader's drag/drop support. Properly assign customize image uploader containers (so flash shims are positioned correctly when scrolled). see #19910, #20452, #20582.

Location:
trunk/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/customize-controls.dev.js

    r20745 r20758  
    139139 
    140140            this.uploader = new wp.Uploader({ 
    141                 browser:  this.container.find('.upload'), 
    142                 dropzone: this.container.find('.upload-dropzone'), 
    143                 success:  this.success 
     141                container: this.container, 
     142                browser:   this.container.find('.upload'), 
     143                dropzone:  this.container.find('.upload-dropzone'), 
     144                success:   this.success 
    144145            }); 
    145146 
  • trunk/wp-includes/js/plupload/wp-plupload.dev.js

    r20577 r20758  
    33 
    44(function( exports, $ ) { 
     5    var Uploader, body; 
     6 
     7    body = $( document.body ); 
     8 
    59    /* 
    610     * An object that helps create a WordPress uploader using plupload. 
     
    1721     * @param attributes - object - Attributes and methods for this specific instance. 
    1822     */ 
    19     var Uploader = function( options ) { 
     23    Uploader = function( options ) { 
    2024        var self = this, 
    2125            elements = { 
     
    7074 
    7175        this.uploader.init(); 
     76 
     77        this.browser.on( 'mouseenter', this.refresh ); 
     78        body.toggleClass( 'uploader-drag-drop', this.uploader.features.dragdrop ); 
    7279 
    7380        this.uploader.bind( 'UploadProgress', this.progress ); 
     
    161168        added:    function() {}, 
    162169        progress: function() {}, 
    163         complete: function() {} 
     170        complete: function() {}, 
     171        refresh:  function() { 
     172            this.uploader.refresh(); 
     173        } 
    164174    }); 
    165175 
Note: See TracChangeset for help on using the changeset viewer.