From 9e35ddc9f258028a537a693c46a9e8ef5cc94c01 Mon Sep 17 00:00:00 2001 From: Ben Palmer Date: Mon, 27 Mar 2017 16:39:00 +0100 Subject: [PATCH] Fix thick box bug in 4.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added wrapper for title and tabs on thick box so preview doesn’t appear underneath the crop tool --- assets/css/mic-admin.css | 15 +++++ lib/ManualImageCropEditorWindow.php | 92 +++++++++++++++-------------- 2 files changed, 62 insertions(+), 45 deletions(-) diff --git a/assets/css/mic-admin.css b/assets/css/mic-admin.css index 48e1bc5..0bb45f8 100644 --- a/assets/css/mic-admin.css +++ b/assets/css/mic-admin.css @@ -47,6 +47,21 @@ display: none; } +/* Add clearfix */ + +.mic-editor-header:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} + +.mic-editor-header { display: inline-block; } +* html .mic-editor-header { height: 1%; } +.mic-editor-header { display: block; } + .mic-editor-wrapper h2 .nav-tab { font-size: 16px; padding: 4px; diff --git a/lib/ManualImageCropEditorWindow.php b/lib/ManualImageCropEditorWindow.php index 812d8ce..9b60c01 100644 --- a/lib/ManualImageCropEditorWindow.php +++ b/lib/ManualImageCropEditorWindow.php @@ -27,59 +27,61 @@ public function renderWindow() { $sizesSettings = MicSettingsPage::getSettings(); ?>
-

- -

-

+ +

+ + // Get user defined label for the size or just cleanup a bit + $label = isset($sizeLabels[$s]) ? $sizeLabels[$s] : ucfirst( str_replace( '-', ' ', $s ) ); + $label = $sizesSettings[$s]['label'] ? $sizesSettings[$s]['label'] : $label; + echo '' . $label . ''; + } + ?> + +