From 48564fa823b12e3ed398a88310f14e5922b1b830 Mon Sep 17 00:00:00 2001
From: Anthony Burchell
Date: Mon, 30 Sep 2019 17:11:14 +0000
Subject: [PATCH] Media: Revert [46354] preventing bad clipping of text in
image details page.
See #47115.
git-svn-id: https://develop.svn.wordpress.org/trunk@46355 602fd350-edb4-49c9-b593-d223f7449a82
---
src/js/_enqueues/lib/image-edit.js | 4 ++--
src/js/media/views/frame/select.js | 5 +----
src/wp-admin/css/edit.css | 6 ------
src/wp-admin/css/media.css | 16 +---------------
src/wp-admin/includes/image-edit.php | 10 +++++-----
src/wp-admin/includes/media.php | 2 +-
src/wp-includes/css/editor.css | 2 +-
7 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/src/js/_enqueues/lib/image-edit.js b/src/js/_enqueues/lib/image-edit.js
index 9c7c841eba..100f26e7e0 100644
--- a/src/js/_enqueues/lib/image-edit.js
+++ b/src/js/_enqueues/lib/image-edit.js
@@ -503,7 +503,7 @@
// If a response is returned, close the editor and show an error.
if ( ret.error ) {
- $('#imgedit-response-' + postid).html('');
+ $('#imgedit-response-' + postid).html('');
imageEdit.close(postid);
return;
}
@@ -517,7 +517,7 @@
}
if ( ret.msg ) {
- $('#imgedit-response-' + postid).html('');
+ $('#imgedit-response-' + postid).html('');
}
if ( self._view ) {
diff --git a/src/js/media/views/frame/select.js b/src/js/media/views/frame/select.js
index fd5a8512d2..5cb4a5402d 100644
--- a/src/js/media/views/frame/select.js
+++ b/src/js/media/views/frame/select.js
@@ -62,8 +62,6 @@ Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype
* Create the default states on the frame.
*/
createStates: function() {
- console.log("test");
- this.on( 'content:render:edit-image', this.editState, this );
var options = this.options;
if ( this.options.states ) {
@@ -78,8 +76,7 @@ Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype
multiple: options.multiple,
title: options.title,
priority: 20
- }),
- new wp.media.controller.EditImage( { model: this.options.editImage } ),
+ })
]);
},
diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css
index bfe2ac8347..81eb38a585 100644
--- a/src/wp-admin/css/edit.css
+++ b/src/wp-admin/css/edit.css
@@ -655,12 +655,6 @@ form#tags-filter {
margin-bottom: 20px;
}
-.wp_attachment_details .attachment-content-description {
- margin-top: 0.5385em;
- display: inline-block;
- min-height: 1.6923em;
-}
-
/* Suggested text for privacy policy */
.wp-privacy-policy-guide {
max-width: 1000px;
diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css
index e567807169..b2b640de9e 100644
--- a/src/wp-admin/css/media.css
+++ b/src/wp-admin/css/media.css
@@ -800,11 +800,6 @@ border color while dragging a file over the uploader drop area */
margin-bottom: 5px;
}
-.attachment-details .setting + .description a:focus {
- /* Only visible in Windows High Contrast mode */
- outline: 1px solid transparent;
-}
-
.wp_attachment_details .attachment-alt-text-description {
margin-top: 5px;
}
@@ -1119,14 +1114,10 @@ span.imgedit-scale-warn {
padding: 10px;
}
-.imgedit-settings .imgedit-original-dimensions {
- display: inline-block;
-}
-
.imgedit-settings .imgedit-scale input[type="text"],
.imgedit-settings .imgedit-crop-ratio input[type="text"],
.imgedit-settings .imgedit-crop-sel input[type="text"] {
- width: 80px;
+ width: 50px;
font-size: 14px;
padding: 5px 8px;
}
@@ -1139,11 +1130,6 @@ span.imgedit-scale-warn {
color: #444;
}
-.imgedit-settings .imgedit-scale-button-wrapper {
- margin-top: 0.3077em;
- display: block;
-}
-
.imgedit-settings .imgedit-scale .button {
margin-bottom: 0;
}
diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php
index 39bc44975a..d474f8498b 100644
--- a/src/wp-admin/includes/image-edit.php
+++ b/src/wp-admin/includes/image-edit.php
@@ -38,9 +38,9 @@ function wp_image_editor( $post_id, $msg = false ) {
if ( $msg ) {
if ( isset( $msg->error ) ) {
- $note = "";
+ $note = "";
} elseif ( isset( $msg->msg ) ) {
- $note = "";
+ $note = "";
}
}
@@ -62,7 +62,7 @@ function wp_image_editor( $post_id, $msg = false ) {
printf(
/* translators: %s: Image width and height in pixels. */
__( 'Original dimensions %s' ),
- '' . $meta['width'] . ' × ' . $meta['height'] . ''
+ $meta['width'] . ' × ' . $meta['height']
);
?>
@@ -78,7 +78,7 @@ function wp_image_editor( $post_id, $msg = false ) {
!
- , 'scale')" class="button button-primary" value="" />
+ , 'scale')" class="button button-primary" value="" />
@@ -235,7 +235,7 @@ function wp_image_editor( $post_id, $msg = false ) {
-
+
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 6987acb166..61c4dac627 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -3207,7 +3207,7 @@ function edit_form_image_editor( $post ) {
?>
-