mirror of https://github.com/zulip/zulip.git
upload widget: Rename image upload widget delete text CSS class.
Previously, image upload widget delete text CSS class name was `settings-page-delete-text`. We can change the CSS class name to `image-delete-text` so that the name can be more generic.
This commit is contained in:
parent
90cb72b103
commit
ad0ff10598
|
@ -44,20 +44,19 @@ exports.build_user_avatar_widget = function (upload_function) {
|
|||
return $("#user-avatar-upload-widget .image_file_input").expectOne();
|
||||
};
|
||||
|
||||
if (page_params.avatar_source === 'G') {
|
||||
if (page_params.avatar_source === "G") {
|
||||
$("#user-avatar-upload-widget .image-delete-button").hide();
|
||||
$("#user-avatar-source").show();
|
||||
} else {
|
||||
$("#user-avatar-source").hide();
|
||||
}
|
||||
|
||||
|
||||
$("#user-avatar-upload-widget .image-delete-button").on('click keydown', (e) => {
|
||||
$("#user-avatar-upload-widget .image-delete-button").on("click keydown", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
channel.del({
|
||||
url: "/json/users/me/avatar",
|
||||
success () {
|
||||
success() {
|
||||
$("#user-avatar-upload-widget .image-delete-button").hide();
|
||||
$("#user-avatar-source").show();
|
||||
// Need to clear input because of a small edge case
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
.image-delete-button:hover ~ .settings-page-delete-text {
|
||||
.image-delete-button:hover ~ .image-delete-text {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.settings-page-delete-text {
|
||||
.image-delete-text {
|
||||
color: hsl(0, 0%, 100%);
|
||||
font-size: 0.85rem;
|
||||
position: absolute;
|
||||
|
@ -126,7 +126,7 @@
|
|||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.settings-page-delete-text {
|
||||
.image-delete-text {
|
||||
top: 90px;
|
||||
right: 40px;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@
|
|||
border-radius: 5px;
|
||||
box-shadow: 0px 0px 10px hsla(0, 0%, 0%, 0.1);
|
||||
|
||||
.settings-page-delete-text {
|
||||
.image-delete-text {
|
||||
top: 40px;
|
||||
right: 18px;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@
|
|||
margin: 0px 80px 0px 20px;
|
||||
|
||||
.settings-page-upload-text,
|
||||
.settings-page-delete-text {
|
||||
.image-delete-text {
|
||||
top: 17px;
|
||||
right: 80px;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<span class="image-delete-button" aria-label="{{ delete_text }}" role="button" tabindex="0">
|
||||
×
|
||||
</span>
|
||||
<span class="settings-page-delete-text" aria-label="{{ delete_text }}" tabindex="0">
|
||||
<span class="image-delete-text" aria-label="{{ delete_text }}" tabindex="0">
|
||||
{{ delete_text }}
|
||||
</span>
|
||||
<span class="settings-page-upload-text" aria-label="{{ upload_text }}" role="button" tabindex="0">
|
||||
|
|
Loading…
Reference in New Issue