Ticket #20805: 20805-4.patch

File 20805-4.patch, 7.0 KB (added by azaozz, 12 months ago)
  • wp-admin/css/customize-controls.dev.css

     
    402402        text-align: right; 
    403403} 
    404404 
    405 .customize-section .customize-control-image .actions a { 
    406         display: block; 
    407 } 
    408  
    409405.customize-section .customize-control-image .library ul { 
    410406        border-bottom: 1px solid #dfdfdf; 
    411407        float: left; 
     
    456452 
    457453.customize-section .customize-control-image .library .thumbnail img { 
    458454        display: block; 
    459         max-width: 220px; 
     455        max-width: 90%; 
    460456        max-height: 80px; 
    461457 
    462458        margin: 5px auto; 
     
    465461        border: 1px solid #dfdfdf; 
    466462} 
    467463 
    468 .customize-section .customize-control-upload .upload-fallback, 
    469 .customize-section .customize-control-image .upload-fallback { 
     464.customize-section .customize-control-upload .upload-dropzone, 
     465.customize-section .customize-control-image .upload-dropzone { 
     466        margin: 5px 0 0; 
     467        position: relative; 
     468} 
     469 
     470.customize-section .upload-dropzone-text, 
     471.customize-section .supports-drag-drop .upload-fallback-button { 
    470472        display: none; 
    471473} 
    472474 
    473 .customize-section .customize-control-upload .upload-dropzone, 
    474 .customize-section .customize-control-image .upload-dropzone { 
    475         display: none; 
     475.customize-section .supports-drag-drop .upload-dropzone-text { 
     476        display: inline; 
     477} 
     478 
     479.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop, 
     480.customize-section .customize-control-image .upload-dropzone.supports-drag-drop { 
    476481        padding: 15px 10px; 
    477482        border: 3px dashed #dfdfdf; 
    478483        margin: 5px auto; 
    479484        text-align: center; 
    480485        color: #777; 
    481         position: relative; 
    482 } 
    483  
    484 .customize-section .customize-control-upload .upload-dropzone.supports-drag-drop, 
    485 .customize-section .customize-control-image .upload-dropzone.supports-drag-drop { 
    486         display: block; 
     486        cursor: default; 
    487487        -webkit-transition: border-color 0.1s; 
    488488        -moz-transition:    border-color 0.1s; 
    489489        -ms-transition:     border-color 0.1s; 
     
    491491        transition:         border-color 0.1s; 
    492492} 
    493493 
     494.customize-section .customize-control-upload .library ul li, 
     495.customize-section .customize-control-image .library ul li { 
     496        cursor: pointer; 
     497} 
     498 
    494499.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over, 
    495500.customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over { 
    496501        border-color: #83b4d8; 
    497 } 
    498  No newline at end of file 
     502} 
     503 
     504/** 
     505 * iOS can't scroll iframes, 
     506 * instead it expands the iframe size to match the size of the content 
     507 */ 
     508body.ios { 
     509        position: static; 
     510        z-index: 0; 
     511        overflow: auto; 
     512} 
     513 
     514.ios #customize-controls { 
     515        right: auto; 
     516        width: 250px; 
     517        position: fixed; 
     518} 
     519 
     520.ios #customize-preview { 
     521        position: relative; 
     522        left: 250px; 
     523} 
     524 
     525.ios.collapsed #customize-preview { 
     526        left: 0; 
     527        width: 100% 
     528} 
     529 
     530.ios.collapsed #customize-controls { 
     531        margin-left: -250px; 
     532} 
     533 
  • wp-admin/customize.php

     
    3939wp_user_settings(); 
    4040_wp_admin_html_begin(); 
    4141 
     42$body_class = 'wp-full-overlay'; 
     43$is_mobile = $is_ios = false; 
     44 
     45if ( 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 
    4258$admin_title = sprintf( __( '%1$s &#8212; WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) ); 
    4359?><title><?php echo $admin_title; ?></title><?php 
    4460 
     
    4662do_action( 'customize_controls_print_scripts' ); 
    4763?> 
    4864</head> 
    49 <body class="wp-full-overlay"> 
     65<body class="<?php echo $body_class; ?>"> 
    5066        <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 
    5167                <?php wp_nonce_field( 'customize_controls' ); ?> 
    5268                <div id="customize-header-actions" class="wp-full-overlay-header"> 
     
    145161                        'isCrossDomain' => $cross_domain, 
    146162                        'fallback'      => $fallback_url, 
    147163                ), 
     164                'is_mobile' => $is_mobile, 
     165                'is_ios' => $is_ios, 
    148166                'settings' => array(), 
    149167                'controls' => array(), 
    150168        ); 
  • wp-includes/class-wp-customize-control.php

     
    331331                        $src = call_user_func( $this->get_url, $src ); 
    332332 
    333333                ?> 
    334                 <label class="customize-image-picker"> 
     334                <div class="customize-image-picker"> 
    335335                        <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 
    336336 
    337337                        <div class="customize-control-content"> 
     
    366366                        <div class="actions"> 
    367367                                <a href="#" class="remove"><?php _e( 'Remove Image' ); ?></a> 
    368368                        </div> 
    369                 </label> 
     369                </div> 
    370370                <?php 
    371371        } 
    372372 
     
    384384        public function tab_upload_new() { 
    385385                ?> 
    386386                <div class="upload-dropzone"> 
    387                         <?php _e('Drop a file here or <a href="#" class="upload">select a file</a>.'); ?> 
     387                        <span class="upload-dropzone-text"><?php _e('Drop a file here or'); ?></span> 
     388                        <a href="#" class="upload"><span class="upload-dropzone-text"><?php _e('select a file.'); ?></span><span class="upload-fallback-button button-secondary"><?php _e('Select File'); ?></span></a> 
    388389                </div> 
    389390                <div class="upload-fallback"> 
    390391                        <span class="button-secondary"><?php _e('Select File'); ?></span> 
     
    480481                foreach ( $custom_image_header->default_headers as $header ) 
    481482                        $this->print_tab_image( $header['url'], $header['thumbnail_url'] ); 
    482483        } 
    483 } 
    484  No newline at end of file 
     484} 
  • wp-includes/js/customize-loader.dev.js

     
    3030                        this.bind( 'close', this.overlay.hide ); 
    3131 
    3232                        $('#wpbody').on( 'click', '.load-customize', function( event ) { 
     33                                // follow the link if on mobile device 
     34                                if ( $('body').hasClass('mobile') ) 
     35                                        return true; 
     36 
    3337                                event.preventDefault(); 
    3438 
    3539                                // Load the theme. 
  • wp-includes/js/plupload/wp-plupload.dev.js

     
    9999                                active = false; 
    100100                                dropzone.removeClass('drag-over'); 
    101101                        }); 
    102                 }( this.dropzone, this.uploader.features.dragdrop )); 
     102                }( this.dropzone, this.uploader.features.dragdrop && ! $('body').hasClass('mobile') )); 
    103103 
    104104                this.browser.on( 'mouseenter', this.refresh ); 
    105105 
     
    200200        }); 
    201201 
    202202        exports.Uploader = Uploader; 
    203 })( wp, jQuery ); 
    204  No newline at end of file 
     203})( wp, jQuery );