summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-02-08 17:42:29 +0100
committerThibault Delavallée <tde@openerp.com>2012-02-08 17:42:29 +0100
commit5363de0632070e03d91efccab4a4930ffbdd5bbc (patch)
tree0044305a20db73dc3ae1c2b73cae4be77072253a
parenta80f887e5b6dfbc43ed3d62da51a177effdef378 (diff)
[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
-rw-r--r--addons/mail/mail_group_view.xml19
-rw-r--r--addons/mail/mail_message_view.xml5
-rw-r--r--addons/mail/mail_subscription_view.xml5
-rw-r--r--addons/mail/mail_thread_view.xml29
-rw-r--r--addons/mail/static/src/js/mail.js18
-rw-r--r--addons/mail/static/src/xml/mail.xml3
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 @@
<field name="view_mode">kanban,tree,form</field>
</record>
- <!-- toplevel menu -->
- <menuitem id="mail_group" name="Feeds" action="action_view_groups"/>
-
- <!-- left-side menu: Feeds !-->
- <menuitem id="mg_feeds" name="Feeds" parent="mail_group" action="action_view_mytweets"/>
- <menuitem id="mg_feeds_my" name="My feeds" parent="mg_feeds" action="action_view_mytweets"/>
- <menuitem id="mg_feeds_all" name="All feeds" parent="mg_feeds" action="action_view_tweets"/>
-
- <!-- left-side menu: Groups !-->
- <menuitem id="mg_groups" name="Groups" parent="mail_group" action="action_view_groups"/>
- <menuitem id="mg_groups_all" name="All groups" parent="mg_groups" action="action_view_groups"/>
-
- <!-- left-side menu: Tmp !-->
- <menuitem id="mg_tmp" name="Tmp" parent="mail_group" action="action_view_all_message"/>
- <!-- left-side Tmp: temporary Messages link to create a message !-->
- <menuitem id="mg_msg" name="Messages" parent="mg_tmp" action="action_view_all_message"/>
- <!-- left-side Tmp: temporary Groups link to see groups !-->
- <menuitem id="mg_groups_tmp" name="Groups" parent="mg_tmp" action="action_view_groups"/>
-
</data>
</openerp> \ 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" />
+ <record id="action_mail_all_feeds" model="ir.actions.client">
+ <field name="name">(w)All Feeds</field>
+ <field name="tag">mail.all_feeds</field>
+ </record>
+
</data>
</openerp>
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 @@
<field name="view_mode">tree,form</field>
</record>
- <!-- left-side Tmp: temporary Subscriptions link to see subscriptions !-->
- <menuitem id="mg_sub" name="Subscriptions" parent="mg_tmp" action="action_view_subscriptions"/>
- <!-- left-side Tmp: temporary Notifications link to see notifications !-->
- <menuitem id="mg_notif" name="Pushed notif" parent="mg_tmp" action="action_view_notifications"/>
-
</data>
</openerp> \ 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 @@
<field name="act_window_id" ref="action_view_mailgate_thread"/>
</record>
- <act_window
+ <!-- toplevel menu -->
+ <menuitem id="mail_feeds_main" name="Feeds" action="action_view_groups"/>
+
+ <!-- left-side menu: Feeds !-->
+ <menuitem id="mail_feeds" name="Feeds" parent="mail_feeds_main"/>
+ <menuitem id="mail_myfeeds" name="My feeds" parent="mail_feeds" action="action_view_mytweets"/>
+ <menuitem id="mail_allfeeds" name="All feeds" parent="mail_feeds" action="action_view_tweets"/>
+<!-- <menuitem id="mail_wallfeeds" name="(w)All feeds" parent="mail_feeds" action="action_mail_all_feeds"/>-->
+ <record id="mail_wallfeeds" model="ir.ui.menu">
+ <field name="name">(w)All Feeds</field>
+ <field name="sequence" eval="20"/>
+ <field name="action" ref="action_mail_all_feeds"/>
+ <field name="parent_id" ref="mail_feeds"/>
+ </record>
+
+ <!-- left-side menu: Groups !-->
+ <menuitem id="mail_groups" name="Groups" parent="mail_feeds_main"/>
+ <menuitem id="mail_allgroups" name="All groups" parent="mail_groups" action="action_view_groups"/>
+ <!-- left-side menu: Tmp !-->
+ <menuitem id="mail_debug" name="Debug/Tmp" parent="mail_feeds_main"/>
+ <menuitem id="mail_debug_msgs" name="Messages" parent="mail_debug" action="action_view_all_message"/>
+ <menuitem id="mail_debug_groups" name="Groups" parent="mail_debug" action="action_view_groups"/>
+ <menuitem id="mail_debug_subs" name="Subscriptions" parent="mail_debug" action="action_view_subscriptions"/>
+ <menuitem id="mail_debug_notifs" name="Pushed notif" parent="mail_debug" action="action_view_notifications"/>
+
+<!-- <act_window
context="{}"
domain="[('res_model', '=', active_model), ('res_id', '=', active_id)]"
id="act_thread_see_followers"
@@ -58,7 +83,7 @@
res_model="mail.subscription"
src_model="mail.thread"
view_mode="tree,form"
- view_type="form"/>
+ view_type="form"/>-->
</data>
</openerp>
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 @@
</p>
</div>
</t>
+
+ <div t-name="WallView" class="oe_mail_wall">
+ </div>
</template> \ No newline at end of file