Changeset 27401
- Timestamp:
- 03/04/2014 11:10:35 PM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/media.css
r27328 r27401 234 234 235 235 .find-box { 236 background-color: #fff; 236 237 width: 600px; 237 height: 300px;238 max-width: 100%; 238 239 overflow: hidden; 239 padding: 33px 0 51px; 240 position: absolute; 241 z-index: 1000; 242 background-color: #444; 240 margin-left: -300px; 241 position: fixed; 242 top: 30px; 243 left: 50%; 244 z-index: 160000; 243 245 } 244 246 245 247 .find-box-head { 246 248 cursor: move; 247 color: #eee; 249 background: #fcfcfc; 250 border-bottom: 1px solid #dfdfdf; 251 height: 40px; 252 font-size: 22px; 248 253 font-weight: 600; 249 height: 2em; 250 line-height: 2em; 251 padding: 1px 12px; 252 position: absolute; 253 top: 5px; 254 width: 100%; 254 line-height: 40px; 255 padding: 0 40px 0 16px; 256 overflow: hidden; 255 257 } 256 258 257 259 .find-box-inside { 258 260 overflow: auto; 259 padding: 6px; 260 height: 100%; 261 padding: 16px; 261 262 background-color: #fff; 262 } 263 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; 263 max-height: 300px; 264 overflow-y: scroll; 265 } 266 267 .find-box-search { 268 padding-bottom: 16px; 271 269 } 272 270 … … 278 276 } 279 277 280 #find-posts-input { 281 float: left; 282 width: 140px; 283 height: 24px; 284 } 285 278 #find-posts-input, 286 279 #find-posts-search { 287 280 float: left; 288 margin: 1px 4px 0 3px; 289 } 290 291 #find-posts-response { 292 margin: 8px 0; 293 padding: 0 1px 6px; 294 } 295 296 #find-posts-response table { 297 width: 100%; 298 } 299 300 #find-posts-response .found-radio { 301 padding: 3px 0 0 8px; 302 width: 15px; 281 } 282 283 #find-posts-input { 284 width: 140px; 285 height: 28px; 286 margin: 0 4px 0 0; 287 } 288 289 .found-radio { 290 width: 16px; 291 } 292 293 #find-posts-close { 294 width: 40px; 295 height: 40px; 296 position: absolute; 297 top: 0; 298 right: 0; 299 cursor: pointer; 300 text-align: center; 301 color: #666; 302 } 303 304 #find-posts-close:hover { 305 color: #2ea2cc; 306 } 307 308 #find-posts-close:before { 309 font: normal 20px/40px 'dashicons'; 310 vertical-align: top; 311 speak: none; 312 -webkit-font-smoothing: antialiased; 313 -moz-osx-font-smoothing: grayscale; 314 content: '\f158'; 315 } 316 317 .find-box-buttons { 318 padding: 6px 16px; 319 background: #fcfcfc; 320 border-top: 1px solid #dfdfdf; 303 321 } 304 322 … … 310 328 311 329 .ui-find-overlay { 312 position: absolute;330 position: fixed; 313 331 top: 0; 314 332 left: 0; 315 background-color: #000; 316 opacity: 0.6; 317 filter: alpha(opacity=60); 333 right: 0; 334 bottom: 0; 335 background: #000; 336 opacity: 0.7; 337 z-index: 159900; 318 338 } 319 339 -
trunk/src/wp-admin/includes/ajax-actions.php
r27305 r27401 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 ) { … … 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 } -
trunk/src/wp-admin/includes/template.php
r27237 r27401 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"> … … 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 ); ?> … … 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> -
trunk/src/wp-admin/js/media.js
r26200 r27401 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){ … … 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 }); … … 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); -
trunk/src/wp-admin/upload.php
r26518 r27401 145 145 wp_enqueue_script( 'jquery-ui-draggable' ); 146 146 wp_enqueue_script( 'media' ); 147 148 add_action( 'admin_print_footer_scripts', 'find_posts_div' ); 147 149 148 150 add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) ); … … 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' );
Note: See TracChangeset
for help on using the changeset viewer.