Ticket #15308: 15308.nicer.patch
File 15308.nicer.patch, 13.6 KB (added by , 14 years ago) |
---|
-
wp-includes/admin-bar.php
121 121 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 122 122 // @todo Replace with some favicon lookup. 123 123 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $default ) ) . '" alt="Blavatar" width="16" height="16" />'; 124 $blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" />';124 $blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 125 125 126 126 $marker = ''; 127 if ( strlen($blog->blogname) > 1 5)127 if ( strlen($blog->blogname) > 18 ) 128 128 $marker = '...'; 129 129 130 130 if ( empty( $blog->blogname ) ) 131 131 $blogname = $blog->domain; 132 132 else 133 $blogname = substr( $blog->blogname, 0, 1 5) . $marker;133 $blogname = substr( $blog->blogname, 0, 18 ) . $marker; 134 134 135 135 if ( ! isset( $blog->visible ) || $blog->visible === true ) { 136 136 $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname, 'href' => get_admin_url($blog->userblog_id), ) ); -
wp-includes/js/admin-bar.dev.js
28 28 while ( t && t != aB && t != d ) { 29 29 if( 'LI' == t.nodeName.toUpperCase() ) { 30 30 ancestors[ ancestors.length ] = t; 31 id = getTOID(t); 31 id = getTOID(t); 32 32 if ( id ) 33 33 clearTimeout( id ); 34 34 t.className = t.className ? ( t.className.replace(hc, '') + ' hover' ) : 'hover'; 35 35 } 36 36 t = t.parentNode; 37 37 } 38 38 39 39 /* remove the hover class for any objects not in the immediate element's ancestry */ 40 40 while ( i-- ) { 41 41 inA = false; … … 44 44 if ( ancestors[ ancestorLength ] == q[i][1] ) 45 45 inA = true; 46 46 } 47 48 /* keep delayed hover on mu (superadmin) menu because it's so easy to mouse away from */ 49 if ( ! inA && -1 == q[i][1].className.indexOf('ab-superadmin') ) 47 48 if ( ! inA ) 50 49 q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : ''; 51 50 } 52 51 }, … … 67 66 68 67 clickShortlink = function(e) { 69 68 var t = e.target || e.srcElement, links, i; 70 71 69 72 70 if ( 'undefined' == typeof adminBarL10n ) 73 71 return; … … 95 93 return false; 96 94 } 97 95 } 98 96 99 97 alert( adminBarL10n.noShortlink ); 100 98 return false; 101 99 } … … 104 102 addEvent(w, 'load', function() { 105 103 var b = d.getElementsByTagName('body')[0], 106 104 s = d.getElementById('adminbar-search'); 107 105 108 106 aB = d.getElementById('wpadminbar'); 109 107 110 108 if ( b && aB ) { … … 132 130 this.value = this.getAttribute('title') == this.value ? '' : this.value; 133 131 } 134 132 } 135 133 136 134 if ( w.location.hash ) 137 135 w.scrollBy(0,-32); 138 136 }); -
wp-includes/css/admin-bar.dev.css
13 13 min-width: 960px; 14 14 } 15 15 16 #wpadminbar a, 17 #wpadminbar a:hover { 18 outline: none; 19 border: none; 20 text-decoration: none; 21 } 22 16 23 #wpadminbar ul, 17 24 #wpadminbar ul li { 18 25 background: none; … … 23 30 z-index: 99999; 24 31 } 25 32 26 #wpadminbar ul li img { 27 vertical-align: middle !important; 28 margin-right: 8px !important; 29 border: none !important; 30 padding: 0 !important; 33 #wpadminbar .quicklinks ul { 34 text-align: left; 31 35 } 32 36 37 #wpadminbar .quicklinks ul li { 38 float: left; 39 } 40 33 41 #wpadminbar .quicklinks > ul > li > a { 34 42 border-right: 1px solid #686868; 35 43 border-left: 1px solid #808080; … … 43 51 border-left-color: #707070; 44 52 } 45 53 46 #wpadminbar a { 47 outline: none; 48 } 49 50 #wpadminbar .avatar { 51 border: 1px solid #999 !important; 52 padding: 0 !important; 53 margin: -3px 5px 0 0 !important; 54 vertical-align: middle; 55 float: none; 56 display: inline !important; 57 } 58 59 #wpadminbar li:hover > ul, 60 #wpadminbar li.hover > ul { 54 #wpadminbar .quicklinks a { 55 color: #ddd; 56 height: 28px; 57 text-shadow: #555 0px -1px 0px; 61 58 display: block; 62 } 63 64 65 #wpadminbar .menupop li:hover > ul, 66 #wpadminbar .menupop li.hover > ul { 67 margin-left: 100%; 68 margin-top: -28px; 69 } 70 71 72 #wpadminbar .menupop ul li a { 73 color: #555 !important; 74 text-shadow: none; 59 font: 13px Arial, Helvetica, sans-serif; 75 60 font-weight: normal; 76 white-space: nowrap; 77 } 78 79 #wpadminbar .menupop a > span { 80 background: url(../images/admin-bar-sprite.png?d=08102010) 100% 100.4% no-repeat; 81 padding-right: .8em; 61 letter-spacing: normal; 62 padding: 0 0.85em; 82 63 line-height: 28px; 83 64 } 84 65 85 #wpadminbar .menupop ul li a > span { 86 display: block; 87 background: url(../images/admin-bar-sprite.png?d=08102010) 100% 97.2% no-repeat; 88 padding-right: 1.5em; 89 line-height: 28px; 90 } 91 92 #wpadminbar ul li a span#ab-awaiting-mod, 93 #wpadminbar ul li a span#ab-updates { 94 display: inline; 95 background: #eee; 96 color: #333; 97 padding: 1px 5px; 98 font-size: 10px; 99 font-family: verdana; 100 -moz-border-radius: 5px; 101 -webkit-border-radius: 5px; 102 border-radius: 5px; 103 text-shadow: none; 104 } 105 106 #wpadminbar ul li a:hover span#ab-awaiting-mod, 107 #wpadminbar ul li a:hover span#ab-updates { 108 background: #fff; 109 color: #000; 110 } 111 112 #wpadminbar .menupop ul { 66 #wpadminbar .quicklinks .menupop ul { 113 67 -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.1); 114 68 -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.1); 69 box-shadow: 0 4px 8px rgba(0,0,0,0.1); 115 70 background: #fff; 71 background: rgba(255,255,255,0.97); 116 72 display: none; 117 73 position: absolute; 118 74 border: 1px solid #dfdfdf; 119 border-top: none !important;75 border-top: none; 120 76 float: none; 121 77 } 122 123 html>body #wpadminbar .menupop ul { 124 background: rgba(255,255,255,0.97); 125 border-color: rgba(0,0,0,0.1); 126 } 127 128 #wpadminbar .menupop li { 78 #wpadminbar .quicklinks .menupop ul li { 129 79 float: none; 130 margin: 0;131 padding: 0;132 background-image: none;133 80 } 134 81 135 #wpadminbar .quicklinks a { 136 border: none; 137 color: #ddd !important; 138 height: 28px; 139 text-shadow: #555 0px -1px 0px; 140 display: block; 141 font: 13px Arial, Helvetica, sans-serif; 82 #wpadminbar .quicklinks .menupop ul li a { 83 color: #555; 84 text-shadow: none; 142 85 font-weight: normal; 143 letter-spacing: normal; 144 padding: 0 0.85em; 145 line-height: 28px; 146 text-decoration: none !important; 147 } 148 149 #wpadminbar .quicklinks li ul li a { 86 white-space: nowrap; 150 87 overflow: hidden; 151 88 width: 160px; 152 89 } 153 90 154 #wpadminbar .quicklinks a:hover { 155 text-shadow: #333 0px -1px 0px; 91 #wpadminbar .quicklinks .menupop ul li:hover > a { 92 color: #fff; 93 text-shadow: #666 0px -1px 0px; 156 94 } 157 95 158 159 #wpadminbar li:hover{160 background: #555 url(../images/admin-bar-sprite.png?d=08102010) 0 -282px repeat-x;96 #wpadminbar .quicklinks li:hover > ul, 97 #wpadminbar .quicklinks li.hover > ul { 98 display: block; 161 99 } 162 100 163 #wpadminbar li li:hover {164 color: #fff !important; 165 background: #888 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x !important;166 text-shadow: #666 0px -1px 0px;101 #wpadminbar .quicklinks .menupop li:hover > ul, 102 #wpadminbar .quicklinks .menupop li.hover > ul { 103 margin-left: 100%; 104 margin-top: -28px; 167 105 } 168 106 169 #wpadminbar li li:hover > a{170 color: #fff !important;107 #wpadminbar .quicklinks li:hover { 108 background: #555 url(../images/admin-bar-sprite.png?d=08102010) 0 -282px repeat-x; 171 109 } 172 110 173 .quicklinks ul { 174 list-style: none; 175 margin: 0; 176 padding: 0; 177 text-align: left; 111 #wpadminbar .quicklinks .menupop li:hover { 112 background: #888 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x; 178 113 } 179 114 180 .quicklinks ul li{181 float: left;182 margin: 0;115 #wpadminbar .quicklinks .menupop a > span { 116 background: url(../images/admin-bar-sprite.png?d=08102010) 100% 100.4% no-repeat; 117 padding-right: .8em; 183 118 } 184 119 185 186 #adminbarsearch { 187 float: right; 188 height: 18px; 189 padding: 3px; 120 #wpadminbar .quicklinks .menupop ul li a > span { 121 display: block; 122 background: url(../images/admin-bar-sprite.png?d=08102010) 100% 97.2% no-repeat; 123 padding-right: 1.5em; 190 124 } 191 125 192 #adminbarsearch * { 193 color: #555; 194 font-size: 12px; 126 #wpadminbar .quicklinks a span#ab-awaiting-mod, 127 #wpadminbar .quicklinks a span#ab-updates { 128 background: #eee; 129 color: #333; 130 text-shadow: none; 131 display: inline; 132 padding: 2px 5px; 133 font-size: 10px; 134 font-weight: bold; 135 -moz-border-radius: 10px; 136 -khtml-border-radius: 10px; 137 -webkit-border-radius: 10px; 138 border-radius: 10px; 195 139 } 196 140 197 #wpadminbar li.ab-me:hover { 198 background: none; 141 #wpadminbar .quicklinks a:hover span#ab-awaiting-mod, 142 #wpadminbar .quicklinks a:hover span#ab-updates { 143 background: #fff; 144 color: #000; 199 145 } 200 146 201 #wpadminbar li.ab-me > a { 202 line-height: 18px !important; 203 border: none !important; 147 #wpadminbar .quicklinks li.ab-me a { 148 border: none; 204 149 background: url(../images/admin-bar-sprite.png?d=08102010) 100% 59.8% no-repeat; 205 height: 28px;206 padding: 0 1.15em 0 0.7em;207 150 } 208 151 209 #wpadminbar li.ab-blog > a:hover{210 b ackground-position: 67% 59.8%;152 #wpadminbar .quicklinks li.ab-my-account a { 153 border-left: none; 211 154 } 212 155 213 #wpadminbar li.ab-me img.avatar { 214 margin: 4px 0 0 0 !important; 215 vertical-align: middle; 216 background: #eee; 217 width: 16px !important; 218 height: 16px !important; 156 #wpadminbar .quicklinks li.ab-me:hover { 157 background: none; 219 158 } 220 159 221 #wpadminbar li.ab-my-account a { 222 border-left: none !important; 223 padding-left: 0.7em !important; 224 margin-top: 0 !important; 160 #wpadminbar .quicklinks li.ab-me a img.avatar { 161 border: 1px solid #999; 162 margin: 5px 2px 0 -4px; 163 background: #eee; 164 width: 16px; 165 height: 16px; 225 166 } 226 167 227 #wpadminbar ul li img{228 width: 16px !important;229 height: 16px !important;168 #wpadminbar .quicklinks .menupop li a img.blavatar { 169 vertical-align: middle; 170 margin-right: 8px; 230 171 } 231 172 232 #wpadminbar #adminbar -search {233 line-height: normal !important;234 width: 140px !important;235 margin-top: 0px !important;173 #wpadminbar #adminbarsearch { 174 float: right; 175 height: 18px; 176 padding: 3px; 236 177 } 237 178 238 .adminbar-input { 239 display: block !important; 240 float: left !important; 241 font: 12px Arial, Helvetica, sans-serif !important; 242 border: 1px solid #626262 !important; 243 padding: 2px 3px !important; 244 margin: 0 3px 0 0 !important; 245 background: #ddd url(../images/admin-bar-sprite.png?d=08102010) top left no-repeat !important; 246 -webkit-border-radius: 0 !important; 247 -khtml-border-radius: 0 !important; 248 -moz-border-radius: 0 !important; 249 border-radius: 0 !important; 179 #wpadminbar #adminbarsearch .adminbar-input { 180 color: #555; 181 width: 140px; 182 display: block; 183 float: left; 184 font: 12px Arial, Helvetica, sans-serif; 185 border: 1px solid #626262; 186 padding: 2px 3px; 187 margin: 0 3px 0 0; 188 background: #ddd url(../images/admin-bar-sprite.png?d=08102010) top left no-repeat; 189 -webkit-border-radius: 0; 190 -khtml-border-radius: 0; 191 -moz-border-radius: 0; 192 border-radius: 0; 250 193 outline: none; 251 194 text-shadow: 0 1px 0 #fff; 252 195 } 253 196 254 button.adminbar-button {197 #wpadminbar #adminbarsearch .adminbar-button { 255 198 position: relative; 256 199 border: 0; 257 200 cursor: pointer; … … 261 204 background: url(../images/admin-bar-sprite.png?d=08102010) right -107px no-repeat; 262 205 padding: 0 14px 0 0; 263 206 text-align: center; 207 outline: none; 264 208 } 265 209 266 button.adminbar-button span {210 #wpadminbar #adminbarsearch .adminbar-button span { 267 211 position: relative; 268 212 display: block; 269 213 white-space: nowrap; 270 214 height: 19px; 271 215 background: url(../images/admin-bar-sprite.png?d=08102010) left -69px no-repeat; 272 216 padding: 3px 0 0 14px; 273 font: 12px Arial, Helvetica, sans-serif !important;274 font-weight: bold !important;275 color: #444 !important;276 text-shadow: 0px 1px 0px #eee !important;217 font: 12px Arial, Helvetica, sans-serif; 218 font-weight: bold; 219 color: #444; 220 text-shadow: 0px 1px 0px #eee; 277 221 } 278 222 279 button.adminbar-button:active {280 background-position: right -184px !important;281 text-shadow: 0px 1px 0px #eee !important;223 #wpadminbar #adminbarsearch .adminbar-button:active { 224 background-position: right -184px; 225 text-shadow: 0px 1px 0px #eee; 282 226 } 283 227 284 button.adminbar-button:hover span {285 color: #000 !important;228 #wpadminbar #adminbarsearch .adminbar-button:hover span { 229 color: #000; 286 230 } 287 231 288 button.adminbar-button:active span {289 background-position: left -146px !important;232 #wpadminbar #adminbarsearch .adminbar-button:active span { 233 background-position: left -146px; 290 234 } 291 235 292 button.adminbar-button::-moz-focus-inner {236 #wpadminbar #adminbarsearch .adminbar-button::-moz-focus-inner { 293 237 border: none; 294 238 } 295 239 296 @media screen and (-webkit-min-device-pixel-ratio: 0) {297 button.adminbar-button span {298 margin-top: -1px;299 }300 240 301 }302 303 304 241 /** 305 242 * IE 6-targeted rules 306 243 */ 307 308 * html #wpadminbar,309 * html #wpadminbar .menupop a span,310 * html #wpadminbar .menupop ul li a:hover,311 * html .quicklinks a:hover,312 * html #wpadminbar .menupop:hover {313 background-image: none !important;314 }315 316 244 * html #wpadminbar { 317 245 overflow: hidden; 318 246 position: absolute; … … 322 250 float: left; 323 251 } 324 252 325 * html #adminbarsearch-wrap { 326 position: absolute; 327 top: 0; 253 * html #wpadminbar, 254 * html #wpadminbar .menupop a span, 255 * html #wpadminbar .quicklinks li, 256 * html #wpadminbar .quicklinks li:hover { 257 background-image: none; 328 258 } 329 330 * html #wpadminbar ul,331 * html #wpadminbar ul li {332 zoom: 1;333 }334 335 /**336 * End IE 6-targeted rules337 */ -
wp-includes/class-wp-admin-bar.php
89 89 90 90 function render() { 91 91 ?> 92 <div id="wpadminbar" class="snap_nopreview no-grav">92 <div id="wpadminbar"> 93 93 <div class="quicklinks"> 94 94 <ul> 95 95 <?php foreach ( (array) $this->menu as $id => $menu_item ) : ?>