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

git-svn-id: https://develop.svn.wordpress.org/trunk@26421 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2013-11-26 22:18:14 +00:00
parent eb4dccce32
commit 4ccea9a8f6
2 changed files with 14 additions and 28 deletions

View File

@ -11396,10 +11396,17 @@ li#wp-admin-bar-menu-toggle {
display: block;
}
#wpbody-content {
padding-bottom: 100px;
}
p.search-box {
float: none;
clear: both;
margin-top: 35px;
position: absolute;
bottom: 0;
width: 98%;
height: 90px;
margin-bottom: 20px;
}
p.search-box input[name="s"] {
@ -11407,9 +11414,14 @@ li#wp-admin-bar-menu-toggle {
float: none;
width: 100%;
margin-bottom: 10px;
vertical-align: middle;
-webkit-appearance: none;
}
p.search-box input[type="submit"] {
margin-bottom: 10px;
}
.tablenav.top .actions, .view-switch {
display: none;
}

View File

@ -564,14 +564,12 @@ $(document).ready( function() {
$adminmenu.data( 'wp-responsive', 1 );
this.disableSortables();
this.movePostSearch();
},
deactivate: function() {
window.stickyMenu.enable();
$adminmenu.removeData('wp-responsive');
this.enableSortables();
this.restorePostSearch();
},
trigger: function() {
@ -631,30 +629,6 @@ $(document).ready( function() {
$sortables.sortable('enable');
} catch(e) {}
}
},
movePostSearch: function() {
this.searchBox = $( 'p.search-box' );
if ( this.searchBox.length ) {
this.searchBox.hide();
if ( this.searchBoxClone === undefined ) {
this.searchBoxClone = this.searchBox.first().clone().insertAfter( 'div.tablenav.bottom' );
}
this.searchBoxClone.show();
}
},
restorePostSearch: function() {
if ( this.searchBox !== undefined ) {
this.searchBox.show();
if ( this.searchBoxClone !== undefined ) {
this.searchBoxClone.hide();
}
}
}
};