Commit ee6c5dbf authored by JC Brand's avatar JC Brand

Add overflow for very long bookmark names

parent 2691658f
...@@ -2168,15 +2168,21 @@ ...@@ -2168,15 +2168,21 @@
bottom: 10px; } bottom: 10px; }
#conversejs #controlbox .bookmarks-list { #conversejs #controlbox .bookmarks-list {
margin-top: 1em; } margin-top: 2em; }
#conversejs #controlbox .bookmarks-list .bookmarks-toggle { #conversejs #controlbox .bookmarks-list .bookmarks-toggle {
display: block; display: block;
font-weight: bold; font-weight: bold;
color: #818479; } color: #818479;
margin-bottom: 0.5em; }
#conversejs #controlbox .bookmarks-list .bookmarks li { #conversejs #controlbox .bookmarks-list .bookmarks li {
padding: 1em 1em; } padding: 0.3em 1em; }
#conversejs #controlbox .bookmarks-list .bookmarks li .open-room { #conversejs #controlbox .bookmarks-list .bookmarks li .open-room {
float: left; } display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 75%;
text-align: left; }
#conversejs #controlbox .bookmarks-list .bookmarks li .room-info { #conversejs #controlbox .bookmarks-list .bookmarks li .room-info {
float: right; } float: right; }
#conversejs #controlbox .bookmarks-list .bookmarks li .remove-bookmark { #conversejs #controlbox .bookmarks-list .bookmarks li .remove-bookmark {
......
#conversejs { #conversejs {
#controlbox { #controlbox {
.bookmarks-list { .bookmarks-list {
margin-top: 1em; margin-top: 2em;
.bookmarks-toggle { .bookmarks-toggle {
display: block; display: block;
font-weight: bold; font-weight: bold;
color: $text-color; color: $text-color;
margin-bottom: 0.5em;
} }
.bookmarks { .bookmarks {
li { li {
padding: 1em 1em; padding: 0.3em 1em;
.open-room { .open-room {
float: left; display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 75%;
text-align: left;
} }
.room-info { .room-info {
float: right; float: right;
......
...@@ -404,14 +404,18 @@ ...@@ -404,14 +404,18 @@
'autojoin': 'false', 'autojoin': 'false',
'jid': 'theplay@conference.shakespeare.lit' 'jid': 'theplay@conference.shakespeare.lit'
}).c('nick').t('JC').up().up() }).c('nick').t('JC').up().up()
.c('conference', {
'name': 'Bookmark with a very very long name that will be shortened',
'autojoin': 'false',
'jid': 'theplay@conference.shakespeare.lit'
}).c('nick').t('JC').up().up()
.c('conference', { .c('conference', {
'name': 'Another room', 'name': 'Another room',
'autojoin': 'false', 'autojoin': 'false',
'jid': 'another@conference.shakespeare.lit' 'jid': 'another@conference.shakespeare.lit'
}).c('nick').t('JC').up().up(); }).c('nick').t('JC').up().up();
converse.connection._dataRecv(test_utils.createRequest(stanza)); converse.connection._dataRecv(test_utils.createRequest(stanza));
expect(converse.bookmarks.models.length).toBe(2); expect($('#chatrooms ul.bookmarks li').length).toBe(3);
expect($('#chatrooms ul.bookmarks li').length).toBe(2);
}); });
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment