Ticket #28850: 28850.1.patch
File 28850.1.patch, 7.2 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
2572 2572 /** 2573 2573 * Media Grid 2574 2574 */ 2575 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; 2575 .media-grid-view, 2576 .media-grid-view .media-frame-content, 2577 .media-grid-view .attachments-browser .attachments, 2578 .media-grid-view .uploader-inline-content { 2579 position: static; 2583 2580 } 2584 2581 2585 .media-grid-view .view-switch { 2586 display: inline-block; 2587 float: none; 2588 margin-top: 13px; 2589 vertical-align: middle;2582 /* Regions we don't use at all */ 2583 .media-grid-view .media-frame-title, 2584 .media-grid-view .media-frame-toolbar, 2585 .media-grid-view .media-frame-menu { 2586 display: none; 2590 2587 } 2591 2588 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; 2589 .media-grid-view .media-frame-content { 2590 background-color: transparent; 2591 border: none; 2605 2592 } 2606 2593 2607 .media-grid-view-options { 2608 top: 120px; 2594 .media-grid-view .uploader-inline { 2595 position: relative; 2596 top: auto; 2597 right: auto; 2598 left: auto; 2599 bottom: auto; 2600 padding-top: 0; 2601 margin-top: 0; 2609 2602 } 2610 2603 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 2604 /** 2633 2605 * Copied styles from the Add theme toolbar. 2634 2606 * … … 2644 2616 color: #555; 2645 2617 display: inline-block; 2646 2618 font-size: 13px; 2619 margin: 20px 0 30px; 2647 2620 padding: 0 20px; 2648 2621 position: relative; 2649 2622 width: 100%; 2623 height: auto; 2624 border: none; 2650 2625 } 2651 2626 2627 .media-grid-view input[type="search"] { 2628 margin: 1px; 2629 padding: 3px 5px; 2630 position: absolute; 2631 right: 10px; 2632 top: 9px; 2633 font-size: 16px; 2634 font-weight: 300; 2635 line-height: 1.5; 2636 width: 280px; 2637 } 2638 2639 .media-grid-view .view-switch { 2640 display: inline-block; 2641 float: none; 2642 vertical-align: middle; 2643 padding: 15px 0; 2644 margin: 0 20px 0 0; 2645 } 2646 2647 .media-grid-view select.attachment-filters { 2648 padding: 15px 0; 2649 margin: 0 10px 0 0; 2650 } 2651 2652 .media-grid-view .spinner { 2653 margin-top: 15px; 2654 } 2655 2656 .media-grid-view .attachments-browser { 2657 padding: 0; 2658 } 2659 2652 2660 /** 2653 2661 * The left and right buttons are copied from the expanded theme details modal. 2654 2662 * … … 2849 2857 margin-top: 3px; 2850 2858 } 2851 2859 2852 .media-grid-view.hide-router .media-frame-title { 2853 -webkit-box-shadow: none; 2854 box-shadow: none; 2860 @media only screen and (max-width: 1120px) { 2861 .media-grid-view .media-toolbar-primary, 2862 .media-grid-view .media-toolbar-secondary { 2863 float: none; 2855 2864 } 2856 2865 2857 .media-grid-view .media-frame-content { 2858 background-color: transparent; 2859 bottom: 40px; 2866 .media-grid-view input[type="search"] { 2867 margin: 20px 0; 2868 position: static; 2869 width: 100%; 2870 max-width: none; 2860 2871 } 2861 @media screen and (max-width: 782px) {2862 .media-grid-view .media-frame-content {2863 border-bottom: none;2864 bottom: 0;2865 2872 } 2866 }2867 2873 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; 2874 @media only screen and (max-width: 960px) { 2875 .media-grid-view .media-frame-content .media-toolbar-primary .search { 2876 max-width: none; 2876 2877 } 2877 2878 } -
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));