summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-02-28 09:56:07 +0100
committerThibault Delavallée <tde@openerp.com>2012-02-28 09:56:07 +0100
commite291bf11da4540d5eb17824b59a2e85da0d6f3f4 (patch)
tree99ee79d1076ced198841337fab3d440c5fac2c1e /addons/mail/static/src
parenta32d9d7b892effd23fa8f99114624aecc0fbb892 (diff)
[DOC] Added comments in mailL.js (Wall widget)
bzr revid: tde@openerp.com-20120228085607-oty29x74cwxy6zdi
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/mail.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index a2d8a1faed1..156f6ff4590 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -297,7 +297,6 @@ openerp.mail = function(session) {
template: 'Wall',
/**
- *
* @param {Object} parent parent
* @param {Object} [params]
* @param {Number} [params.limit=20] number of messages to show and fetch
@@ -334,7 +333,7 @@ openerp.mail = function(session) {
},
/**
- *
+ * Loads the mail.message search view
* @param {Number} view_id id of the search view to load
* @param {??} defaults ??
* @param {Boolean} hidden ??
@@ -343,7 +342,15 @@ openerp.mail = function(session) {
this.searchview = new session.web.SearchView(this, this.ds_msg, view_id || false, defaults || {}, hidden || false);
return this.searchview.appendTo(this.$element.find('div.oe_mail_wall_search'));
},
-
+
+ /**
+ * Aggregate the domains, contexts and groupbys in parameter
+ * with those from search form, and then calls fetch_comments
+ * to actually fetch comments
+ * @param {Array} domains
+ * @param {Array} contexts
+ * @param {Array} groupbys
+ */
do_searchview_search: function(domains, contexts, groupbys) {
var self = this;
this.rpc('/web/session/eval_domain_and_context', {
@@ -357,7 +364,14 @@ openerp.mail = function(session) {
self.fetch_comments(self.search['domain'], self.search['context']);
});
},
-
+
+ /**
+ * Fetches Wall comments (mail.thread.get_pushed_messages)
+ * @param {Array} domains
+ * @param {Array} contexts
+ * @param {Array} groupbys
+ * @param {Number} limit number of messages to fetch
+ */
fetch_comments: function (domain, context, offset, limit) {
var load_res = this.ds_thread.call('get_pushed_messages',
[[this.session.uid], limit = (limit || 100), offset = (offset || 0), domain = (domain || null), context = (context || null) ]).then(
@@ -366,7 +380,6 @@ openerp.mail = function(session) {
},
/**
- *
* @param {Array} records records to show in threads
*/
display_comments: function (records) {