Ticket #20805: 20805-6.patch
File 20805-6.patch, 6.8 KB (added by , 12 years ago) |
---|
-
wp-admin/css/customize-controls.dev.css
402 402 text-align: right; 403 403 } 404 404 405 .customize-section .customize-control-image .actions a {406 display: block;407 }408 409 405 .customize-section .customize-control-image .library ul { 410 406 border-bottom: 1px solid #dfdfdf; 411 407 float: left; … … 456 452 457 453 .customize-section .customize-control-image .library .thumbnail img { 458 454 display: block; 459 max-width: 220px;455 max-width: 90%; 460 456 max-height: 80px; 461 457 462 458 margin: 5px auto; … … 479 475 text-align: center; 480 476 color: #777; 481 477 position: relative; 478 cursor: default; 482 479 } 483 480 484 481 .customize-section .customize-control-upload .upload-dropzone.supports-drag-drop, … … 491 488 transition: border-color 0.1s; 492 489 } 493 490 491 .customize-section .customize-control-upload .library ul li, 492 .customize-section .customize-control-image .library ul li { 493 cursor: pointer; 494 } 495 494 496 .customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over, 495 497 .customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over { 496 498 border-color: #83b4d8; 497 } 498 No newline at end of file 499 } 500 501 /** 502 * iOS can't scroll iframes, 503 * instead it expands the iframe size to match the size of the content 504 */ 505 body.ios { 506 position: static; 507 z-index: 0; 508 overflow: auto; 509 } 510 511 .ios #customize-controls { 512 right: auto; 513 width: 250px; 514 position: fixed; 515 } 516 517 .ios #customize-preview { 518 position: relative; 519 left: 250px; 520 } 521 522 .ios.collapsed #customize-preview { 523 left: 0; 524 width: 100% 525 } 526 527 .ios.collapsed #customize-controls { 528 margin-left: -250px; 529 } 530 -
wp-admin/customize.php
39 39 wp_user_settings(); 40 40 _wp_admin_html_begin(); 41 41 42 $body_class = 'wp-full-overlay'; 43 $is_mobile = $is_ios = false; 44 45 if ( wp_is_mobile() ) { 46 $body_class .= ' mobile'; 47 $is_mobile = true; 48 if ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') 49 || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') 50 || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') ) { 51 $body_class .= ' ios'; 52 $is_ios = true; 53 } 54 55 ?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=2.0"><?php 56 } 57 42 58 $admin_title = sprintf( __( '%1$s — WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) ); 43 59 ?><title><?php echo $admin_title; ?></title><?php 44 60 … … 46 62 do_action( 'customize_controls_print_scripts' ); 47 63 ?> 48 64 </head> 49 <body class=" wp-full-overlay">65 <body class="<?php echo $body_class; ?>"> 50 66 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 51 67 <?php wp_nonce_field( 'customize_controls' ); ?> 52 68 <div id="customize-header-actions" class="wp-full-overlay-header"> … … 145 161 'isCrossDomain' => $cross_domain, 146 162 'fallback' => $fallback_url, 147 163 ), 164 'is_mobile' => $is_mobile, 165 'is_ios' => $is_ios, 148 166 'settings' => array(), 149 167 'controls' => array(), 150 168 ); -
wp-admin/js/customize-controls.dev.js
148 148 success: this.success 149 149 }, this.uploader || {} ); 150 150 151 if ( ! this.uploader.browser.length ) 152 return; 153 154 if ( api.settings.is_mobile ) 155 this.uploader.dropzone = null; 156 151 157 this.uploader = new wp.Uploader( this.uploader ); 152 158 153 159 this.remover = this.container.find('.remove'); … … 182 188 init: function( up ) { 183 189 var fallback, button; 184 190 185 if ( up.features.dragdrop )191 if ( up.features.dragdrop && ! api.settings.is_mobile ) 186 192 return; 187 193 188 194 // Maintain references while wrapping the fallback button. … … 784 790 api.trigger( 'ready' ); 785 791 }); 786 792 787 })( wp, jQuery ); 788 No newline at end of file 793 })( wp, jQuery ); -
wp-includes/class-wp-customize-control.php
331 331 $src = call_user_func( $this->get_url, $src ); 332 332 333 333 ?> 334 < labelclass="customize-image-picker">334 <div class="customize-image-picker"> 335 335 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 336 336 337 337 <div class="customize-control-content"> … … 366 366 <div class="actions"> 367 367 <a href="#" class="remove"><?php _e( 'Remove Image' ); ?></a> 368 368 </div> 369 </ label>369 </div> 370 370 <?php 371 371 } 372 372 … … 382 382 } 383 383 384 384 public function tab_upload_new() { 385 ?> 386 <div class="upload-dropzone"> 387 <?php _e('Drop a file here or <a href="#" class="upload">select a file</a>.'); ?> 388 </div> 389 <div class="upload-fallback"> 390 <span class="button-secondary"><?php _e('Select File'); ?></span> 391 </div> 392 <?php 385 if ( ! _device_can_upload() ) { 386 ?> 387 <p><?php _e('The web browser on your device cannot be used to upload files. You may be able to use the <a href="http://wordpress.org/extend/mobile/">native app for your device</a> instead.'); ?></p> 388 <?php 389 } else { 390 ?> 391 <div class="upload-dropzone"> 392 <?php _e('Drop a file here or <a href="#" class="upload">select a file</a>.'); ?> 393 </div> 394 <div class="upload-fallback"> 395 <span class="button-secondary"><?php _e('Select File'); ?></span> 396 </div> 397 <?php 398 } 393 399 } 394 400 395 401 public function tab_uploaded() { … … 480 486 foreach ( $custom_image_header->default_headers as $header ) 481 487 $this->print_tab_image( $header['url'], $header['thumbnail_url'] ); 482 488 } 483 } 484 No newline at end of file 489 } -
wp-includes/js/customize-loader.dev.js
30 30 this.bind( 'close', this.overlay.hide ); 31 31 32 32 $('#wpbody').on( 'click', '.load-customize', function( event ) { 33 // follow the link if on mobile device 34 if ( $('body').hasClass('mobile') ) 35 return true; 36 33 37 event.preventDefault(); 34 38 35 39 // Load the theme. -
wp-includes/js/plupload/wp-plupload.dev.js
200 200 }); 201 201 202 202 exports.Uploader = Uploader; 203 })( wp, jQuery ); 204 No newline at end of file 203 })( wp, jQuery ); 204