[IMP]remove unused method and improve code
bzr revid: sgo@tinyerp.com-20120831100318-t2e2wv81trwfpc7u
This commit is contained in:
@@ -711,8 +711,8 @@ class mail_thread(osv.Model):
|
||||
return True
|
||||
|
||||
def message_subscribe_udpate_subtypes(self, cr, uid, ids, user_id, subtype_ids,context=None):
|
||||
subscription_obj = self.pool.get('mail.followers')
|
||||
subscription_ids = subscription_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids)])
|
||||
return subscription_obj.write(cr, uid, subscription_ids, {'subtype_ids': [(6, 0 , subtype_ids)]}, context = context) #overright or add new one
|
||||
followers_obj = self.pool.get('mail.followers')
|
||||
followers_ids = followers_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids)])
|
||||
return followers_obj.write(cr, uid, followers_ids, {'subtype_ids': [(6, 0 , subtype_ids)]}, context = context) #overright or add new one
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -40,11 +40,7 @@ openerp_mail_followers = function(session, mail) {
|
||||
this._check_visibility();
|
||||
this.fetch_subtype();
|
||||
this.$el.find('ul.oe_mail_recthread_subtype').click(function () {self.update_subtype();})
|
||||
this.$el.find('button.oe_mail_button_follow').click(function () {
|
||||
self.do_follow();
|
||||
self.fetch_subtype();
|
||||
})
|
||||
this.$el.find('button.oe_mail_button_follow').click(function () { self.do_follow(); })
|
||||
this.$el.find('button.oe_mail_button_follow').click(function () { self.do_follow(); self.fetch_subtype();})
|
||||
.mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); })
|
||||
.mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); });
|
||||
this.$el.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); })
|
||||
|
||||
Reference in New Issue
Block a user