[IMP]remove unused method and improve code

bzr revid: sgo@tinyerp.com-20120831100318-t2e2wv81trwfpc7u
This commit is contained in:
Sanjay Gohel (Open ERP)
2012-08-31 15:33:18 +05:30
parent 5eed2be266
commit 90e55a5337
2 changed files with 4 additions and 8 deletions
+3 -3
View File
@@ -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:
+1 -5
View File
@@ -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(); })