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.
This commit is contained in:
Vishnu KS
2021-05-26 16:10:11 +05:30
committed by Tim Abbott
parent 9cb538b08f
commit 6af0e28e5d
2 changed files with 6 additions and 6 deletions

View File

@@ -266,7 +266,7 @@ export function initialize() {
$(".user-status-value").on("click", (e) => { $(".user-status-value").on("click", (e) => {
e.stopPropagation(); 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); $("input.user_status").val(user_status_value);
user_status_ui.toggle_clear_message_button(); user_status_ui.toggle_clear_message_button();
user_status_ui.update_button(); user_status_ui.update_button();

View File

@@ -157,11 +157,11 @@
</button> </button>
</div> </div>
<div class="user-status-options"> <div class="user-status-options">
<button type="button" class="button no-style user-status-value" data-user-status-value="In a meeting">In a meeting</button> <button type="button" class="button no-style user-status-value">In a meeting</button>
<button type="button" class="button no-style user-status-value" data-user-status-value="Commuting">Commuting</button> <button type="button" class="button no-style user-status-value">Commuting</button>
<button type="button" class="button no-style user-status-value" data-user-status-value="Out sick">Out sick</button> <button type="button" class="button no-style user-status-value">Out sick</button>
<button type="button" class="button no-style user-status-value" data-user-status-value="Vacationing">Vacationing</button> <button type="button" class="button no-style user-status-value">Vacationing</button>
<button type="button" class="button no-style user-status-value" data-user-status-value="Working remotely">Working remotely</button> <button type="button" class="button no-style user-status-value">Working remotely</button>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="button exit small rounded">Cancel</button> <button class="button exit small rounded">Cancel</button>