From 1702f7f802e065ba6478fad4d387430d0da27140 Mon Sep 17 00:00:00 2001 From: jagansivam28 Date: Tue, 21 Jul 2020 01:39:07 +0530 Subject: [PATCH] upload widget: Change image upload widget CSS class name. Previously, image upload widget CSS class name was `avatar-icon-logo-settings` it is not relevant to the widget so we can change the CSS class name to `image_upload_widget` so that the name can be more generic. --- static/js/upload_widget.js | 4 ++-- static/styles/image_upload_widget.scss | 2 +- static/templates/settings/image_upload_widget.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/upload_widget.js b/static/js/upload_widget.js index b4f26beaaa..41a8405c18 100644 --- a/static/js/upload_widget.js +++ b/static/js/upload_widget.js @@ -120,7 +120,7 @@ exports.build_direct_upload_widget = function ( max_file_upload_size = max_file_upload_size || default_max_file_size; function accept() { input_error.hide(); - const realm_logo_section = upload_button.closest(".avatar-icon-logo-settings"); + const realm_logo_section = upload_button.closest(".image_upload_widget"); if (realm_logo_section.attr("id") === "realm-night-logo-upload-widget") { upload_function(get_file_input(), true, false); } else if (realm_logo_section.attr("id") === "realm-day-logo-upload-widget") { @@ -154,7 +154,7 @@ exports.build_direct_upload_widget = function ( if (file.size > max_file_upload_size * 1024 * 1024) { input_error.text( i18n.t("File size must be < __max_file_size__Mb.", { - max_file_size: max_file_upload_size, + max_file_size: max_file_upload_size, }), ); input_error.show(); diff --git a/static/styles/image_upload_widget.scss b/static/styles/image_upload_widget.scss index 6e259cf799..5ff9c1fab9 100644 --- a/static/styles/image_upload_widget.scss +++ b/static/styles/image_upload_widget.scss @@ -1,5 +1,5 @@ /* common CSS for all image upload widget's */ -.avatar-icon-logo-settings { +.image_upload_widget { position: relative; border-radius: 5px; box-shadow: 0px 0px 10px hsla(0, 0%, 0%, 0.1); diff --git a/static/templates/settings/image_upload_widget.hbs b/static/templates/settings/image_upload_widget.hbs index b979db5174..0153478cbf 100644 --- a/static/templates/settings/image_upload_widget.hbs +++ b/static/templates/settings/image_upload_widget.hbs @@ -1,4 +1,4 @@ -
+
{{#if is_editable_by_current_user}}