From 389c2f9804332655da5ee8814c4fac5eb0979e09 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 10 Apr 2012 12:05:43 +0530 Subject: [PATCH] [IMP]:set bgcolor bzr revid: apa@tinyerp.com-20120410063543-kmw7fkbht8d7s3qe --- addons/project/project_view.xml | 10 +++++----- addons/project/static/src/js/project.js | 26 ++++++++++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index afceca516a9..c1cf4948b04 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -186,11 +186,11 @@
  • Delete
  • diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index f80e3b6d91c..9c2f546423e 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -38,22 +38,38 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); + console.log(this.$element.find('.steelblue')) - $('.steelblue').click(function(){ + this.$element.find('.bgcolor_steelblue').click(function(){ + console.log(this) $(this).closest('.oe_project_kanban_vignette').addClass(self.kanban_color(1)); + self.view.dataset.write(parseInt(this.id), {color:1},self.do_reload()); }); - $('.firebrick').click(function(){ + + this.$element.find('.bgcolor_firebrick').click(function(){ + console.log(this) $(this).closest('.oe_project_kanban_vignette').addClass(self.kanban_color(2)); + self.view.dataset.write(parseInt(this.id), {color:2},self.do_reload()); }); - $('.khaki').click(function(){ + + this.$element.find('.bgcolor_khaki').click(function(){ + console.log(this) $(this).closest('.oe_project_kanban_vignette').addClass(self.kanban_color(3)); + self.view.dataset.write(parseInt(this.id), {color:3},self.do_reload()); }); - $('.thistle').click(function(){ + + this.$element.find('.bgcolor_thistle').click(function(){ + console.log(this) $(this).closest('.oe_project_kanban_vignette').addClass(self.kanban_color(4)); + self.view.dataset.write(parseInt(this.id), {color:4},self.do_reload()); }); - $('.orange').click(function(){ + + this.$element.find('.bgcolor_orange').click(function(){ + console.log(this) $(this).closest('.oe_project_kanban_vignette').addClass(self.kanban_color(5)); + self.view.dataset.write(parseInt(this.id), {color:5},self.do_reload()); }); + }; self._super(); }