diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 88e932299e1..81719794f69 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -66,6 +66,7 @@ The main features are: 'security/mail_security.xml', 'security/ir.model.access.csv', 'mail_data.xml', + 'mail_group_data.xml', 'res_users_view.xml', ], 'installable': True, diff --git a/addons/mail/mail_data.xml b/addons/mail/mail_data.xml index 964552b951a..c8e8b1a488e 100644 --- a/addons/mail/mail_data.xml +++ b/addons/mail/mail_data.xml @@ -1,7 +1,7 @@ - + Email Queue Manager 1 diff --git a/addons/mail/mail_group_data.xml b/addons/mail/mail_group_data.xml new file mode 100644 index 00000000000..bbaa7748f16 --- /dev/null +++ b/addons/mail/mail_group_data.xml @@ -0,0 +1,13 @@ + + + + + + All Company + + + Sales + + + + diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index 949dd1cc9b8..ea0dede377d 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -112,6 +112,6 @@ - + diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index 7389f8e5488..ecd106e05e5 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -234,7 +234,7 @@ - All Feeds + Wall mail.all_feeds diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index faa6d24ae2c..af0c6cedda1 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -14,7 +14,7 @@ - All Feeds + Wall diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv index c305de830c0..3cfd4e88f3d 100644 --- a/addons/mail/security/ir.model.access.csv +++ b/addons/mail/security/ir.model.access.csv @@ -1,7 +1,8 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_mail_message,mail.message,model_mail_message,base.group_user,1,1,1,1 +access_mail_message,mail.message,model_mail_message,,1,0,1,0 +access_mail_message_all,mail.message.all,model_mail_message,base.group_user,1,1,1,1 access_mail_thread,mail.thread,model_mail_thread,base.group_user,1,1,1,0 -access_mail_subscription,mail.subscription,model_mail_subscription,base.group_user,1,1,1,1 -access_mail_notification,mail.notification,model_mail_notification,base.group_user,1,1,1,1 +access_mail_subscription,mail.subscription,model_mail_subscription,,1,1,1,1 +access_mail_notification,mail.notification,model_mail_notification,,1,1,1,1 access_mail_group,mail.group,model_mail_group,base.group_user,1,1,1,1 -access_mail_message_report,mail.message.report,model_mail_message_report,base.group_user,1,0,0,0 +access_mail_message_report,mail.message.report,model_mail_message_report,,1,0,0,0 diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index d920455537f..260b4a230cd 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -4,17 +4,23 @@ div.oe_mail_wall { overflow: auto; - padding: 5px; + padding: 0; + background: white; } -div.oe_mail_wall_search { - width: 55%; +/*div.oe_mail_wall_search {*/ + /*width: 550px;*/ +/*}*/ + +.oe_mail_wall_button_comment { + float: right; } /* 2 columns view */ div.oe_mail_wall_left { float: left; - width: 65%; + width: 560px; + margin: 8px; } div.oe_mail_wall_right { @@ -22,6 +28,10 @@ div.oe_mail_wall_right { width: 34%; } +.oe_mail_wall_threads { + margin-top: 8px; +} + .oe_mail_wall_thread div.oe_mail_thread_act .oe_mail_action_textarea, div.oe_mail_thread_subthread .oe_mail_action_textarea { height: 20px; padding: 2px; @@ -47,16 +57,15 @@ div.oe_mail_wall_more { .oe_mail_recthread { overflow: auto; - padding: 5px 5px 5px 5px; } /* Left-side CSS */ .oe_mail_recthread_actions { - margin-bottom: 10px; + margin-bottom: 8px; } .oe_mail_recthread_followers { - margin-bottom: 10px; + margin-bottom: 8px; } .oe_mail_followers_action, .oe_mail_followers_display { @@ -70,21 +79,16 @@ div.oe_mail_wall_more { .oe_mail_recthread_right { float: right; - width: 25%; - margin-right: 5%; + width: 240px; } .oe_mail_button_follow, .oe_mail_button_unfollow { - width: 120px; + /*width: 120px;*/ } .oe_mail_button_followers { - display: inline; - width: 120px; -} - -.oe_mail_followers h4 { - margin: 0 0 8px; + display: inline-block; + width: 240px; } /* ------------------------------ */ @@ -99,7 +103,7 @@ div.oe_mail_thread_act { div.oe_mail_thread_display { white-space: normal; - margin-bottom: 5px; + /*margin-bottom: 5px;*/ } div.oe_mail_thread_subthread { @@ -116,8 +120,7 @@ li.oe_mail_thread_msg { padding: 1px; } -.notification, .email { - background: #E0E0E0; +.notification, .comment { padding: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -126,8 +129,16 @@ li.oe_mail_thread_msg { border-radius: 4px; } -.comment { - padding: 4px; +.oe_mail_thread_msg > .comment { + background: #eee; +} + +.oe_mail_thread_subthread .comment { + background: white; +} + +.notification { + background: #eee; } .notification:after, .email:after, .comment:after { @@ -215,6 +226,14 @@ input.oe_mail, textarea.oe_mail { border-radius: 3px; } +.oe_mail_wall .oe_mail_wall_act textarea { + width: 550px; +} + +textarea.oe_mail { + height: 60px; +} + input.oe_mail:focus, textarea.oe_mail:focus { outline: 0; border-color: rgba(82, 168, 236, 0.8); @@ -246,6 +265,10 @@ p.oe_mail_msg { font-weight: bold; } +.oe_mail_msg_reply, .oe_mail_msg_delete { + margin-right: 4px; +} + a.oe_mail_oe_intlink { color: #8786b7; } @@ -257,3 +280,11 @@ a.oe_mail_oe_intlink { .oe_mail_oe_space { margin-left: 15px; } + + + + +.oe_mail_recthread_actions button { + width: 120px; +} + diff --git a/addons/mail/static/src/img/groupdefault.png b/addons/mail/static/src/img/groupdefault.png index fd826837266..cf160022470 100644 Binary files a/addons/mail/static/src/img/groupdefault.png and b/addons/mail/static/src/img/groupdefault.png differ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index fbe817c2c81..dc6bd74c345 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -58,10 +58,8 @@ openerp.mail = function(session) { } /* Add ThreadDisplay widget to registry */ - session.web.form.widgets.add( - 'Thread', 'openerp.mail.Thread'); - session.web.page.readonly.add( - 'Thread', 'openerp.mail.Thread'); + session.web.form.widgets.add( 'Thread', 'openerp.mail.Thread'); + session.web.page.readonly.add( 'Thread', 'openerp.mail.Thread'); /** * ThreadDisplay widget: this widget handles the display of a thread of @@ -464,10 +462,8 @@ openerp.mail = function(session) { /* Add ThreadView widget to registry */ - session.web.form.widgets.add( - 'ThreadView', 'openerp.mail.RecordThread'); - session.web.page.readonly.add( - 'ThreadView', 'openerp.mail.RecordThread'); + session.web.form.widgets.add( 'ThreadView', 'openerp.mail.RecordThread'); + session.web.page.readonly.add( 'ThreadView', 'openerp.mail.RecordThread'); /* ThreadView widget: thread of comments */ mail.RecordThread = session.web.form.Field.extend({ @@ -489,9 +485,11 @@ openerp.mail = function(session) { // bind buttons this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }).hide(); this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); }) - .mouseover(function () { $(this).html('Follow'); }).mouseleave(function () { $(this).html('Not following'); }); + .mouseover(function () { $(this).html('Follow').addClass('following'); }) + .mouseleave(function () { $(this).html('Not following').removeClass('following'); }); this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); }) - .mouseover(function () { $(this).html('Unfollow'); }).mouseleave(function () { $(this).html('Following'); }); + .mouseover(function () { $(this).html('Unfollow').removeClass('following').addClass('unfollow'); }) + .mouseleave(function () { $(this).html('Following').removeClass('unfollow').addClass('following'); }); this.reinit(); }, @@ -642,7 +640,7 @@ openerp.mail = function(session) { load_search_view: function (view_id, defaults, hidden) { var self = this; this.searchview = new session.web.SearchView(this, this.ds_msg, view_id || false, defaults || {}, hidden || false); - var search_view_loaded = this.searchview.appendTo(this.$element.find('div.oe_mail_wall_search')); + var search_view_loaded = this.searchview.appendTo(this.$element.find('.oe_view_manager_row')); return $.when(search_view_loaded).then(function () { self.searchview.on_search.add(self.do_searchview_search); }); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 0f49902b6b3..d97f0738629 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -2,13 +2,17 @@