Ticket #28850: 28850.patch
File 28850.patch, 6.4 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/media.js
75 75 // Open up a manage media frame into the grid. 76 76 wp.media && wp.media({ 77 77 frame: 'manage', 78 container: $(' #wpbody-content')78 container: $('.wrap') 79 79 }).open(); 80 80 81 81 $( '#find-posts-submit' ).click( function( event ) { -
src/wp-admin/upload.php
32 32 add_screen_option( 'dateFormatted', array( 'label' => __( 'Date' ) ) ); 33 33 add_screen_option( 'mime', array( 'label' => __( 'Mime-type' ) ) ); 34 34 35 get_current_screen()->add_help_tab( array( 36 'id' => 'overview', 37 'title' => __('Overview'), 38 'content' => 39 '<p>' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.' ) . '</p>' . 40 '<p>' . __( 'You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by date using the dropdown menu above the media table.' ) . '</p>' 41 ) ); 42 43 get_current_screen()->set_help_sidebar( 44 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 45 '<p>' . __( '<a href="http://codex.wordpress.org/Media_Library_Screen" target="_blank">Documentation on Media Library</a>' ) . '</p>' . 46 '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 47 ); 48 49 $title = __('Media Library'); 50 $parent_file = 'upload.php'; 51 35 52 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 53 ?> 54 <div class="wrap"> 55 <h2> 56 <?php 57 echo esc_html( $title ); 58 if ( current_user_can( 'upload_files' ) ) { ?> 59 <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php 60 } 61 ?> 62 </h2> 63 </div> 64 <?php 36 65 include( ABSPATH . 'wp-admin/admin-footer.php' ); 37 66 exit; 38 67 } -
src/wp-includes/css/media-views.css
1002 1002 outline: none; 1003 1003 } 1004 1004 1005 .attachments-browser .uploader-inline:not(.hidden) + .attachments {1006 top: 350px;1007 }1008 1009 1005 .attachments-browser .uploader-inline.hidden { 1010 1006 display: none; 1011 1007 } … … 2572 2568 /** 2573 2569 * Media Grid 2574 2570 */ 2571 .media-grid-view, 2572 .media-grid-view .media-frame-content, 2573 .media-grid-view .attachments-browser .attachments, 2574 .media-grid-view .attachments-browser .uploader-inline, 2575 .media-grid-view .uploader-inline-content { 2576 position: static; 2577 } 2575 2578 2576 .media-grid-view h1 { 2577 color: #222; 2578 font-size: 23px; 2579 font-weight: 400; 2580 margin: 10px 0 0; 2581 padding: 9px 15px 4px 22px; 2582 line-height: 29px; 2579 /* Regions we don't use at all */ 2580 .media-grid-view .media-frame-title, 2581 .media-grid-view .media-frame-toolbar, 2582 .media-grid-view .media-frame-menu { 2583 display: none; 2583 2584 } 2584 2585 2585 2586 .media-grid-view .view-switch { … … 2589 2590 vertical-align: middle; 2590 2591 } 2591 2592 2592 /** 2593 * Position both the frame and the uploader window into the content 2594 * area of the screen. 2595 */ 2596 .media-grid-view { 2597 z-index: 1; 2598 position: fixed; 2599 bottom: 0; 2600 left: 160px; 2601 right: 0; 2602 top: 32px; 2603 -webkit-transition: 200ms ease-in-out; 2604 transition: 200ms ease-in-out; 2593 .media-grid-view .media-frame-content { 2594 border: none; 2605 2595 } 2606 2596 2607 .media-grid-view-options { 2608 top: 120px; 2597 .media-grid-view .uploader-inline { 2598 padding-top: 0; 2599 margin-top: 0; 2609 2600 } 2610 2601 2611 @media screen and (max-width: 900px) {2612 .auto-fold .media-grid-view {2613 left: 36px;2614 }2615 }2616 @media screen and (max-width: 782px) {2617 .media-grid-view {2618 top: 46px;2619 }2620 .auto-fold .media-grid-view {2621 left: 0px;2622 bottom: 0px;2623 }2624 }2625 2626 /* Regions we don't use at all */2627 .media-grid-view .media-frame-toolbar,2628 .media-grid-view .media-frame-menu {2629 display: none;2630 }2631 2632 2602 /** 2633 2603 * Copied styles from the Add theme toolbar. 2634 2604 * … … 2644 2614 color: #555; 2645 2615 display: inline-block; 2646 2616 font-size: 13px; 2617 margin: 20px 0 30px; 2647 2618 padding: 0 20px; 2648 2619 position: relative; 2649 2620 width: 100%; 2650 2621 } 2651 2622 2623 .media-grid-view .attachments-browser { 2624 padding: 0; 2625 } 2626 2652 2627 /** 2653 2628 * The left and right buttons are copied from the expanded theme details modal. 2654 2629 * … … 2849 2824 margin-top: 3px; 2850 2825 } 2851 2826 2852 .media-grid-view.hide-router .media-frame-title {2853 -webkit-box-shadow: none;2854 box-shadow: none;2855 }2856 2857 2827 .media-grid-view .media-frame-content { 2858 2828 background-color: transparent; 2859 2829 bottom: 40px; 2860 2830 } 2831 2861 2832 @media screen and (max-width: 782px) { 2862 2833 .media-grid-view .media-frame-content { 2863 2834 border-bottom: none; 2864 2835 bottom: 0; 2865 2836 } 2866 2837 } 2867 2868 @media only screen and (max-width: 640px), screen and (max-height: 400px) {2869 .media-grid-view .media-frame-title {2870 display: block;2871 width: auto;2872 bottom: auto;2873 right: 0;2874 top: 0;2875 height: 60px;2876 }2877 } -
src/wp-includes/js/media-grid.js
124 124 } 125 125 }).render(); 126 126 this.uploader.ready(); 127 $('body').append( this.uploader.el );127 //$('body').append( this.uploader.el ); 128 128 129 129 this.options.uploader = false; 130 130 } … … 201 201 libraryState = new media.controller.Library({ 202 202 library: media.query( options.library ), 203 203 multiple: options.multiple, 204 title: options.title,205 204 priority: 20, 206 205 toolbar: false, 207 206 router: false, … … 209 208 filterable: 'mime-types' 210 209 }); 211 210 212 libraryState._renderTitle = function( view ) { 213 var text = this.get('title') || ''; 214 view.$el.addClass( 'wrap' ); 215 text += '<a class="add-new-h2">Add New</a>'; 216 view.$el.html( text ); 211 libraryState._renderTitle = function() { 212 return; 217 213 }; 218 214 // Add the default states. 219 215 this.states.add([ … … 229 225 this.on( 'edit:attachment', this.editAttachment, this ); 230 226 }, 231 227 232 addNewClickHandler: function() { 228 addNewClickHandler: function( event ) { 229 event.preventDefault(); 233 230 this.trigger( 'toggle:upload:attachment' ); 234 231 }, 235 232 … … 693 690 } 694 691 }); 695 692 696 }(jQuery, _, Backbone, wp)); 697 No newline at end of file 693 }(jQuery, _, Backbone, wp));