Ticket #19845: 19845.6.diff
File 19845.6.diff, 3.3 KB (added by , 11 years ago) |
---|
-
src/wp-admin/css/edit.css
612 612 text-align: center; 613 613 } 614 614 615 .wp-fullscreen-wrap .uploader-editor { 616 background: rgba( 0, 86, 132, 0.9 ); 617 position: fixed; 618 z-index: 150060; /* above the editor toolbar */ 619 } 620 615 621 .uploader-editor-content { 616 622 border: 1px dashed #fff; 617 623 position: absolute; … … 619 625 left: 10px; 620 626 right: 10px; 621 627 bottom: 10px; 622 pointer-events: none;623 628 } 624 629 625 630 #poststuff .uploader-editor-content h3 { 626 margin: -0.5em 0 0;627 631 position: absolute; 628 632 top: 50%; 629 633 left: 0; 630 634 right: 0; 635 -webkit-transform: translateY( -50% ); 636 -ms-transform: translateY( -50% ); 631 637 transform: translateY( -50% ); 632 638 font-size: 40px; 633 639 color: #fff; 634 640 padding: 0; 635 641 display: none; 636 pointer-events: none;637 642 } 638 643 639 644 .uploader-editor.droppable { -
src/wp-includes/css/editor.css
1514 1514 right: 0; 1515 1515 bottom: 30px; 1516 1516 top: 60px; 1517 z-index: 1500 10;1517 z-index: 150070; 1518 1518 1519 1519 } 1520 1520 -
src/wp-includes/js/media-views.js
2808 2808 template: media.template( 'uploader-editor' ), 2809 2809 2810 2810 initialize: function() { 2811 this.initialized = false; 2812 2813 // Bail if UA does not support drag'n'drop or File API. 2814 if ( ! this.browserSupport() ) 2815 return this; 2816 2811 2817 this.$document = $(document); 2812 2818 this.dropzones = []; 2813 2819 this.files = []; … … 2819 2825 this.$document.on( 'dragover', _.bind( this.containerDragover, this ) ); 2820 2826 this.$document.on( 'dragleave', _.bind( this.containerDragleave, this ) ); 2821 2827 2828 this.initialized = true; 2822 2829 return this; 2823 2830 }, 2824 2831 2825 refresh: function() { 2832 browserSupport: function() { 2833 var supports = false, div = document.createElement('div'); 2834 2835 supports = ( 'draggable' in div ) || ( 'ondragstart' in div && 'ondrop' in div ); 2836 supports = supports && !! ( window.File && window.FileList && window.FileReader ); 2837 return supports; 2838 }, 2839 2840 refresh: function( e ) { 2826 2841 var dropzone_id; 2827 2842 for ( dropzone_id in this.dropzones ) { 2828 2843 // Hide the dropzones only if dragging has left the screen. 2829 2844 this.dropzones[ dropzone_id ].toggle( this.overContainer || this.overDropzone ); 2830 2845 } 2846 2847 if ( ! _.isUndefined( e ) ) { 2848 $( e.target ).closest( '.uploader-editor' ).toggleClass( 'droppable', this.overDropzone ); 2849 } 2850 2831 2851 return this; 2832 2852 }, 2833 2853 2834 2854 render: function() { 2855 if ( ! this.initialized ) 2856 return this; 2857 2835 2858 media.View.prototype.render.apply( this, arguments ); 2836 2859 $( '.wp-editor-wrap' ).each( _.bind( this.attach, this ) ); 2837 2860 return this; … … 2899 2922 }, 2900 2923 2901 2924 dropzoneDragover: function( e ) { 2902 $( e.target ).addClass( 'droppable' );2903 2925 this.overDropzone = true; 2904 _.defer( _.bind( this.refresh, this ));2926 this.refresh( e ); 2905 2927 return false; 2906 2928 }, 2907 2929 2908 2930 dropzoneDragleave: function( e ) { 2909 $( e.target ).removeClass( 'droppable' );2910 2931 this.overDropzone = false; 2911 this.refresh();2932 _.delay( _.bind( this.refresh, this, e ), 50 ); 2912 2933 } 2913 2934 }); 2914 2935