<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[29625] trunk/src: Media library: Unify headers between view modes.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/29625">29625</a></dd>
<dt>Author</dt> <dd>helen</dd>
<dt>Date</dt> <dd>2014-08-26 15:57:20 +0000 (Tue, 26 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Media library: Unify headers between view modes.
Includes back compat for `views_upload` links. These look a little awkward, but do not appear to be commonly used. Also prevents the view mode links from being dropped on smaller screens so a user doesn't get "stuck" in the list view.
This is different from other list tables, but aligns well with other uploaded content management screens (themes, plugins).
props pento, helen.
fixes <a href="http://core.trac.wordpress.org/ticket/28946">#28946</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsslisttablescss">trunk/src/wp-admin/css/list-tables.css</a></li>
<li><a href="#trunksrcwpadmincssmediacss">trunk/src/wp-admin/css/media.css</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmedialisttablephp">trunk/src/wp-admin/includes/class-wp-media-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludespostphp">trunk/src/wp-admin/includes/post.php</a></li>
<li><a href="#trunksrcwpadminuploadphp">trunk/src/wp-admin/upload.php</a></li>
<li><a href="#trunksrcwpincludesjsmediagridjs">trunk/src/wp-includes/js/media-grid.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsjs">trunk/src/wp-includes/js/media-views.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsslisttablescss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/list-tables.css (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/list-tables.css 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-admin/css/list-tables.css 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -595,6 +595,11 @@
</span><span class="cx"> padding: 2px 8px 0 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.wp-filter .actions {
+ display: inline-block;
+ vertical-align: middle;
+}
+
</ins><span class="cx"> .tablenav .delete {
</span><span class="cx"> margin-right: 20px;
</span><span class="cx"> }
</span><span class="lines">@@ -617,11 +622,18 @@
</span><span class="cx"> color: #2ea2cc;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.view-switch {
</del><ins>+tablenav .view-switch {
</ins><span class="cx"> float: right;
</span><span class="cx"> margin: 5px 16px 0 8px;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.wp-filter .view-switch {
+ display: inline-block;
+ vertical-align: middle;
+ padding: 14px 0;
+ margin: 0 20px 0 0;
+}
+
</ins><span class="cx"> .view-switch a {
</span><span class="cx"> text-decoration: none;
</span><span class="cx"> }
</span><span class="lines">@@ -681,6 +693,10 @@
</span><span class="cx"> width: 4em;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#posts-filter .wp-filter {
+ margin-bottom: 0;
+}
+
</ins><span class="cx"> #posts-filter fieldset {
</span><span class="cx"> float: left;
</span><span class="cx"> margin: 0 1.5ex 1em 0;
</span><span class="lines">@@ -1437,7 +1453,8 @@
</span><span class="cx"> display: block;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- .tablenav.top .actions, .view-switch {
</del><ins>+ .tablenav.top .actions,
+ .tablenav .view-switch {
</ins><span class="cx"> display: none;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpadmincssmediacss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/media.css (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/media.css 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-admin/css/media.css 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -513,16 +513,6 @@
</span><span class="cx"> border: 4px dashed #bbb;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.media-frame.mode-grid .media-toolbar select {
- margin-top: 1px;
- font-size: inherit;
-}
-
-.media-frame.mode-grid .attachments-browser .bulk-select {
- display: inline-block;
- margin: 0 10px 0 0;
-}
-
</del><span class="cx"> .media-frame.mode-grid .attachments,
</span><span class="cx"> .media-frame.mode-select .attachments {
</span><span class="cx"> padding: 2px;
</span><span class="lines">@@ -530,8 +520,8 @@
</span><span class="cx">
</span><span class="cx"> .media-frame.mode-select .attachments-browser.fixed .attachments {
</span><span class="cx"> position: relative;
</span><del>- top: 80px; /* prevent jumping up when the toolbar becomes fixed */
- padding-bottom: 80px; /* offset for above so the bottom doesn't get cut off */
</del><ins>+ top: 94px; /* prevent jumping up when the toolbar becomes fixed */
+ padding-bottom: 94px; /* offset for above so the bottom doesn't get cut off */
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .media-frame.mode-grid .attachment:focus,
</span><span class="lines">@@ -572,59 +562,28 @@
</span><span class="cx"> opacity: 1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/**
- * Copied styles from the Add theme toolbar.
- *
- * This should be OOCSS'd so both use a shared selector.
- */
-.media-frame.mode-grid .attachments-browser .media-toolbar {
- background: #fff;
- -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
- box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- color: #555;
- display: inline-block;
- font-size: 13px;
- margin: 20px 0;
- padding: 0 20px;
- position: relative;
- width: 100%;
</del><ins>+.media-frame.mode-grid .media-toolbar {
+ margin: 15px 0;
</ins><span class="cx"> height: auto;
</span><del>- border: none;
</del><span class="cx"> }
</span><span class="cx">
</span><del>-.media-frame.mode-select .attachments-browser.fixed .media-toolbar {
- position: fixed;
- top: 32px;
- left: auto;
- right: 20px;
- margin-top: 0;
</del><ins>+.media-frame.mode-grid .media-toolbar select {
+ margin: 0 10px 0 0;
+ font-size: 14px;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.media-frame.mode-grid input[type="search"] {
- margin: 1px;
- padding: 3px 5px;
- position: absolute;
- right: 10px;
- top: 9px;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.5;
- width: 280px;
</del><ins>+.media-frame.mode-grid .media-toolbar-secondary > .media-button {
+ margin-top: 10px;
+ margin-bottom: 10px;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.media-frame.mode-grid .view-switch {
</del><ins>+.media-frame.mode-grid .attachments-browser .bulk-select {
</ins><span class="cx"> display: inline-block;
</span><del>- float: none;
- vertical-align: middle;
- padding: 15px 0;
- margin: 0 20px 0 0;
</del><ins>+ margin: 0 10px 0 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.media-frame.mode-grid select {
- margin: 0 10px 0 0;
</del><ins>+.media-frame.mode-grid .search {
+ margin-top: 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .media-frame.mode-grid .spinner {
</span><span class="lines">@@ -635,6 +594,14 @@
</span><span class="cx"> margin-right: 10px;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.media-frame.mode-select .attachments-browser.fixed .media-toolbar {
+ position: fixed;
+ top: 32px;
+ left: auto;
+ right: 20px;
+ margin-top: 0;
+}
+
</ins><span class="cx"> .media-frame.mode-grid .attachments-browser {
</span><span class="cx"> padding: 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1159,17 +1126,9 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> @media only screen and (max-width: 1120px) {
</span><del>- .media-frame.mode-grid .attachments-browser .media-toolbar-primary,
</del><span class="cx"> .media-frame.mode-grid .attachments-browser .media-toolbar-secondary {
</span><span class="cx"> float: none;
</span><span class="cx"> }
</span><del>-
- .media-frame.mode-grid input[type="search"] {
- margin: 20px 0;
- position: static;
- width: 100%;
- max-width: 280px;
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @media only screen and ( max-width: 782px ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmedialisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-media-list-table.php (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-media-list-table.php 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-admin/includes/class-wp-media-list-table.php 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> * @param array $args An associative array of arguments.
</span><span class="cx"> */
</span><span class="cx"> public function __construct( $args = array() ) {
</span><del>- $this->detached = isset( $_REQUEST['detached'] );
</del><ins>+ $this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] );
</ins><span class="cx">
</span><span class="cx"> parent::__construct( array(
</span><span class="cx"> 'plural' => 'media',
</span><span class="lines">@@ -60,23 +60,24 @@
</span><span class="cx"> foreach ( $reals as $real )
</span><span class="cx"> $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
</span><span class="cx">
</span><del>- $class = ( empty($_GET['post_mime_type']) && !$this->detached && !isset($_GET['status']) ) ? ' class="current"' : '';
- $type_links['all'] = "<a href='upload.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</a>';
</del><ins>+ $selected = empty( $_GET['attachment-filter'] ) ? ' selected="selected"' : '';
+ $type_links['all'] = "<option value=''$selected>" . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</option>';
</ins><span class="cx"> foreach ( $post_mime_types as $mime_type => $label ) {
</span><span class="cx"> $class = '';
</span><span class="cx">
</span><span class="cx"> if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
- $class = ' class="current"';
</del><ins>+ $selected = '';
+ if ( !empty( $_GET['attachment-filter'] ) && strpos( $_GET['attachment-filter'], 'post_mime_type:' ) === 0 && wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $_GET['attachment-filter'] ) ) )
+ $selected = ' selected="selected"';
</ins><span class="cx"> if ( !empty( $num_posts[$mime_type] ) )
</span><del>- $type_links[$mime_type] = '<a href="upload.php?post_mime_type=' . urlencode( $mime_type ) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
</del><ins>+ $type_links[$mime_type] = '<option value="post_mime_type:' . urlencode( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
</ins><span class="cx"> }
</span><del>- $type_links['detached'] = '<a href="upload.php?detached=1"' . ( $this->detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
</del><ins>+ $type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
</ins><span class="cx">
</span><span class="cx"> if ( !empty($_num_posts['trash']) )
</span><del>- $type_links['trash'] = '<a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
</del><ins>+ $type_links['trash'] = '<option value="trash"' . ( (isset($_GET['attachment-filter']) && $_GET['attachment-filter'] == 'trash' ) ? ' selected="selected"' : '') . '>' . sprintf( _nx( 'Trash (%s)', 'Trash (%s)', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</option>';
</ins><span class="cx">
</span><span class="cx"> return $type_links;
</span><span class="cx"> }
</span><span class="lines">@@ -91,10 +92,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> protected function extra_tablenav( $which ) {
</span><ins>+ if ( 'bar' !== $which ) {
+ return;
+ }
</ins><span class="cx"> ?>
</span><del>- <div class="alignleft actions">
</del><ins>+ <div class="actions">
</ins><span class="cx"> <?php
</span><del>- if ( 'top' == $which && !is_singular() && !$this->detached && !$this->is_trash ) {
</del><ins>+ if ( ! is_singular() && ! $this->is_trash ) {
</ins><span class="cx"> $this->months_dropdown( 'attachment' );
</span><span class="cx">
</span><span class="cx"> /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
</span><span class="lines">@@ -131,8 +135,6 @@
</span><span class="cx"> global $mode;
</span><span class="cx">
</span><span class="cx"> parent::pagination( $which );
</span><del>-
- $this->view_switcher( $mode );
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -167,6 +169,50 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ /**
+ * Override parent views so we can use the filter bar display.
+ */
+ public function views() {
+ global $mode;
+
+ $views = $this->get_views();
+?>
+<div class="wp-filter">
+ <?php $this->view_switcher( $mode ); ?>
+
+ <select class="attachment-filters" name="attachment-filter">
+ <?php
+ if ( ! empty( $views ) ) {
+ foreach ( $views as $class => $view ) {
+ echo "\t$view\n";
+ }
+ }
+ ?>
+ </select>
+
+<?php
+ $this->extra_tablenav( 'bar' );
+
+ /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */
+ $views = apply_filters( "views_{$this->screen->id}", '' );
+
+ // Back compat for pre-4.0 view links.
+ if ( ! empty( $views ) ) {
+ echo '<ul class="filter-links">';
+ foreach ( $views as $class => $view ) {
+ echo "<li class='$class'>$view</li>";
+ }
+ echo '</ul>';
+ }
+?>
+
+ <div class="search-form">
+ <label for="media-search-input" class="screen-reader-text"><?php esc_html_e( 'Search Media' ); ?></label>
+ <input type="search" placeholder="Search" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>
+ </div>
+ <?php
+ }
+
</ins><span class="cx"> public function get_columns() {
</span><span class="cx"> $posts_columns = array();
</span><span class="cx"> $posts_columns['cb'] = '<input type="checkbox" />';
</span></span></pre></div>
<a id="trunksrcwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/post.php (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/post.php 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-admin/includes/post.php 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -1032,6 +1032,8 @@
</span><span class="cx"> $states .= ',private';
</span><span class="cx">
</span><span class="cx"> $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
</span><ins>+ $q['post_status'] = isset( $q['attachment-filter'] ) && 'trash' == $q['attachment-filter'] ? 'trash' : $states;
+
</ins><span class="cx"> $media_per_page = (int) get_user_option( 'upload_per_page' );
</span><span class="cx"> if ( empty( $media_per_page ) || $media_per_page < 1 )
</span><span class="cx"> $media_per_page = 20;
</span><span class="lines">@@ -1051,8 +1053,16 @@
</span><span class="cx"> if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) )
</span><span class="cx"> unset($q['post_mime_type']);
</span><span class="cx">
</span><del>- if ( isset($q['detached']) )
</del><ins>+ foreach( array_keys( $post_mime_types ) as $type ) {
+ if ( isset( $q['attachment-filter'] ) && "post_mime_type:$type" == $q['attachment-filter'] ) {
+ $q['post_mime_type'] = $type;
+ break;
+ }
+ }
+
+ if ( isset( $q['detached'] ) || ( isset( $q['attachment-filter'] ) && 'detached' == $q['attachment-filter'] ) ) {
</ins><span class="cx"> $q['post_parent'] = 0;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> wp( $q );
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/upload.php (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/upload.php 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-admin/upload.php 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -265,11 +265,9 @@
</span><span class="cx"> <div id="message" class="updated"><p><?php echo $message; ?></p></div>
</span><span class="cx"> <?php } ?>
</span><span class="cx">
</span><del>-<?php $wp_list_table->views(); ?>
-
</del><span class="cx"> <form id="posts-filter" action="" method="get">
</span><span class="cx">
</span><del>-<?php $wp_list_table->search_box( __( 'Search Media' ), 'media' ); ?>
</del><ins>+<?php $wp_list_table->views(); ?>
</ins><span class="cx">
</span><span class="cx"> <?php $wp_list_table->display(); ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediagridjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/media-grid.js (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/media-grid.js 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-includes/js/media-grid.js 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -179,7 +179,8 @@
</span><span class="cx"> $browser = this.$('.attachments-browser');
</span><span class="cx"> $toolbar = $browser.find('.media-toolbar');
</span><span class="cx">
</span><del>- if ( $browser.offset().top < this.$window.scrollTop() + this.$adminBar.height() ) {
</del><ins>+ // Offset doesn't appear to take top margin into account, hence +16
+ if ( ( $browser.offset().top + 16 ) < this.$window.scrollTop() + this.$adminBar.height() ) {
</ins><span class="cx"> $browser.addClass( 'fixed' );
</span><span class="cx"> $toolbar.css('width', $browser.width() + 'px');
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/media-views.js (29624 => 29625)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/media-views.js 2014-08-26 13:45:23 UTC (rev 29624)
+++ trunk/src/wp-includes/js/media-views.js 2014-08-26 15:57:20 UTC (rev 29625)
</span><span class="lines">@@ -3911,7 +3911,7 @@
</span><span class="cx"> */
</span><span class="cx"> media.view.Toolbar = media.View.extend({
</span><span class="cx"> tagName: 'div',
</span><del>- className: 'media-toolbar',
</del><ins>+ className: 'media-toolbar wp-filter',
</ins><span class="cx">
</span><span class="cx"> initialize: function() {
</span><span class="cx"> var state = this.controller.state(),
</span><span class="lines">@@ -3923,7 +3923,7 @@
</span><span class="cx"> // The toolbar is composed of two `PriorityList` views.
</span><span class="cx"> this.primary = new media.view.PriorityList();
</span><span class="cx"> this.secondary = new media.view.PriorityList();
</span><del>- this.primary.$el.addClass('media-toolbar-primary');
</del><ins>+ this.primary.$el.addClass('media-toolbar-primary search-form');
</ins><span class="cx"> this.secondary.$el.addClass('media-toolbar-secondary');
</span><span class="cx">
</span><span class="cx"> this.views.set([ this.secondary, this.primary ]);
</span></span></pre>
</div>
</div>
</body>
</html>