Make WordPress Core

Changeset 46355


Ignore:
Timestamp:
09/30/2019 05:11:14 PM (6 years ago)
Author:
antpb
Message:

Media: Revert [46354] preventing bad clipping of text in image details page.

See #47115.

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/image-edit.js

    r46354 r46355  
    504504            // If a response is returned, close the editor and show an error.
    505505            if ( ret.error ) {
    506                 $('#imgedit-response-' + postid).html('<div class="error" role="alert"><p>' + ret.error + '</p></div>');
     506                $('#imgedit-response-' + postid).html('<div class="error"><p>' + ret.error + '</p></div>');
    507507                imageEdit.close(postid);
    508508                return;
     
    518518
    519519            if ( ret.msg ) {
    520                 $('#imgedit-response-' + postid).html('<div class="updated" role="alert"><p>' + ret.msg + '</p></div>');
     520                $('#imgedit-response-' + postid).html('<div class="updated"><p>' + ret.msg + '</p></div>');
    521521            }
    522522
  • trunk/src/js/media/views/frame/select.js

    r46354 r46355  
    6363     */
    6464    createStates: function() {
    65         console.log("test");
    66         this.on( 'content:render:edit-image', this.editState, this );
    6765        var options = this.options;
    6866
     
    7977                title:     options.title,
    8078                priority:  20
    81             }),
    82                 new wp.media.controller.EditImage( { model: this.options.editImage } ),
     79            })
    8380        ]);
    8481    },
  • trunk/src/wp-admin/css/edit.css

    r46354 r46355  
    654654.edit-form-section {
    655655    margin-bottom: 20px;
    656 }
    657 
    658 .wp_attachment_details .attachment-content-description {
    659     margin-top: 0.5385em;
    660     display: inline-block;
    661     min-height: 1.6923em;
    662656}
    663657
  • trunk/src/wp-admin/css/media.css

    r46354 r46355  
    801801}
    802802
    803 .attachment-details .setting + .description a:focus {
    804         /* Only visible in Windows High Contrast mode */
    805         outline: 1px solid transparent;
    806 }
    807 
    808803.wp_attachment_details .attachment-alt-text-description {
    809804    margin-top: 5px;
     
    11201115}
    11211116
    1122 .imgedit-settings .imgedit-original-dimensions {
    1123     display: inline-block;
    1124 }
    1125 
    11261117.imgedit-settings .imgedit-scale input[type="text"],
    11271118.imgedit-settings .imgedit-crop-ratio input[type="text"],
    11281119.imgedit-settings .imgedit-crop-sel input[type="text"] {
    1129     width: 80px;
     1120    width: 50px;
    11301121    font-size: 14px;
    11311122    padding: 5px 8px;
     
    11381129    font-size: 13px;
    11391130    color: #444;
    1140 }
    1141 
    1142 .imgedit-settings .imgedit-scale-button-wrapper {
    1143     margin-top: 0.3077em;
    1144     display: block;
    11451131}
    11461132
  • trunk/src/wp-admin/includes/image-edit.php

    r46354 r46355  
    3939    if ( $msg ) {
    4040        if ( isset( $msg->error ) ) {
    41             $note = "<div class='error' tabindex='-1' role='alert'><p>$msg->error</p></div>";
     41            $note = "<div class='error'><p>$msg->error</p></div>";
    4242        } elseif ( isset( $msg->msg ) ) {
    43             $note = "<div class='updated' tabindex='-1' role='alert'><p>$msg->msg</p></div>";
     43            $note = "<div class='updated'><p>$msg->msg</p></div>";
    4444        }
    4545    }
     
    6363                /* translators: %s: Image width and height in pixels. */
    6464                __( 'Original dimensions %s' ),
    65                 '<span class="imgedit-original-dimensions">' . $meta['width'] . ' &times; ' . $meta['height'] . '</span>'
     65                $meta['width'] . ' &times; ' . $meta['height']
    6666            );
    6767            ?>
     
    7979        <input type="text" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
    8080        <span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>">!</span>
    81         <div class="imgedit-scale-button-wrapper"><input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" /></div>
     81        <input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" />
    8282        </div>
    8383        </fieldset>
     
    236236
    237237        <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
    238         <img id="image-preview-<?php echo $post_id; ?>" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
     238        <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
    239239        </div>
    240240
  • trunk/src/wp-admin/includes/media.php

    r46354 r46355  
    32083208    ?>
    32093209
    3210     <label for="attachment_content" class="attachment-content-description"><strong><?php _e( 'Description' ); ?></strong>
     3210    <label for="attachment_content"><strong><?php _e( 'Description' ); ?></strong>
    32113211    <?php
    32123212
  • trunk/src/wp-admin/privacy.php

    • Property svn:mergeinfo deleted
  • trunk/src/wp-includes/css/editor.css

    r46354 r46355  
    13231323        /* .button-small is normally 11px, but a bit too small for these buttons. */
    13241324        font-size: 12px;
    1325         min-height: 26px;
     1325        height: 26px;
    13261326        line-height: 2;
    13271327    }
Note: See TracChangeset for help on using the changeset viewer.