message_fetch: function (replace_domain, replace_context, ids, callback) {
return this.ds_message.call('message_read', [
// ids force to read
- ids === false ? undefined : ids,
+ ids === false ? undefined : ids && ids.slice(0, this.options.fetch_limit),
// domain + additional
(replace_domain ? replace_domain : this.domain),
// ids allready loaded
// context + additional
(replace_context ? replace_context : this.context),
// parent_id
- this.context.default_parent_id || undefined
+ this.context.default_parent_id || undefined,
+ this.options.fetch_limit,
]).done(callback ? _.bind(callback, this, arguments) : this.proxy('switch_new_message')
).done(this.proxy('message_fetch_set_read'));
},
'compose_as_todo' : false,
'readonly' : false,
'emails_from_on_composer': true,
+ 'fetch_limit': 30 // limit of chatter messages
}, this.action.params);
this.action.params.help = this.action.help || false;
start: function (options) {
this._super.apply(this, arguments);
this.message_render();
- this.bind_events();
},
/**
},
- bind_events: function () {
- $(document).scroll( _.bind(this.thread.on_scroll, this.thread) );
- $(window).resize( _.bind(this.thread.on_scroll, this.thread) );
- this.$el.resize( _.bind(this.thread.on_scroll, this.thread) );
- window.setTimeout( _.bind(this.thread.on_scroll, this.thread), 500 );
- },
});
'show_compact_message': this.action.params.view_mailbox ? false : 1,
'view_inbox': false,
'emails_from_on_composer': false,
+ 'fetch_limit': 1000 // allow inbox to load all children messages
}, this.action.params);
},