From cb43134c3c6b0a2aaee37fc559e6f5e067e8ca0b Mon Sep 17 00:00:00 2001 From: "Sbh (Openerp)" Date: Tue, 3 Apr 2012 16:58:16 +0530 Subject: [PATCH 1/7] [ADD]: Add the fetuare of bold font in list view bzr revid: sbh@tinyerp.com-20120403112816-qccbdf3c4alh0k2g --- addons/web/static/src/js/view_list.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index e8fff450c6e..53f66f52d76 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -82,8 +82,13 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# } self.compute_aggregates(); }); - this.no_leaf = false; + var domain = [['res_model','=', this.model]]; + new openerp.web.DataSetSearch( + this, 'ir.needaction_users_rel', this.dataset.get_context(), domain) + .read_slice().done(function(result) { + self.needaction_ids = _.pluck(result, 'res_id'); + }) }, /** * Retrieves the view's number of records per page (|| section) @@ -154,16 +159,21 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# current_date: new Date().toString('yyyy-MM-dd') // TODO: time, datetime, relativedelta }); + var style= ''; + if(this.needaction_ids.indexOf(record.attributes.id) >= 0) { + style = 'font-weight: bold;'; + } for(var i=0, len=this.colors.length; i Date: Tue, 3 Apr 2012 17:19:16 +0530 Subject: [PATCH 2/7] [IMP] set user_id bzr revid: kjo@tinyerp.com-20120403114916-6eopf4c97ivk718p --- addons/web/static/src/js/view_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 53f66f52d76..bca01516d1a 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -83,7 +83,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# self.compute_aggregates(); }); this.no_leaf = false; - var domain = [['res_model','=', this.model]]; + var domain = [['res_model','=', this.model], ['user_id' , '=', this.session.uid]]; new openerp.web.DataSetSearch( this, 'ir.needaction_users_rel', this.dataset.get_context(), domain) .read_slice().done(function(result) { From b3c948adb0eda2f83ad62b86571d12839dbecb95 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Wed, 4 Apr 2012 11:45:29 +0530 Subject: [PATCH 3/7] [IMP] change the class name bzr revid: kjo@tinyerp.com-20120404061529-l4lg9s74mkqzphqs --- addons/web/static/src/js/view_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index bca01516d1a..6d95e2fa1ce 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -85,7 +85,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# this.no_leaf = false; var domain = [['res_model','=', this.model], ['user_id' , '=', this.session.uid]]; new openerp.web.DataSetSearch( - this, 'ir.needaction_users_rel', this.dataset.get_context(), domain) + this, 'ir.needaction_users', this.dataset.get_context(), domain) .read_slice().done(function(result) { self.needaction_ids = _.pluck(result, 'res_id'); }) From add39020a277778e7b32188d1bf33c7948c2682f Mon Sep 17 00:00:00 2001 From: "Sbh (Openerp)" Date: Wed, 4 Apr 2012 16:27:19 +0530 Subject: [PATCH 4/7] [REMOVE] remvoe the fetaure of bold record bzr revid: sbh@tinyerp.com-20120404105719-gmy5t4r7suedrz44 --- addons/web/static/src/js/view_list.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index e8fff450c6e..6d95e2fa1ce 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -82,8 +82,13 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# } self.compute_aggregates(); }); - this.no_leaf = false; + var domain = [['res_model','=', this.model], ['user_id' , '=', this.session.uid]]; + new openerp.web.DataSetSearch( + this, 'ir.needaction_users', this.dataset.get_context(), domain) + .read_slice().done(function(result) { + self.needaction_ids = _.pluck(result, 'res_id'); + }) }, /** * Retrieves the view's number of records per page (|| section) @@ -154,16 +159,21 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# current_date: new Date().toString('yyyy-MM-dd') // TODO: time, datetime, relativedelta }); + var style= ''; + if(this.needaction_ids.indexOf(record.attributes.id) >= 0) { + style = 'font-weight: bold;'; + } for(var i=0, len=this.colors.length; i Date: Wed, 4 Apr 2012 16:52:55 +0530 Subject: [PATCH 5/7] remove the feture of bold record bzr revid: sbh@tinyerp.com-20120404112255-hklhnejqh9s3y5d7 --- addons/web/static/src/js/view_list.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 6d95e2fa1ce..470c99c3ade 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -83,12 +83,6 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# self.compute_aggregates(); }); this.no_leaf = false; - var domain = [['res_model','=', this.model], ['user_id' , '=', this.session.uid]]; - new openerp.web.DataSetSearch( - this, 'ir.needaction_users', this.dataset.get_context(), domain) - .read_slice().done(function(result) { - self.needaction_ids = _.pluck(result, 'res_id'); - }) }, /** * Retrieves the view's number of records per page (|| section) @@ -159,21 +153,16 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# current_date: new Date().toString('yyyy-MM-dd') // TODO: time, datetime, relativedelta }); - var style= ''; - if(this.needaction_ids.indexOf(record.attributes.id) >= 0) { - style = 'font-weight: bold;'; - } for(var i=0, len=this.colors.length; i Date: Thu, 5 Apr 2012 15:42:54 +0530 Subject: [PATCH 6/7] [IMP]generated css using compiler sass bzr revid: sbh@tinyerp.com-20120405101254-35rtolfp7gjypaqg --- addons/web/static/src/css/base.css | 22 ++++++++++++++++++++++ addons/web/static/src/css/base.sass | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b0a2b7945b9..0554328c49e 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -220,6 +220,17 @@ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); -box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); } +.openerp2 .oe_secondary_submenu li .oe_menu_counter { + float: right; + background: #eeeeee; + color: #8a89ba; + font-weight: bold; + border-width: 1px; + padding-top: 2px; + padding-right: 4px; + padding-left: 4px; + border-radius: 2px; +} .openerp2 .oe_secondary_submenu .oe_active { background: #8a89ba; border-top: 1px solid lightGray; @@ -240,6 +251,17 @@ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } +.openerp2 .oe_secondary_submenu .oe_active .oe_menu_counter { + float: right; + background: #eeeeee; + color: #8a89ba; + font-weight: bold; + border-width: 1px; + padding-top: 2px; + padding-right: 4px; + padding-left: 4px; + border-radius: 2px; +} .openerp2 .oe_secondary_submenu .oe_menu_toggler:before { width: 0; height: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index c31f501c499..fda9e10a0f0 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -238,6 +238,16 @@ $colour4: #8a89ba text-shadow: 0 1px 1px rgba(0,0,0,0.2) @include radius(4px) @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2)) + .oe_menu_counter + float: right + background: #eeeeee + color: #8a89ba + font-weight: bold + border-width: 1px + padding-top: 2px + padding-right: 4px + padding-left: 4px + border-radius: 2px .oe_active background: $colour4 border-top: 1px solid lightGray @@ -251,6 +261,16 @@ $colour4: #8a89ba color: $colour4 text-shadow: 0 1px 1px white @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2)) + .oe_menu_counter + float: right + background: #eeeeee + color: #8a89ba + font-weight: bold + border-width: 1px + padding-top: 2px + padding-right: 4px + padding-left: 4px + border-radius: 2px .oe_menu_toggler:before width: 0 height: 0 From 00d70016c95d7c30cfb3c00d10c5164e01491631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 5 Apr 2012 18:11:48 +0200 Subject: [PATCH 7/7] [IMP] Improved css to match more closely MIT design. bzr revid: tde@openerp.com-20120405161148-wh0vpgwalmkxffjw --- addons/web/static/src/css/base.css | 27 +++++++++++---------------- addons/web/static/src/css/base.sass | 29 +++++++++++------------------ 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 0554328c49e..4b47762fc58 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -220,16 +220,18 @@ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); -box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); } -.openerp2 .oe_secondary_submenu li .oe_menu_counter { +.openerp2 .oe_secondary_submenu .oe_menu_counter { float: right; - background: #eeeeee; - color: #8a89ba; - font-weight: bold; - border-width: 1px; - padding-top: 2px; - padding-right: 4px; - padding-left: 4px; - border-radius: 2px; + background: #8a89ba; + color: #eeeeee; + font-size: 12px; + border: 1px solid lightgray; + padding: 0px 4px 0px 4px; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); + margin: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; } .openerp2 .oe_secondary_submenu .oe_active { background: #8a89ba; @@ -252,15 +254,8 @@ -box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } .openerp2 .oe_secondary_submenu .oe_active .oe_menu_counter { - float: right; background: #eeeeee; color: #8a89ba; - font-weight: bold; - border-width: 1px; - padding-top: 2px; - padding-right: 4px; - padding-left: 4px; - border-radius: 2px; } .openerp2 .oe_secondary_submenu .oe_menu_toggler:before { width: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index fda9e10a0f0..ba29a42b197 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -238,16 +238,16 @@ $colour4: #8a89ba text-shadow: 0 1px 1px rgba(0,0,0,0.2) @include radius(4px) @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2)) - .oe_menu_counter - float: right - background: #eeeeee - color: #8a89ba - font-weight: bold - border-width: 1px - padding-top: 2px - padding-right: 4px - padding-left: 4px - border-radius: 2px + .oe_menu_counter + float: right + background: #8a89ba + color: #eee + font-size: 12px + border: 1px solid lightgray + padding: 0px 4px 0px 4px + text-shadow: 0 1px 1px rgba(0,0,0,0.2) + margin: 0px + @include radius(4px) .oe_active background: $colour4 border-top: 1px solid lightGray @@ -262,15 +262,8 @@ $colour4: #8a89ba text-shadow: 0 1px 1px white @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2)) .oe_menu_counter - float: right - background: #eeeeee + background: #eee color: #8a89ba - font-weight: bold - border-width: 1px - padding-top: 2px - padding-right: 4px - padding-left: 4px - border-radius: 2px .oe_menu_toggler:before width: 0 height: 0