From 4ccea9a8f67c569e518057e04fcf4edb98bb4ca6 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 26 Nov 2013 22:18:14 +0000 Subject: [PATCH] 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 --- src/wp-admin/css/wp-admin.css | 16 ++++++++++++++-- src/wp-admin/js/common.js | 26 -------------------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/wp-admin/css/wp-admin.css b/src/wp-admin/css/wp-admin.css index da59988c26..22abda540e 100644 --- a/src/wp-admin/css/wp-admin.css +++ b/src/wp-admin/css/wp-admin.css @@ -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; } diff --git a/src/wp-admin/js/common.js b/src/wp-admin/js/common.js index 76e8d62a1d..a875b82bed 100644 --- a/src/wp-admin/js/common.js +++ b/src/wp-admin/js/common.js @@ -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(); - } - } } };