Remove message id list from group divs

(imported from commit 620a219b5e11db79bfea971fe40deb09173deb10)
This commit is contained in:
Leo Franchi 2014-02-14 10:54:06 -05:00 committed by Jessica McKellar
parent 305cf30c50
commit f22885223f
3 changed files with 1 additions and 19 deletions

View File

@ -126,8 +126,6 @@ MessageListView.prototype = {
if (current_group.messages.length > 0) {
var first_message = current_group.messages[0];
current_group.message_ids = _.pluck(current_group.messages, 'id');
current_group.is_stream = first_message.is_stream;
current_group.is_private = first_message.is_private;
@ -682,20 +680,6 @@ MessageListView.prototype = {
var row = this._rows[old_id];
delete this._rows[old_id];
var prev_recipient_row = $(row).prev('.recipient_row');
if (prev_recipient_row.length > 0 &&
parseFloat(prev_recipient_row.attr('zid')) === old_id) {
prev_recipient_row.attr('zid', new_id);
var messages = prev_recipient_row.attr('data-messages').split();
var fixed_messages = _.map(messages, function (msgid) {
if (parseFloat(msgid) === old_id) {
return String(new_id);
}
});
prev_recipient_row.attr('data-messages', fixed_messages.join(" "));
}
row.setAttribute('zid', new_id);
row.setAttribute('id', this.table_name + new_id);
$(row).removeClass('local');

View File

@ -11,7 +11,7 @@
{{partial "bookend"}}
{{/if}}
<div class="recipient_row" data-messages="{{message_ids}}">
<div class="recipient_row">
{{#if is_stream}}
<div class="message_header message_header_stream right_part">
<div class="message-header-wrapper">

View File

@ -297,8 +297,6 @@ function render(template_name, args) {
var html = render('message_group', {message_groups: groups});
assert.equal($(html).next('.recipient_row').data('messages'), "1,2");
var first_message_text = $(html).next('.recipient_row').find('div.messagebox:first .message_content').text().trim();
assert.equal(first_message_text, "This is message one.");