From 5363de0632070e03d91efccab4a4930ffbdd5bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 8 Feb 2012 17:42:29 +0100 Subject: [PATCH] [ADD] Added menu entry for the wall; refactored menu name, ids and code in files; added js definition for the wall bzr revid: tde@openerp.com-20120208164229-esmg4pv5qjn8s8o1 --- addons/mail/mail_group_view.xml | 19 ----------------- addons/mail/mail_message_view.xml | 5 +++++ addons/mail/mail_subscription_view.xml | 5 ----- addons/mail/mail_thread_view.xml | 29 ++++++++++++++++++++++++-- addons/mail/static/src/js/mail.js | 18 ++++++++++++++-- addons/mail/static/src/xml/mail.xml | 3 +++ 6 files changed, 51 insertions(+), 28 deletions(-) diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index 7c409b9cdfd..28da6a31be9 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -63,24 +63,5 @@ kanban,tree,form - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index b4a297bbbcd..4ccf7d44323 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -227,5 +227,10 @@ parent="base.menu_email" action="action_view_mail_message" /> + + (w)All Feeds + mail.all_feeds + + diff --git a/addons/mail/mail_subscription_view.xml b/addons/mail/mail_subscription_view.xml index 2850cd206a1..56ffad1bcfc 100644 --- a/addons/mail/mail_subscription_view.xml +++ b/addons/mail/mail_subscription_view.xml @@ -52,10 +52,5 @@ tree,form - - - - - \ No newline at end of file diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index 8b2ae76824d..7bd503b0546 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -50,7 +50,32 @@ - + + + + + + + + + (w)All Feeds + + + + + + + + + + + + + + + + diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 4157aef5a33..184f4fbada5 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1,13 +1,14 @@ openerp.mail = function(session) { var mail = session.mail = {}; - + + /* Add ThreadView widget to registry */ session.web.form.widgets.add( 'ThreadView', 'openerp.mail.ThreadView'); session.web.page.readonly.add( 'ThreadView', 'openerp.mail.ThreadView'); - /* ThreadView Widget: thread of comments */ + /* ThreadView widget: thread of comments */ mail.ThreadView = session.web.form.Field.extend({ // QWeb template to use when rendering the object template: 'ThreadView', @@ -86,6 +87,19 @@ openerp.mail = function(session) { }, }); + /* Add WallView widget to registry */ + session.web.client_actions.add('mail.all_feeds', 'session.mail.WallView'); + + /* WallView widget: a wall of messages */ + mail.WallView = session.web.Widget.extend({ + // QWeb template to use when rendering the object + template: 'WallView', + + init: function() { + this._super.apply(this, arguments); + alert('Cacaboudin !!'); + }, + }); }; // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 376e8042a06..e9895ce4c7b 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -35,5 +35,8 @@

+ +
+
\ No newline at end of file