From d0dba4cd6a0c51e9e224ac270e2d701208033488 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 9 Jan 2015 18:10:47 +0200 Subject: [PATCH 01/12] upload mail_wall_menu --- __init__.py | 1 + __openerp__.py | 17 ++++++++++++++++ mail_wall_menu_views.xml | 32 +++++++++++++++++++++++++++++++ models.py | 1 + static/src/css/mail_wall_menu.css | 21 ++++++++++++++++++++ static/src/js/mail_wall_menu.js | 14 ++++++++++++++ 6 files changed, 86 insertions(+) create mode 100644 __init__.py create mode 100644 __openerp__.py create mode 100644 mail_wall_menu_views.xml create mode 100644 models.py create mode 100644 static/src/css/mail_wall_menu.css create mode 100644 static/src/js/mail_wall_menu.js diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..bff786c --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +import models diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..7b4029b --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,17 @@ +{ + 'name' : 'Menu for widgets at Messaging section', + 'version' : '1.0.0', + 'author' : 'Ivan Yelizariev', + 'category' : 'Sale', + 'website' : 'https://it-projects.info', + 'description': """ +Module creates special menu at Messaging section to show only gamification-like blocks there. + +Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d + """, + 'depends' : ['mail'], + 'data':[ + 'mail_wall_menu_views.xml', + ], + 'installable': True +} diff --git a/mail_wall_menu_views.xml b/mail_wall_menu_views.xml new file mode 100644 index 0000000..5511b6f --- /dev/null +++ b/mail_wall_menu_views.xml @@ -0,0 +1,32 @@ + + + + + + + + Dashboard + mail.wall + { + 'default_model': 'res.users', + 'default_res_id': uid, + 'thread_model': 'res.partner', + 'needaction_menu_ref': ['mail.mail_tomefeeds', 'mail.mail_starfeeds'] + } + + + + + + + + + + diff --git a/models.py b/models.py new file mode 100644 index 0000000..d7d73c9 --- /dev/null +++ b/models.py @@ -0,0 +1 @@ +from openerp import api,models,fields diff --git a/static/src/css/mail_wall_menu.css b/static/src/css/mail_wall_menu.css new file mode 100644 index 0000000..011a409 --- /dev/null +++ b/static/src/css/mail_wall_menu.css @@ -0,0 +1,21 @@ +.openerp .oe_mail_wall .dashboard_only .oe_mail{ + display:none; +} + +.openerp .oe_mail_wall .dashboard_only .oe_mail_wall_aside{ + margin:0; + padding: 16px; + display: block; + position: static; + width:100%; +} + +.openerp .oe_mail_wall .dashboard_only .oe_mail_wall_aside .oe_gamification_challenge_list { + background-color:inherit; +} +.openerp .oe_mail_wall .dashboard_only .oe_goal{ + background-color: #ededf6; + width:280px; + float:left; + margin:5px; +} diff --git a/static/src/js/mail_wall_menu.js b/static/src/js/mail_wall_menu.js new file mode 100644 index 0000000..8d8046a --- /dev/null +++ b/static/src/js/mail_wall_menu.js @@ -0,0 +1,14 @@ +openerp.mail_wall_menu = function(instance){ + var QWeb = instance.web.qweb; + var _t = instance.web._t; + + instance.mail.Widget.include({ + start: function(){ + if (this.action.params.disable_thread){ + $('.oe_view_manager_body').addClass('dashboard_only'); + return; + } + this._super.apply(this, arguments) + } + }) +} \ No newline at end of file From 4835ebce5382f9f58e1f73304ea34311eb49f344 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 19 Jan 2015 20:01:17 +0200 Subject: [PATCH 02/12] [IMP] hide blocks in inbox --- mail_wall_menu_views.xml | 2 +- static/src/css/mail_wall_menu.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mail_wall_menu_views.xml b/mail_wall_menu_views.xml index 5511b6f..55496d5 100644 --- a/mail_wall_menu_views.xml +++ b/mail_wall_menu_views.xml @@ -1,7 +1,7 @@ -