Fix inconsistent spacing in message actions popover.

This was implemented by changing the format of the popover from a list
to a table.

Fixes #3010.
This commit is contained in:
Mahim Goyal 2017-01-06 17:16:53 +05:30 committed by Tim Abbott
parent c36932d29e
commit 1f13a991f4
2 changed files with 64 additions and 43 deletions

View File

@ -2438,3 +2438,28 @@ button.topic_edit_cancel {
margin-top: 10px;
}
}
.nav-table a {
display: block;
}
.nav-table tr:hover {
text-decoration: none;
background-color: #eeeeee;
color: #0088cc;
}
.nav-table a:hover {
text-decoration: none;
color: #0088cc;
}
.nav-list-table a,
.nav-list .nav-header {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.ikon-style {
padding: 3px 15px;
}
.message-style {
padding: 3px 15px;
margin-left: -27px;
}

View File

@ -1,56 +1,52 @@
{{! Contents of the "message actions" popup }}
<ul class="nav nav-list actions_popover pull-right">
<li>
<a href="#" class="popover_edit_message" data-msgid="{{message.id}}">
{{! Can consider http://fontawesome.io/icon/file-code-o/ when we upgrade to font awesome 4.}}
<i class="{{#if use_edit_icon}}icon-vector-pencil{{else}}icon-vector-file-text-alt{{/if}}"></i> {{editability_menu_item}}
</a>
</li>
<table class="nav nav-list actions_popover pull-right nav-table nav-list-table">
<tr>
<td align="center"><a href="#" class="ikon-style popover_edit_message" data-msgid="{{message.id}}">{{! Can consider http://fontawesome.io/icon/file-code-o/ when we upgrade to font awesome 4.}}<i class="{{#if use_edit_icon}}icon-vector-pencil{{else}}icon-vector-file-text-alt{{/if}}"></i></a></td>
<td><a href="#" class="message-style popover_edit_message" data-msgid="{{message.id}}"> {{editability_menu_item}}</a></td>
</tr>
<li>
<a href="#" class="respond_button">
<i class="icon-vector-share-alt"></i> {{t "Reply" }}
</a>
</li>
<tr>
<td align="center"><a href="#" class="ikon-style respond_button"><i class="icon-vector-share-alt"></i></a></td>
<td><a href="#" class="respond_button message-style"> {{t "Reply" }}</a></td>
</tr>
<li>
<a href="#" class="popover_toggle_collapse" data-msgid="{{message.id}}">
<i class="{{#if message.collapsed}}icon-vector-plus{{else}}icon-vector-minus{{/if}}"></i>
{{#if message.collapsed}}{{t "Un-collapse" }}{{else}}{{t "Collapse" }}{{/if}}
</a>
</li>
<tr>
<td align="center"><a href="#" class="ikon-style popover_toggle_collapse" data-msgid="{{message.id}}"><i class="{{#if message.collapsed}}icon-vector-plus{{else}}icon-vector-minus{{/if}}"></i></a></td>
<td><a href="#" class="popover_toggle_collapse message-style" data-msgid="{{message.id}}">
{{#if message.collapsed}}{{t "Un-collapse" }}{{else}}{{t "Collapse" }}{{/if}}</a></td>
</tr>
{{#if can_mute_topic}}
<li>
<a href="#" class="popover_mute_topic" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
<i class="icon-vector-eye-close"></i>
{{#tr message}}Mute the topic <b>__subject__</b>{{/tr}}
</a>
</li>
<tr>
<td align="center"><a href="#" class="ikon-style popover_mute_topic" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
<i class="icon-vector-eye-close"></i></a></td>
<td><a href="#" class="popover_mute_topic message-style" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
{{#tr message}}Mute the topic <b>__subject__</b>{{/tr}}</a></td>
</tr>
{{/if}}
{{#if can_unmute_topic}}
<li>
<a href="#" class="popover_unmute_topic" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
<i class="icon-vector-eye-open"></i>
{{#tr message}}Unmute the topic <b>__subject__</b>{{/tr}}
</a>
</li>
<tr>
<td align="center"><a href="#" class="ikon-style popover_unmute_topic" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
<i class="icon-vector-eye-open"></i></a></td>
<td><a href="#" class="popover_unmute_topic message-style" data-msg-stream="{{message.stream}}" data-msg-topic="{{message.subject}}">
{{#tr message}}Unmute the topic <b>__subject__</b>{{/tr}}</a></td>
</tr>
{{/if}}
{{#if should_display_add_reaction_option}}
<li>
<a href="#" class="reaction_button" data-msgid="{{message.id}}">
<i class="icon-vector-smile"></i>
{{#tr message}}Add emoji reaction{{/tr}}
</a>
</li>
<tr>
<td align="center"><a href="#" class="ikon-style reaction_button" data-msgid="{{message.id}}">
<i class="icon-vector-smile"></i></a></td>
<td><a href="#" class="reaction_button message-style" data-msgid="{{message.id}}">{{#tr message}}Add emoji reaction{{/tr}}</a></td>
</tr>
{{/if}}
<li>
<a href="{{ conversation_time_uri }}" class="popover_narrow_by_conversation_and_time" data-msgid="{{message.id}}">
<i class="icon-vector-link"></i> {{t "Link to this conversation" }}
</a>
</li>
</ul>
<tr>
<td align="center"><a href="{{ conversation_time_uri }}" class="ikon-style popover_narrow_by_conversation_and_time ikon-style" data-msgid="{{message.id}}">
<i class="icon-vector-link"></i></a></td>
<td><a href="{{ conversation_time_uri }}" class="popover_narrow_by_conversation_and_time message-style" data-msgid="{{message.id}}">
{{t "Link to this conversation" }}</a></td>
</tr>
</table>