Relax 80-char limit on status messages (/me).

(imported from commit e9de2cb6c394f5b764e988e279f0fb3cfd38c6e8)
This commit is contained in:
Steve Howell 2013-11-12 11:21:58 -05:00 committed by Allen Rabinovich
parent 2074573fe2
commit ee28e5e2f6
3 changed files with 18 additions and 20 deletions

View File

@ -1077,17 +1077,16 @@ just a temporary hack.
top: -2px;
}
.sender_name.sender-status {
top: 3px;
.sender-status {
display: block;
margin-left: 35px;
margin-top: -24px;
padding-bottom: 20px;
}
.sender-status {
display: inline-block;
vertical-align: top;
position: relative;
top: 3px;
height: 20px;
padding-bottom: 20px;
.sender-status .sender_name {
font-weight: bold;
position: static;
}
.sender_name_hovered .sender_name {
@ -3605,4 +3604,4 @@ div.edit_bot {
html {
overflow-x: hidden;
}
}
}

View File

@ -175,18 +175,18 @@
<div class="message_top_line">
<div class="unread_marker"></div>
{{#include_sender}}
<span class="message_sender sender_info_hover">
<span class="message_sender{{^status_message}} sender_info_hover{{/status_message}}">
{{! See ../js/notifications.js for another user of avatar_url. }}
<div class="inline_profile_picture"
<div class="inline_profile_picture{{#status_message}} sender_info_hover{{/status_message}}"
style="background-image: url('{{small_avatar_url}}');"/>
<span class="sender_name {{#if status_message}}sender-status{{/if}}">
{{sender_full_name}}
</span>
{{#if status_message}}
<span class="sender-status">
<span class="{{^status_message}}sender_name{{/status_message}}{{#status_message}}sender-status{{/status_message}}">
{{#unless status_message}}
{{sender_full_name}}
{{else}}
<span class="sender_name sender_info_hover">{{sender_full_name}}</span>
{{{ status_message }}}
{{/unless}}
</span>
{{/if}}
</span>
{{/include_sender}}
<span class="message_time">{{timestr}}</span>

View File

@ -530,8 +530,7 @@ class Message(models.Model):
# (no paragraph tag) and do special rendering. We might eventually
# want to handle this with a flag, but it's a bit tough to deliver the
# flag through all code paths, given the current code structure.
if content.startswith('/me ') and len(content) < 80 and \
rendered_content == '<p>%s</p>' % (content,):
if content.startswith('/me ') and rendered_content == '<p>%s</p>' % (content,):
return content
return rendered_content