commit d0dba4cd6a0c51e9e224ac270e2d701208033488 Author: Ivan Yelizariev Date: Fri Jan 9 18:10:47 2015 +0200 upload mail_wall_menu 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