Changeset 21014
- Timestamp:
- 06/06/2012 09:45:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/customize-controls.dev.css
r21006 r21014 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; … … 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 … … 480 476 color: #777; 481 477 position: relative; 478 cursor: default; 482 479 } 483 480 … … 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 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 -
trunk/wp-admin/css/wp-admin-rtl.dev.css
r21006 r21014 1567 1567 26.0 - Full Overlay w/ Sidebar 1568 1568 ------------------------------------------------------------------------------*/ 1569 .wp-full-overlay {1570 left: 0;1571 right: 300px;1572 }1573 1574 .wp-full-overlay.collapsed {1575 right: 0 !important;1576 }1577 1578 1569 .wp-full-overlay .wp-full-overlay-sidebar { 1579 1570 margin: 0; 1580 left: 100%;1581 right: auto;1571 left: auto; 1572 right: 0; 1582 1573 border-right: 0; 1583 1574 border-left: 1px solid rgba( 0, 0, 0, 0.2 ); … … 1588 1579 left: 0; 1589 1580 box-shadow: inset 5px 0 4px -4px rgba(0, 0, 0, 0.1); 1581 } 1582 1583 .wp-full-overlay.collapsed, 1584 .wp-full-overlay.expanded .wp-full-overlay-sidebar { 1585 margin-right: 0 !important; 1586 } 1587 1588 .wp-full-overlay.expanded { 1589 margin-right: 300px; 1590 margin-left: 0; 1591 } 1592 1593 .wp-full-overlay.collapsed .wp-full-overlay-sidebar { 1594 margin-right: -300px; 1595 margin-left: 0; 1590 1596 } 1591 1597 -
trunk/wp-admin/css/wp-admin.dev.css
r21006 r21014 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 }5263 5264 .wp-full-overlay.collapsed {5265 left: 0 !important;5266 5262 } 5267 5263 … … 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; … … 5287 5283 .wp-full-overlay.collapsed .wp-full-overlay-sidebar { 5288 5284 overflow: visible; 5285 } 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; 5289 5298 } 5290 5299 … … 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; -
trunk/wp-admin/customize.php
r21010 r21014 35 35 _wp_admin_html_begin(); 36 36 37 $body_class = ''; 38 39 if ( wp_is_mobile() ) : 40 $body_class .= ' mobile'; 41 42 ?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2"><?php 43 endif; 44 45 $is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); 46 47 if ( $is_ios ) 48 $body_class .= ' ios'; 49 37 50 $admin_title = sprintf( __( '%1$s — WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) ); 38 51 ?><title><?php echo $admin_title; ?></title><?php … … 42 55 ?> 43 56 </head> 44 <body class="wp-full-overlay"> 57 <body class="<?php echo esc_attr( $body_class ); ?>"> 58 <div class="wp-full-overlay expanded"> 45 59 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 46 60 <?php wp_nonce_field( 'customize_controls-' . $wp_customize->get_stylesheet() ); ?> … … 141 155 'fallback' => $fallback_url, 142 156 ), 157 'browser' => array( 158 'mobile' => wp_is_mobile(), 159 'ios' => $is_ios, 160 ), 143 161 'settings' => array(), 144 162 'controls' => array(), … … 161 179 var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>; 162 180 </script> 181 </div> 163 182 </body> 164 183 </html> -
trunk/wp-admin/includes/class-wp-theme-install-list-table.php
r20968 r21014 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"> -
trunk/wp-admin/js/customize-controls.dev.js
r20988 r21014 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 … … 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 ) { … … 183 185 var fallback, button; 184 186 185 if ( up.features.dragdrop )187 if ( this.supports.dragdrop ) 186 188 return; 187 189 … … 567 569 568 570 var body = $( document.body ), 571 overlay = body.children('.wp-full-overlay'), 569 572 query, previewer, parent; 570 573 … … 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 }); -
trunk/wp-admin/js/theme.dev.js
r20899 r21014 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 }); -
trunk/wp-includes/class-wp-customize-control.php
r20936 r21014 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 … … 367 367 <a href="#" class="remove"><?php _e( 'Remove Image' ); ?></a> 368 368 </div> 369 </ label>369 </div> 370 370 <?php 371 371 } … … 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 -
trunk/wp-includes/js/customize-loader.dev.js
r21010 r21014 67 67 if ( this.active ) 68 68 return; 69 70 // Load the full page on mobile devices. 71 if ( Loader.settings.browser.mobile ) 72 return window.location = src; 69 73 70 74 this.active = true; -
trunk/wp-includes/js/plupload/wp-plupload.dev.js
r20928 r21014 4 4 (function( exports, $ ) { 5 5 var Uploader; 6 7 if ( typeof _wpPluploadSettings === 'undefined' ) 8 return; 6 9 7 10 /* … … 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 … … 69 81 delete this.params; 70 82 71 this.uploader.bind( 'Init', this.init );72 73 83 this.uploader.init(); 84 85 this.supports.dragdrop = this.uploader.features.dragdrop && ! Uploader.browser.mobile; 74 86 75 87 // Generate drag/drop helper classes. … … 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 ); … … 148 160 up.start(); 149 161 }); 162 163 this.init(); 150 164 }; 165 166 // Adds the 'defaults' and 'browser' properties. 167 $.extend( Uploader, _wpPluploadSettings ); 151 168 152 169 Uploader.uuid = 0; -
trunk/wp-includes/media.php
r20701 r21014 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. … … 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( … … 1489 1489 $params = apply_filters( 'plupload_default_params', $params ); 1490 1490 $params['_wpnonce'] = wp_create_nonce( 'media-form' ); 1491 $settings['multipart_params'] = $params; 1492 1493 $script = 'var wpPluploadDefaults = ' . json_encode( $settings ) . ';'; 1491 $defaults['multipart_params'] = $params; 1492 1493 $settings = array( 1494 'defaults' => $defaults, 1495 'browser' => array( 1496 'mobile' => wp_is_mobile(), 1497 'supported' => _device_can_upload(), 1498 ), 1499 ); 1500 1501 $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';'; 1494 1502 1495 1503 $data = $wp_scripts->get_data( 'wp-plupload', 'data' ); -
trunk/wp-includes/theme.php
r21002 r21014 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
Note: See TracChangeset
for help on using the changeset viewer.