diff --git a/zephyr/jstemplates/zephyr.html b/zephyr/jstemplates/zephyr.html index ef7eefa684..20a26adc0f 100644 --- a/zephyr/jstemplates/zephyr.html +++ b/zephyr/jstemplates/zephyr.html @@ -27,7 +27,9 @@
diff --git a/zephyr/models.py b/zephyr/models.py index 2eda1e4a4e..d2796f39b7 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -133,7 +133,8 @@ class Zephyr(models.Model): def to_dict(self): return {'id' : self.id, - 'sender' : self.sender.user.email, + 'sender' : self.sender.user.username, + 'sender_email' : self.sender.user.email, 'sender_name' : self.sender.full_name, 'type' : self.recipient.type_name(), 'display_recipient': get_display_recipient(self.recipient), diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 1213751b09..bf0a7c6989 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -229,7 +229,10 @@ function process_hotkey(code) { $("#new_personal_zephyr").focus(); $("#new_personal_zephyr").select(); } else if (zephyr_personal !== '') { - var recipient = parent.find("span.zephyr_sender").text(); + // Until we allow sending zephyrs based on multiple meaningful + // representations of a user (name, username, email, etc.), just + // deal with usernames. + var recipient = parent.find("span.zephyr_sender_username").text(); if (recipient === username) { // that is, we sent the original message recipient = parent.find("span.zephyr_personal_recipient").text(); } diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index 89a93b9f77..38a74b5d26 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -77,6 +77,10 @@ span.zephyr_sender_email { font-size: 80%; } +span.zephyr_sender_username { + visibility: hidden; +} + span.zephyr_label_clickable:hover { cursor: pointer; color: #08C;