From 3ef7f36ecedeba612fa6390895c2a4f5355efac2 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Sat, 14 Dec 2013 15:55:44 +0000 Subject: [PATCH] CSS and layout fixes for image uploader closes #1673 - dropzone icon doesn't appear when filestorage is false - proper cursor and no selection on icon - cleaned up some sass --- ghost/admin/assets/lib/uploader.js | 5 +++- ghost/admin/assets/sass/modules/global.scss | 27 ++++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ghost/admin/assets/lib/uploader.js b/ghost/admin/assets/lib/uploader.js index 039511a441..8c12cd84b7 100644 --- a/ghost/admin/assets/lib/uploader.js +++ b/ghost/admin/assets/lib/uploader.js @@ -193,7 +193,10 @@ } }); - $dropzone.append(''); + // Only show the toggle icon if there is a dropzone mode to go back to + if (settings.fileStorage !== false) { + $dropzone.append(''); + } $dropzone.find('a.image-upload').on('click', function () { $dropzone.find('.js-url').remove(); diff --git a/ghost/admin/assets/sass/modules/global.scss b/ghost/admin/assets/sass/modules/global.scss index 5e0ba73b1b..e43f172141 100644 --- a/ghost/admin/assets/sass/modules/global.scss +++ b/ghost/admin/assets/sass/modules/global.scss @@ -1333,7 +1333,6 @@ main { .image-url, .image-upload { - @include icon($i-link, 12px); line-height: 12px; padding: 10px; display: block; @@ -1342,7 +1341,21 @@ main { left: 0; color: $brown; text-decoration: none; + @include user-select(none); + + &:hover { + cursor: pointer; + } } + + .image-webcam { + @include icon($i-camera, 12px); + } + + .image-url { + @include icon($i-link, 12px); + } + .image-upload { @include icon($i-image, 12px); } @@ -1358,17 +1371,7 @@ main { margin: 0 0 0 10px; } - .image-webcam { - @include icon($i-camera, 12px); - line-height: 12px; - padding: 10px; - display: block; - position: absolute; - bottom: 0; - right: 0; - color: $brown; - text-decoration: none; - } + input { &.main{