[IMP] web: field many2many_tags_email moved to mail addon

bzr revid: chm@openerp.com-20121106095619-bl7xg1bhubweetpo
This commit is contained in:
Christophe Matthieu 2012-11-06 10:56:19 +01:00
parent 03f8275cdc
commit 63a8970112
2 changed files with 24 additions and 16 deletions

View File

@ -89,6 +89,7 @@ Main Features
'static/lib/jquery.expander/jquery.expander.js', 'static/lib/jquery.expander/jquery.expander.js',
'static/src/js/mail.js', 'static/src/js/mail.js',
'static/src/js/mail_followers.js', 'static/src/js/mail_followers.js',
'static/src/js/many2many_tags_email.js',
], ],
'qweb': [ 'qweb': [
'static/src/xml/mail.xml', 'static/src/xml/mail.xml',

View File

@ -5,6 +5,7 @@ openerp.mail = function (session) {
var mail = session.mail = {}; var mail = session.mail = {};
openerp_mail_followers(session, mail); // import mail_followers.js openerp_mail_followers(session, mail); // import mail_followers.js
openerp_FieldMany2ManyTagsEmail(session); // import manyy2many_tags_email.js
/** /**
* ------------------------------------------------------------ * ------------------------------------------------------------
@ -1628,7 +1629,24 @@ openerp.mail = function (session) {
bind_events: function () { bind_events: function () {
var self=this; var self=this;
this.$(".oe_write_full").click(function(){ self.root.thread.compose_message.on_compose_fullmail(); }); this.$(".oe_write_full").click(function (event) {
event.stopPropagation();
var action = {
type: 'ir.actions.act_window',
res_model: 'mail.compose.message',
view_mode: 'form',
view_type: 'form',
action_from: 'mail.ThreadComposeMessage',
views: [[false, 'form']],
target: 'new',
context: {
'default_model': '',
'default_res_id': false,
'default_content_subtype': 'html',
},
};
session.client.action_manager.do_action(action);
});
this.$(".oe_write_onwall").click(function(){ self.root.thread.on_compose_message(); }); this.$(".oe_write_onwall").click(function(){ self.root.thread.on_compose_message(); });
} }
}); });
@ -1644,17 +1662,6 @@ openerp.mail = function (session) {
session.web.ComposeMessageTopButton = session.web.Widget.extend({ session.web.ComposeMessageTopButton = session.web.Widget.extend({
template:'mail.compose_message.button_top_bar', template:'mail.compose_message.button_top_bar',
init: function (parent, options) {
this._super.apply(this, options);
this.options = this.options || {};
this.options.domain = this.options.domain || [];
this.options.context = {
'default_model': false,
'default_res_id': 0,
'default_content_subtype': 'html',
};
},
start: function (parent, params) { start: function (parent, params) {
var self = this; var self = this;
this.$el.on('click', 'button', self.on_compose_message ); this.$el.on('click', 'button', self.on_compose_message );
@ -1671,11 +1678,11 @@ openerp.mail = function (session) {
action_from: 'mail.ThreadComposeMessage', action_from: 'mail.ThreadComposeMessage',
views: [[false, 'form']], views: [[false, 'form']],
target: 'new', target: 'new',
context: _.extend(this.options.context, { context: {
'default_model': this.context.default_model, 'default_model': '',
'default_res_id': this.context.default_res_id, 'default_res_id': false,
'default_content_subtype': 'html', 'default_content_subtype': 'html',
}), },
}; };
session.client.action_manager.do_action(action); session.client.action_manager.do_action(action);
}, },