Ticket #26952: 26952.3.patch
File 26952.3.patch, 7.6 KB (added by , 11 years ago) |
---|
-
src/wp-admin/css/media.css
233 233 ------------------------------------------------------------------------------*/ 234 234 235 235 .find-box { 236 background-color: #fff; 236 237 width: 600px; 237 height: 300px;238 238 overflow: hidden; 239 padding: 33px 0 51px; 240 position: absolute; 241 z-index: 1000; 242 background-color: #444; 239 margin-left: -300px; 240 position: fixed; 241 top: 30px; 242 left: 50%; 243 z-index: 160000; 243 244 } 244 245 245 246 .find-box-head { 246 247 cursor: move; 247 color: #eee; 248 background: #fcfcfc; 249 border-bottom: 1px solid #dfdfdf; 250 height: 40px; 251 font-size: 22px; 248 252 font-weight: 600; 249 height: 2em; 250 line-height: 2em; 251 padding: 1px 12px; 252 position: absolute; 253 top: 5px; 254 width: 100%; 253 line-height: 40px; 254 padding: 0 40px 0 16px; 255 255 } 256 256 257 257 .find-box-inside { 258 258 overflow: auto; 259 padding: 6px; 260 height: 100%; 259 padding: 16px; 261 260 background-color: #fff; 261 max-height: 300px; 262 overflow-y: scroll; 262 263 } 263 264 264 .find-box-search, 265 .find-box-buttons { 266 overflow: hidden; 267 padding: 8px; 268 position: relative; 269 background-color: #f7f7f7; 270 border-top: 1px solid #dfdfdf; 265 .find-box-search { 266 padding-bottom: 16px; 271 267 } 272 268 273 269 .find-box-search .spinner { … … 277 273 top: 9px; 278 274 } 279 275 280 #find-posts-input { 276 #find-posts-input, 277 #find-posts-search { 281 278 float: left; 279 } 280 281 #find-posts-input { 282 282 width: 140px; 283 height: 24px; 283 height: 28px; 284 margin: 0 4px 0 0; 284 285 } 285 286 286 #find-posts-search { 287 float: left; 288 margin: 1px 4px 0 3px; 287 .found-radio { 288 width: 16px; 289 289 } 290 290 291 #find-posts-response { 292 margin: 8px 0; 293 padding: 0 1px 6px; 291 #find-posts-close { 292 width: 40px; 293 height: 40px; 294 position: absolute; 295 top: 0; 296 right: 0; 297 cursor: pointer; 298 text-align: center; 299 color: #666; 294 300 } 295 301 296 #find-posts- response table{297 width: 100%;302 #find-posts-close:hover { 303 color: #2ea2cc; 298 304 } 299 305 300 #find-posts-response .found-radio { 301 padding: 3px 0 0 8px; 302 width: 15px; 306 #find-posts-close:before { 307 font: normal 20px/40px 'dashicons'; 308 vertical-align: top; 309 speak: none; 310 -webkit-font-smoothing: antialiased; 311 -moz-osx-font-smoothing: grayscale; 312 content: '\f158'; 313 } 314 315 .find-box-buttons { 316 padding: 6px 16px; 317 background: #fcfcfc; 318 border-top: 1px solid #dfdfdf; 303 319 } 304 320 305 321 .find-box #resize-se { … … 309 325 } 310 326 311 327 .ui-find-overlay { 312 position: absolute;328 position: fixed; 313 329 top: 0; 314 330 left: 0; 315 background-color: #000; 316 opacity: 0.6; 317 filter: alpha(opacity=60); 331 right: 0; 332 bottom: 0; 333 background: #000; 334 opacity: 0.7; 335 z-index: 159900; 318 336 } 319 337 320 338 ul#dismissed-updates { -
src/wp-admin/includes/ajax-actions.php
1431 1431 wp_die( __('No items found.') ); 1432 1432 1433 1433 $html = '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>'.__('Title').'</th><th class="no-break">'.__('Type').'</th><th class="no-break">'.__('Date').'</th><th class="no-break">'.__('Status').'</th></tr></thead><tbody>'; 1434 $alt = ''; 1434 1435 foreach ( $posts as $post ) { 1435 1436 $title = trim( $post->post_title ) ? $post->post_title : __( '(no title)' ); 1437 $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; 1436 1438 1437 1439 switch ( $post->post_status ) { 1438 1440 case 'publish' : … … 1457 1459 $time = mysql2date(__('Y/m/d'), $post->post_date); 1458 1460 } 1459 1461 1460 $html .= '<tr class=" found-posts"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . esc_attr($post->ID) . '"></td>';1462 $html .= '<tr class="' . trim( 'found-posts ' . $alt ) . '"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . esc_attr($post->ID) . '"></td>'; 1461 1463 $html .= '<td><label for="found-'.$post->ID.'">' . esc_html( $title ) . '</label></td><td class="no-break">' . esc_html( $post_types[$post->post_type]->labels->singular_name ) . '</td><td class="no-break">'.esc_html( $time ) . '</td><td class="no-break">' . esc_html( $stat ). ' </td></tr>' . "\n\n"; 1462 1464 } 1463 1465 -
src/wp-admin/includes/template.php
1376 1376 */ 1377 1377 function find_posts_div($found_action = '') { 1378 1378 ?> 1379 <div id="find-posts" class="find-box" style="display:none;"> 1380 <div id="find-posts-head" class="find-box-head"><?php _e('Find Posts or Pages'); ?></div> 1379 <div id="find-posts" class="find-box" style="display: none;"> 1380 <div id="find-posts-head" class="find-box-head"> 1381 <?php _e( 'Find Posts or Pages' ); ?> 1382 <div id="find-posts-close"></div> 1383 </div> 1381 1384 <div class="find-box-inside"> 1382 1385 <div class="find-box-search"> 1383 1386 <?php if ( $found_action ) { ?> 1384 1387 <input type="hidden" name="found_action" value="<?php echo esc_attr($found_action); ?>" /> 1385 1388 <?php } ?> 1386 1387 1389 <input type="hidden" name="affected" id="affected" value="" /> 1388 1390 <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?> 1389 1391 <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label> 1390 1392 <input type="text" id="find-posts-input" name="ps" value="" /> 1391 1393 <span class="spinner"></span> 1392 1394 <input type="button" id="find-posts-search" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /> 1395 <div class="clear"></div> 1393 1396 </div> 1394 1397 <div id="find-posts-response"></div> 1395 1398 </div> 1396 1399 <div class="find-box-buttons"> 1397 <input id="find-posts-close" type="button" class="button alignleft" value="<?php esc_attr_e('Close'); ?>" />1398 1400 <?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?> 1401 <div class="clear"></div> 1399 1402 </div> 1400 1403 </div> 1401 1404 <?php -
src/wp-admin/js/media.js
19 19 } 20 20 $('#find-posts').show().draggable({ 21 21 handle: '#find-posts-head' 22 }).css({'top':st + 50 + 'px','left':'50%','marginLeft':'-328px'}); 22 }); 23 24 $('.find-box-inside').css({ 25 'max-height': $( window ).height() - ( ( 30 + 40 + 1 + 16 ) * 2 ) + 'px' 26 }); 23 27 24 28 $('#find-posts-input').focus().keyup(function(e){ 25 29 if (e.which == 27) { findPosts.close(); } // close on Escape … … 38 42 }, 39 43 40 44 overlay : function() { 41 $( '.ui-find-overlay' ).css( 42 { 'z-index': '999', 'width': $( document ).width() + 'px', 'height': $( document ).height() + 'px' } 43 ).on('click', function () { 45 $( '.ui-find-overlay' ).on( 'click', function () { 44 46 findPosts.close(); 45 47 }); 46 48 }, … … 120 122 }); 121 123 }); 122 124 $(window).resize(function() { 123 findPosts.overlay(); 125 $('.find-box-inside').css({ 126 'max-height': $( window ).height() - ( ( 30 + 40 + 1 + 16 ) * 2 ) + 'px' 127 }); 124 128 }); 125 129 })(jQuery); -
src/wp-admin/upload.php
145 145 wp_enqueue_script( 'jquery-ui-draggable' ); 146 146 wp_enqueue_script( 'media' ); 147 147 148 add_action( 'admin_print_footer_scripts', 'find_posts_div' ); 149 148 150 add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) ); 149 151 150 152 get_current_screen()->add_help_tab( array( … … 238 240 239 241 <?php $wp_list_table->display(); ?> 240 242 241 <div id="ajax-response"></div>242 <?php find_posts_div(); ?>243 <br class="clear" />244 245 243 </form> 246 244 </div> 247 245 246 <div id="ajax-response"></div> 247 248 248 <?php 249 249 include( ABSPATH . 'wp-admin/admin-footer.php' );