From 3e62a793f76bdbec46a633e5b0fafa40a74a20f6 Mon Sep 17 00:00:00 2001 From: Vishnu KS Date: Wed, 26 May 2021 16:10:11 +0530 Subject: [PATCH] user status: Remove data attributes from user status options. I don't see any good reason why we have to store the status values in data attributes when they are already stored as the content of the buttons. --- static/js/click_handlers.js | 2 +- templates/zerver/app/index.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 00eac80381..966c3a1a36 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -271,7 +271,7 @@ export function initialize() { $(".user-status-value").on("click", (e) => { e.stopPropagation(); - const user_status_value = $(e.currentTarget).attr("data-user-status-value"); + const user_status_value = $(e.currentTarget).text(); $("input.user_status").val(user_status_value); user_status_ui.toggle_clear_message_button(); user_status_ui.update_button(); diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html index f82beef747..76c215658a 100644 --- a/templates/zerver/app/index.html +++ b/templates/zerver/app/index.html @@ -157,11 +157,11 @@
- - - - - + + + + +