Make WordPress Core

Ticket #28753: 28753.diff

File 28753.diff, 6.3 KB (added by paulwilde, 12 years ago)
  • src/wp-admin/css/forms.css

     
    751751        margin: -3px 3px;
    752752}
    753753
     754/*------------------------------------------------------------------------------
     755  21.0 - Upload File
     756------------------------------------------------------------------------------*/
     757
     758.wp-upload-container {
     759        -webkit-box-sizing: border-box;
     760        -moz-box-sizing: border-box;
     761        box-sizing: border-box;
     762        margin: 0px 0 0;
     763        padding: 0;
     764        width: 100%;
     765        overflow: hidden;
     766        position: relative;
     767        top: 10px;
     768}
     769.wp-upload-container-hidden {
     770        display: none;
     771}
     772.wp-upload-container .wp-upload-form {
     773        background: #fafafa;
     774        border: 1px solid #e5e5e5;
     775        padding: 30px;
     776        margin: 30px auto;
     777        max-width: 380px;
     778}
     779.wp-upload-container .install-help {
     780        color: #999;
     781        font-size: 18px;
     782        font-style: normal;
     783        margin: 0;
     784        padding: 40px 0 0;
     785        text-align: center;
     786}
     787
     788body.show-upload-container .wp-upload-container-hidden {
     789        display: block;
     790}
     791
    754792/* =Media Queries
    755793-------------------------------------------------------------- */
    756794
     795@media only screen and (max-width: 1120px) {
     796        .wp-upload-container .wp-upload-form {
     797                margin: 20px 0;
     798                max-width: 100%;
     799        }
     800        .wp-upload-container .install-help {
     801                font-size: 15px;
     802                padding: 20px 0 0;
     803                text-align: left;
     804        }
     805}
     806
    757807@media screen and ( max-width: 782px ) {
    758808        /* Input Elements */
    759809        textarea {
  • src/wp-admin/css/themes.css

     
    11081108        cursor: pointer;
    11091109}
    11101110.theme-install-php a.browse-themes,
    1111 .theme-install-php.show-upload-theme a.upload {
     1111.theme-install-php.show-upload-container a.upload {
    11121112        display: none;
    11131113}
    1114 .theme-install-php.show-upload-theme a.browse-themes {
     1114.theme-install-php.show-upload-container a.browse-themes {
    11151115        display: inline;
    11161116}
    1117 .upload-theme {
    1118         -webkit-box-sizing: border-box;
    1119         -moz-box-sizing: border-box;
    1120         box-sizing: border-box;
     1117
     1118body.show-upload-container .wp-upload-container + .theme-navigation,
     1119body.show-upload-container .wp-upload-container + .theme-navigation + .theme-browser {
    11211120        display: none;
    1122         margin: 0px 0 0;
    1123         padding: 0;
    1124         width: 100%;
    1125         overflow: hidden;
    1126         position: relative;
    1127         top: 10px;
    11281121}
    1129 body.show-upload-theme .upload-theme {
    1130         display: block;
    1131 }
    1132 .upload-theme .wp-upload-form {
    1133         background: #fafafa;
    1134         border: 1px solid #e5e5e5;
    1135         padding: 30px;
    1136         margin: 30px auto;
    1137         max-width: 380px;
    1138 }
    1139 .upload-theme .install-help {
    1140         color: #999;
    1141         font-size: 18px;
    1142         font-style: normal;
    1143         margin: 0;
    1144         padding: 40px 0 0;
    1145         text-align: center;
    1146 }
    1147 body.show-upload-theme .upload-theme + .theme-navigation,
    1148 body.show-upload-theme .upload-theme + .theme-navigation + .theme-browser {
    1149         display: none;
    1150 }
    11511122.theme-navigation .theme-count {
    11521123        margin-left: 0;
    11531124        position: absolute;
     
    13401311body.no-results p.no-themes {
    13411312        display: block;
    13421313}
    1343 body.show-upload-theme p.no-themes {
     1314body.show-upload-container p.no-themes {
    13441315        display: none !important;
    13451316}
    13461317
     
    13581329        .more-filters-container {
    13591330                border-bottom: 1px solid #eee;
    13601331        }
    1361         .upload-theme .wp-upload-form {
    1362                 margin: 20px 0;
    1363                 max-width: 100%;
    1364         }
    1365         .upload-theme .install-help {
    1366                 font-size: 15px;
    1367                 padding: 20px 0 0;
    1368                 text-align: left;
    1369         }
    13701332        .more-filters-container .filters-group {
    13711333                margin-bottom: 0;
    13721334                margin-top: 5px;
  • src/wp-admin/includes/plugin-install.php

     
    187187 */
    188188function install_plugins_upload( $page = 1 ) {
    189189?>
    190         <h4><?php _e('Install a plugin in .zip format'); ?></h4>
    191         <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p>
    192         <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>">
    193                 <?php wp_nonce_field( 'plugin-upload'); ?>
    194                 <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
    195                 <input type="file" id="pluginzip" name="pluginzip" />
    196                 <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
    197         </form>
     190        <div class="wp-upload-container">
     191                <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p>
     192                <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>">
     193                        <?php wp_nonce_field( 'plugin-upload'); ?>
     194                        <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
     195                        <input type="file" id="pluginzip" name="pluginzip" />
     196                        <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
     197                </form>
     198        </div>
    198199<?php
    199200}
    200201add_action('install_plugins_upload', 'install_plugins_upload', 10, 1);
  • src/wp-admin/js/theme.js

     
    14991499        uploader: function() {
    15001500                $( 'a.upload' ).on( 'click', function( event ) {
    15011501                        event.preventDefault();
    1502                         $( 'body' ).addClass( 'show-upload-theme' );
     1502                        $( 'body' ).addClass( 'show-upload-container' );
    15031503                        themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } );
    15041504                });
    15051505                $( 'a.browse-themes' ).on( 'click', function( event ) {
    15061506                        event.preventDefault();
    1507                         $( 'body' ).removeClass( 'show-upload-theme' );
     1507                        $( 'body' ).removeClass( 'show-upload-container' );
    15081508                        themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
    15091509                });
    15101510        },
  • src/wp-admin/theme-install.php

     
    114114                <a href="#" class="browse-themes add-new-h2"><?php _ex( 'Browse', 'themes' ); ?></a>
    115115        </h2>
    116116
    117         <div class="upload-theme">
     117        <div class="wp-upload-container wp-upload-container-hidden">
    118118        <?php install_themes_upload(); ?>
    119119        </div>
    120120