Make WordPress Core

Changeset 26421


Ignore:
Timestamp:
11/26/2013 10:18:14 PM (11 years ago)
Author:
azaozz
Message:

Remove cloning of the search box with JS and move it to the bottom of the screen with CSS instead, see #26086

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/wp-admin.css

    r26420 r26421  
    1139711397    }
    1139811398
     11399    #wpbody-content {
     11400        padding-bottom: 100px;
     11401    }
     11402
    1139911403    p.search-box {
    1140011404        float: none;
    11401         clear: both;
    11402         margin-top: 35px;
     11405        position: absolute;
     11406        bottom: 0;
     11407        width: 98%;
     11408        height: 90px;
     11409        margin-bottom: 20px;
    1140311410    }
    1140411411
     
    1140811415        width: 100%;
    1140911416        margin-bottom: 10px;
     11417        vertical-align: middle;
    1141011418        -webkit-appearance: none;
     11419    }
     11420
     11421    p.search-box input[type="submit"] {
     11422        margin-bottom: 10px;
    1141111423    }
    1141211424
  • trunk/src/wp-admin/js/common.js

    r26402 r26421  
    565565            $adminmenu.data( 'wp-responsive', 1 );
    566566            this.disableSortables();
    567             this.movePostSearch();
    568567        },
    569568
     
    572571            $adminmenu.removeData('wp-responsive');
    573572            this.enableSortables();
    574             this.restorePostSearch();
    575573        },
    576574
     
    632630                } catch(e) {}
    633631            }
    634         },
    635 
    636         movePostSearch: function() {
    637             this.searchBox = $( 'p.search-box' );
    638 
    639             if ( this.searchBox.length ) {
    640                 this.searchBox.hide();
    641 
    642                 if ( this.searchBoxClone === undefined ) {
    643                     this.searchBoxClone = this.searchBox.first().clone().insertAfter( 'div.tablenav.bottom' );
    644                 }
    645 
    646                 this.searchBoxClone.show();
    647             }
    648         },
    649 
    650         restorePostSearch: function() {
    651             if ( this.searchBox !== undefined ) {
    652                 this.searchBox.show();
    653 
    654                 if ( this.searchBoxClone !== undefined ) {
    655                     this.searchBoxClone.hide();
    656                 }
    657             }
    658632        }
    659633    };
Note: See TracChangeset for help on using the changeset viewer.