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 11d837620f
commit 3e62a793f7
2 changed files with 6 additions and 6 deletions

View File

@@ -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();

View File

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