Ticket #28946: 28946.diff
| File 28946.diff, 7.2 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/css/list-tables.css
595 595 padding: 2px 8px 0 0; 596 596 } 597 597 598 .wp-filter .actions { 599 display: inline-block; 600 vertical-align: middle; 601 } 602 598 603 .tablenav .delete { 599 604 margin-right: 20px; 600 605 } … … 617 622 color: #2ea2cc; 618 623 } 619 624 620 .view-switch {625 tablenav .view-switch { 621 626 float: right; 622 627 margin: 5px 16px 0 8px; 623 628 } 624 629 630 .wp-filter .view-switch { 631 display: inline-block; 632 vertical-align: middle; 633 padding: 14px 0; 634 margin: 0 20px 0 0; 635 } 636 625 637 .view-switch a { 626 638 text-decoration: none; 627 639 } … … 1437 1449 display: block; 1438 1450 } 1439 1451 1440 .tablenav.top .actions, .view-switch { 1452 .tablenav.top .actions, 1453 .tablenav .view-switch { 1441 1454 display: none; 1442 1455 } 1443 1456 -
src/wp-admin/css/media.css
507 507 border: 4px dashed #bbb; 508 508 } 509 509 510 .media-frame.mode-grid .media-toolbar select {511 margin-top: 1px;512 font-size: inherit;513 }514 515 .media-frame.mode-grid .attachments-browser .bulk-select {516 display: inline-block;517 margin: 0 10px 0 0;518 }519 520 510 .media-frame.mode-grid .attachments, 521 511 .media-frame.mode-select .attachments { 522 512 padding: 2px; … … 524 514 525 515 .media-frame.mode-select .attachments-browser.fixed .attachments { 526 516 position: relative; 527 top: 80px; /* prevent jumping up when the toolbar becomes fixed */528 padding-bottom: 80px; /* offset for above so the bottom doesn't get cut off */517 top: 97px; /* prevent jumping up when the toolbar becomes fixed */ 518 padding-bottom: 97px; /* offset for above so the bottom doesn't get cut off */ 529 519 } 530 520 531 521 .media-frame.mode-grid .attachment:focus, … … 571 561 * 572 562 * This should be OOCSS'd so both use a shared selector. 573 563 */ 574 .media-frame.mode-grid .attachments-browser .media-toolbar { 575 background: #fff; 576 -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 577 box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 578 -webkit-box-sizing: border-box; 579 -moz-box-sizing: border-box; 580 box-sizing: border-box; 581 color: #555; 582 display: inline-block; 583 font-size: 13px; 584 margin: 20px 0; 585 padding: 0 20px; 586 position: relative; 587 width: 100%; 564 565 .media-frame.mode-grid .media-toolbar { 566 margin: 20px 0 16px; 588 567 height: auto; 589 border: none;590 568 } 591 569 592 .media-frame.mode-select .attachments-browser.fixed .media-toolbar { 593 position: fixed; 594 top: 32px; 595 left: auto; 596 right: 20px; 597 margin-top: 0; 570 .media-frame.mode-grid .media-toolbar select { 571 margin: 0 10px 0 0; 572 font-size: inherit; 598 573 } 599 574 600 .media-frame.mode-grid input[type="search"] { 601 margin: 1px; 602 padding: 3px 5px; 603 position: absolute; 604 right: 10px; 605 top: 9px; 606 font-size: 16px; 607 font-weight: 300; 608 line-height: 1.5; 609 width: 280px; 575 .media-frame.mode-grid .media-toolbar-secondary > .media-button { 576 margin-top: 10px; 577 margin-bottom: 10px; 610 578 } 611 579 612 .media-frame.mode-grid . view-switch{580 .media-frame.mode-grid .attachments-browser .bulk-select { 613 581 display: inline-block; 614 float: none; 615 vertical-align: middle; 616 padding: 15px 0; 617 margin: 0 20px 0 0; 582 margin: 0 10px 0 0; 618 583 } 619 584 620 .media-frame.mode-grid select{621 margin : 0 10px 00;585 .media-frame.mode-grid .search { 586 margin-top: 0; 622 587 } 623 588 624 589 .media-frame.mode-grid .spinner { … … 629 594 margin-right: 10px; 630 595 } 631 596 597 .media-frame.mode-select .attachments-browser.fixed .media-toolbar { 598 position: fixed; 599 top: 32px; 600 left: auto; 601 right: 20px; 602 margin-top: 0; 603 } 604 632 605 .media-frame.mode-grid .attachments-browser { 633 606 padding: 0; 634 607 } … … 1152 1125 */ 1153 1126 1154 1127 @media only screen and (max-width: 1120px) { 1155 .media-frame.mode-grid .attachments-browser .media-toolbar-primary,1156 1128 .media-frame.mode-grid .attachments-browser .media-toolbar-secondary { 1157 1129 float: none; 1158 1130 } 1159 1160 .media-frame.mode-grid input[type="search"] {1161 margin: 20px 0;1162 position: static;1163 width: 100%;1164 max-width: 280px;1165 }1166 1131 } 1167 1132 1168 1133 @media only screen and ( max-width: 782px ) { -
src/wp-admin/includes/class-wp-media-list-table.php
91 91 } 92 92 93 93 protected function extra_tablenav( $which ) { 94 if ( 'bar' !== $which ) { 95 return; 96 } 94 97 ?> 95 <div class="a lignleft actions">98 <div class="actions"> 96 99 <?php 97 if ( 'top' == $which && !is_singular() && !$this->detached && !$this->is_trash ) {100 if ( ! is_singular() && ! $this->detached && ! $this->is_trash ) { 98 101 $this->months_dropdown( 'attachment' ); 99 102 100 103 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ … … 131 134 global $mode; 132 135 133 136 parent::pagination( $which ); 134 135 $this->view_switcher( $mode );136 137 } 137 138 138 139 /** … … 167 168 <?php 168 169 } 169 170 171 /** 172 * Override parent views so we can use the filter bar display. 173 */ 174 public function views() { 175 global $mode; 176 177 $views = $this->get_views(); 178 179 /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ 180 $views = apply_filters( "views_{$this->screen->id}", $views ); 181 ?> 182 <div class="wp-filter"> 183 <?php $this->view_switcher( $mode ); ?> 184 185 <ul class="filter-links"> 186 <?php 187 if ( ! empty( $views ) ) { 188 foreach ( $views as $class => $view ) { 189 $views[ $class ] = "\t<li class='$class'>$view"; 190 } 191 echo implode( " </li>\n", $views ) . "</li>\n"; 192 } 193 ?> 194 </ul> 195 196 <?php $this->extra_tablenav( 'bar' ); ?> 197 </div> 198 <?php 199 } 200 170 201 public function get_columns() { 171 202 $posts_columns = array(); 172 203 $posts_columns['cb'] = '<input type="checkbox" />'; -
src/wp-includes/js/media-grid.js
179 179 $browser = this.$('.attachments-browser'); 180 180 $toolbar = $browser.find('.media-toolbar'); 181 181 182 if ( $browser.offset().top < this.$window.scrollTop() + this.$adminBar.height() ) { 182 // Offset doesn't appear to take top margin into account, hence +20 183 if ( ( $browser.offset().top + 20 ) < this.$window.scrollTop() + this.$adminBar.height() ) { 183 184 $browser.addClass( 'fixed' ); 184 185 $toolbar.css('width', $browser.width() + 'px'); 185 186 } else { -
src/wp-includes/js/media-views.js
3937 3937 */ 3938 3938 media.view.Toolbar = media.View.extend({ 3939 3939 tagName: 'div', 3940 className: 'media-toolbar ',3940 className: 'media-toolbar wp-filter', 3941 3941 3942 3942 initialize: function() { 3943 3943 var state = this.controller.state(), … … 3949 3949 // The toolbar is composed of two `PriorityList` views. 3950 3950 this.primary = new media.view.PriorityList(); 3951 3951 this.secondary = new media.view.PriorityList(); 3952 this.primary.$el.addClass('media-toolbar-primary ');3952 this.primary.$el.addClass('media-toolbar-primary search-form'); 3953 3953 this.secondary.$el.addClass('media-toolbar-secondary'); 3954 3954 3955 3955 this.views.set([ this.secondary, this.primary ]);