Ticket #20805: 20805-7.patch
File 20805-7.patch, 13.9 KB (added by , 12 years ago) |
---|
-
wp-includes/js/plupload/wp-plupload.dev.js
4 4 (function( exports, $ ) { 5 5 var Uploader; 6 6 7 if ( typeof _wpPluploadSettings === 'undefined' ) 8 return; 9 7 10 /* 8 11 * An object that helps create a WordPress uploader using plupload. 9 12 * … … 27 30 }, 28 31 key; 29 32 33 this.supports = { 34 upload: Uploader.browser.supported 35 }; 36 37 this.supported = this.supports.upload; 38 39 if ( ! this.supported ) 40 return; 41 30 42 // Use deep extend to ensure that multipart_params and other objects are cloned. 31 this.plupload = $.extend( true, { multipart_params: {} }, wpPluploadDefaults );43 this.plupload = $.extend( true, { multipart_params: {} }, Uploader.defaults ); 32 44 this.container = document.body; // Set default container. 33 45 34 46 // Extend the instance with options … … 68 80 this.param( this.params || {} ); 69 81 delete this.params; 70 82 71 this.uploader.bind( 'Init', this.init );72 73 83 this.uploader.init(); 74 84 85 this.supports.dragdrop = this.uploader.features.dragdrop && ! Uploader.browser.mobile; 86 75 87 // Generate drag/drop helper classes. 76 88 (function( dropzone, supported ) { 77 89 var sensitivity = 50, … … 99 111 active = false; 100 112 dropzone.removeClass('drag-over'); 101 113 }); 102 }( this.dropzone, this. uploader.features.dragdrop ));114 }( this.dropzone, this.supports.dragdrop )); 103 115 104 116 this.browser.on( 'mouseenter', this.refresh ); 105 117 … … 147 159 up.refresh(); 148 160 up.start(); 149 161 }); 162 163 this.init(); 150 164 }; 151 165 166 // Adds the 'defaults' and 'browser' properties. 167 $.extend( Uploader, _wpPluploadSettings ); 168 152 169 Uploader.uuid = 0; 153 170 154 171 Uploader.errorMap = { … … 200 217 }); 201 218 202 219 exports.Uploader = Uploader; 203 })( wp, jQuery ); 204 No newline at end of file 220 })( wp, jQuery ); -
wp-includes/js/customize-loader.dev.js
70 70 if ( this.active ) 71 71 return; 72 72 73 // Load the full page on mobile devices. 74 if ( Loader.settings.browser.mobile ) 75 return window.location = src; 76 73 77 this.active = true; 74 78 this.body.addClass('customize-loading'); 75 79 -
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() { -
wp-includes/theme.php
1605 1605 $home_origin = parse_url( home_url() ); 1606 1606 $cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) ); 1607 1607 1608 $browser = array( 1609 'mobile' => wp_is_mobile(), 1610 'ios' => wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ), 1611 ); 1612 1608 1613 $settings = array( 1609 1614 'url' => esc_url( admin_url( 'customize.php' ) ), 1610 1615 'isCrossDomain' => $cross_domain, 1616 'browser' => $browser, 1611 1617 ); 1612 1618 1613 1619 $script = 'var _wpCustomizeLoaderSettings = ' . json_encode( $settings ) . ';'; -
wp-includes/media.php
1467 1467 1468 1468 $max_upload_size = wp_max_upload_size(); 1469 1469 1470 $ settings = array(1470 $defaults = array( 1471 1471 'runtimes' => 'html5,silverlight,flash,html4', 1472 1472 'file_data_name' => 'async-upload', // key passed to $_FILE. 1473 1473 'multiple_queues' => true, … … 1480 1480 'urlstream_upload' => true, 1481 1481 ); 1482 1482 1483 $ settings = apply_filters( 'plupload_default_settings', $settings );1483 $defaults = apply_filters( 'plupload_default_settings', $defaults ); 1484 1484 1485 1485 $params = array( 1486 1486 'action' => 'upload-attachment', … … 1488 1488 1489 1489 $params = apply_filters( 'plupload_default_params', $params ); 1490 1490 $params['_wpnonce'] = wp_create_nonce( 'media-form' ); 1491 $ settings['multipart_params'] = $params;1491 $defaults['multipart_params'] = $params; 1492 1492 1493 $script = 'var wpPluploadDefaults = ' . json_encode( $settings ) . ';'; 1493 $settings = array( 1494 'defaults' => $defaults, 1495 'browser' => array( 1496 'mobile' => wp_is_mobile(), 1497 'supported' => _device_can_upload(), 1498 ), 1499 ); 1494 1500 1501 $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';'; 1502 1495 1503 $data = $wp_scripts->get_data( 'wp-plupload', 'data' ); 1496 1504 if ( $data ) 1497 1505 $script = "$data\n$script"; -
wp-admin/includes/class-wp-theme-install-list-table.php
250 250 */ 251 251 function theme_installer() { 252 252 ?> 253 <div id="theme-installer" class="wp-full-overlay ">253 <div id="theme-installer" class="wp-full-overlay expanded"> 254 254 <div class="wp-full-overlay-sidebar"> 255 255 <div class="wp-full-overlay-header"> 256 256 <a href="#" class="close-full-overlay"><?php _e( '← Close' ); ?></a> -
wp-admin/customize.php
39 39 wp_user_settings(); 40 40 _wp_admin_html_begin(); 41 41 42 $body_class = ''; 43 44 if ( wp_is_mobile() ) : 45 $body_class .= ' mobile'; 46 47 ?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2"><?php 48 endif; 49 50 $is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); 51 52 if ( $is_ios ) 53 $body_class .= ' ios'; 54 42 55 $admin_title = sprintf( __( '%1$s — WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) ); 43 56 ?><title><?php echo $admin_title; ?></title><?php 44 57 … … 46 59 do_action( 'customize_controls_print_scripts' ); 47 60 ?> 48 61 </head> 49 <body class="wp-full-overlay"> 62 <body class="<?php echo esc_attr( $body_class ); ?>"> 63 <div class="wp-full-overlay expanded"> 50 64 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 51 65 <?php wp_nonce_field( 'customize_controls' ); ?> 52 66 <div id="customize-header-actions" class="wp-full-overlay-header"> … … 145 159 'isCrossDomain' => $cross_domain, 146 160 'fallback' => $fallback_url, 147 161 ), 162 'browser' => array( 163 'mobile' => wp_is_mobile(), 164 'ios' => $is_ios, 165 ), 148 166 'settings' => array(), 149 167 'controls' => array(), 150 168 ); … … 165 183 <script type="text/javascript"> 166 184 var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>; 167 185 </script> 186 </div> 168 187 </body> 169 188 </html> -
wp-admin/js/theme.dev.js
41 41 }); 42 42 43 43 preview.on( 'click', '.collapse-sidebar', function( event ) { 44 preview.toggleClass( 'collapsed');44 preview.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); 45 45 event.preventDefault(); 46 46 }); 47 47 -
wp-admin/js/customize-controls.dev.js
148 148 success: this.success 149 149 }, this.uploader || {} ); 150 150 151 if ( this.uploader.supported ) { 152 if ( control.params.context ) 153 control.uploader.param( 'post_data[context]', this.params.context ); 154 155 control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet ); 156 } 157 151 158 this.uploader = new wp.Uploader( this.uploader ); 152 159 153 160 this.remover = this.container.find('.remove'); … … 159 166 this.removerVisibility = $.proxy( this.removerVisibility, this ); 160 167 this.setting.bind( this.removerVisibility ); 161 168 this.removerVisibility( this.setting.get() ); 162 163 if ( this.params.context )164 control.uploader.param( 'post_data[context]', this.params.context );165 166 control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet );167 169 }, 168 170 success: function( attachment ) { 169 171 this.setting.set( attachment.url ); … … 182 184 init: function( up ) { 183 185 var fallback, button; 184 186 185 if ( up.features.dragdrop )187 if ( this.supports.dragdrop ) 186 188 return; 187 189 188 190 // Maintain references while wrapping the fallback button. … … 566 568 return window.location = api.settings.url.fallback; 567 569 568 570 var body = $( document.body ), 571 overlay = body.children('.wp-full-overlay'), 569 572 query, previewer, parent; 570 573 571 574 // Prevent the form from saving when enter is pressed. … … 702 705 }); 703 706 704 707 $('.collapse-sidebar').click( function( event ) { 705 body.toggleClass( 'collapsed' );708 overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); 706 709 event.preventDefault(); 707 710 }); 708 711 -
wp-admin/css/wp-admin.dev.css
5255 5255 overflow: visible; 5256 5256 top: 0; 5257 5257 bottom: 0; 5258 left: 300px;5258 left: 0; 5259 5259 right: 0; 5260 5260 height: 100%; 5261 5261 min-width: 0; 5262 5262 } 5263 5263 5264 .wp-full-overlay.collapsed {5265 left: 0 !important;5266 }5267 5268 5264 .wp-full-overlay-sidebar { 5269 5265 -webkit-box-sizing: border-box; 5270 5266 -moz-box-sizing: border-box; 5271 5267 box-sizing: border-box; 5272 5268 5273 position: absolute;5269 position: fixed; 5274 5270 width: 300px; 5275 5271 height: 100%; 5276 5272 top: 0; 5277 5273 bottom: 0; 5278 right: 100%;5274 left: 0; 5279 5275 padding: 0; 5280 5276 margin: 0; 5281 5277 z-index: 10; … … 5288 5284 overflow: visible; 5289 5285 } 5290 5286 5287 .wp-full-overlay.collapsed, 5288 .wp-full-overlay.expanded .wp-full-overlay-sidebar { 5289 margin-left: 0 !important; 5290 } 5291 5292 .wp-full-overlay.expanded { 5293 margin-left: 300px; 5294 } 5295 5296 .wp-full-overlay.collapsed .wp-full-overlay-sidebar { 5297 margin-left: -300px; 5298 } 5299 5291 5300 .wp-full-overlay-sidebar:after { 5292 5301 content: ''; 5293 5302 display: block; … … 5404 5413 .wp-full-overlay-sidebar, 5405 5414 .wp-full-overlay .collapse-sidebar, 5406 5415 .wp-full-overlay-main { 5407 -webkit-transition-property: left, right, top, bottom, width ;5408 -moz-transition-property: left, right, top, bottom, width ;5409 -ms-transition-property: left, right, top, bottom, width ;5410 -o-transition-property: left, right, top, bottom, width ;5411 transition-property: left, right, top, bottom, width ;5416 -webkit-transition-property: left, right, top, bottom, width, margin; 5417 -moz-transition-property: left, right, top, bottom, width, margin; 5418 -ms-transition-property: left, right, top, bottom, width, margin; 5419 -o-transition-property: left, right, top, bottom, width, margin; 5420 transition-property: left, right, top, bottom, width, margin; 5412 5421 5413 5422 -webkit-transition-duration: 0.2s; 5414 5423 -moz-transition-duration: 0.2s; -
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 .ios .wp-full-overlay { 506 position: relative; 507 } 508 509 .ios #customize-preview { 510 position: relative; 511 } 512 513 .ios #customize-controls .wp-full-overlay-sidebar-content { 514 -webkit-overflow-scrolling: touch; 515 } 516