Fixed public room name and users count alignement

Put data into a table to ease layout and manage long strings
This commit is contained in:
Emmanuel ROHEE 2014-09-12 16:46:20 +02:00
parent 09a59ce2d3
commit a2cd942a95
2 changed files with 46 additions and 25 deletions

View File

@ -268,26 +268,38 @@ a:active { color: #000; }
font-weight: bold; font-weight: bold;
} }
.publicRoomEntry { .publicTable {
max-width: 480px; max-width: 480px;
margin-bottom: 5px; width: 100%;
border-bottom: 1px #ddd solid; border-collapse: collapse;
}
.publicTable tr {
width: 100%;
}
.publicTable td {
vertical-align: text-top;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.publicRoomEntry {
max-width: 430px;
} }
.publicRoomJoinedUsers { .publicRoomJoinedUsers {
float: right; width: 5em;
text-align: right;
font-size: 12px;
color: #888;
} }
.publicRoomTopic { .publicRoomTopic {
color: #888; color: #888;
font-size: 12px; font-size: 12px;
padding-right: 5px;
width: 15em;
float: right;
text-align: right;
overflow: hidden; overflow: hidden;
white-space: nowrap; padding-bottom: 5px;
text-overflow: ellipsis; border-bottom: 1px #ddd solid;
} }
#roomName { #roomName {

View File

@ -24,21 +24,30 @@
<h3>Public rooms</h3> <h3>Public rooms</h3>
<div class="public_rooms" ng-repeat="room in public_rooms | orderBy:'room_display_name'"> <table class="publicTable">
<div class="publicRoomEntry"> <tbody ng-repeat="room in public_rooms | orderBy:'room_display_name'"
<a href="#/room/{{ room.room_alias ? room.room_alias : room.room_id }}" class="publicRoomEntry"
ng-class="room.room_display_name.toLowerCase().indexOf('#matrix:') === 0 ? 'roomHighlight' : ''"> ng-class="room.room_display_name.toLowerCase().indexOf('#matrix:') === 0 ? 'roomHighlight' : ''">
<tr>
<td class="publicRoomEntry">
<a href="#/room/{{ room.room_alias ? room.room_alias : room.room_id }}" >
{{ room.room_display_name }} {{ room.room_display_name }}
</a> </a>
<div ng-class="room.room_display_name.toLowerCase().indexOf('#matrix:') === 0 ? 'publicRoomJoinedUsers roomHighlight' : 'publicRoomJoinedUsers'" </td>
<td>
<div class="publicRoomJoinedUsers"
ng-show="room.num_joined_members"> ng-show="room.num_joined_members">
{{ room.num_joined_members }} {{ room.num_joined_members == 1 ? 'user' : 'users' }} {{ room.num_joined_members }} {{ room.num_joined_members == 1 ? 'user' : 'users' }}
</div> </div>
<div class="publicRoomTopic" ng-show="room.topic"> </td>
</tr>
<tr>
<td colspan="2" class="publicRoomTopic">
{{ room.topic }} {{ room.topic }}
</div> </td>
</div> </tr>
</div> </tbody>
</table>
<br/> <br/>
<div> <div>