Merge lp:~openerp-dev/openerp-web/7.0-bug-1095675-bth into lp:openerp-web/7.0

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1095675-bth
Merge into: lp:openerp-web/7.0
Diff against target: 95 lines (+58/-5)
3 files modified
addons/web/static/src/css/base.css (+30/-2)
addons/web/static/src/css/base.sass (+27/-2)
addons/web/static/src/js/view_list.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1095675-bth
Reviewer Review Type Date Requested Status
Christophe Matthieu (OpenERP) (community) Disapprove
Review via email: mp+144288@code.launchpad.net

Description of the change

Hello,

  [Generic web]Fixed the issue of progressbar which not displayed percentage and displayed in different color based on browser.

To reproduced:
1. Go to Sales => Sales => Opportunities
2. Switch to list view
3. Only the coloured bar is visible (the column title suggest there should be numbers, representing percentages)

Screenshot:
https://docs.google.com/open?id=0B7c_6dPUa6bcZ0I1b3FTTHEzMGM

Used div tag because displayed in same color in each browser and should display percentage to identify number of progress(percentage) otherwise user could not identify how much progress.

Thanks.

To post a comment you must log in.
Revision history for this message
Christophe Matthieu (OpenERP) (chm-openerp) wrote :

Hi,
<progress/> is a progession item used in html5, don't use div to replace this field.
Thanks

review: Disapprove
Revision history for this message
Bhumi Thakkar (Open ERP) (bth-openerp) wrote :

Hi,

     progress element displayed only progreesbar not percentage so user could not identify how much progress is there so used div element to show progressbar with percentage. And progress element displayed in same color in each browser.

Thanks.

Unmerged revisions

3709. By Bhumi Thakkar (Open ERP)

[FIX] Fixed issue of progressbar displayed with percentage.--fixes:lp1095675

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/css/base.css'
2--- addons/web/static/src/css/base.css 2013-01-15 10:21:41 +0000
3+++ addons/web/static/src/css/base.css 2013-01-22 11:41:21 +0000
4@@ -2986,8 +2986,36 @@
5 content: "}";
6 color: #e0e0e0;
7 }
8-.openerp .oe_list_content .oe_list_field_progressbar progress {
9- width: 100%;
10+.openerp .oe_list_progressbar_inner {
11+ position: absolute;
12+ top: 0;
13+ left: 0;
14+ border: 1px solid #aaaaaa;
15+ background: #aaaaaa;
16+ height: 100%;
17+ margin-top: -1px;
18+ margin-bottom: -1px;
19+}
20+.openerp .oe_list_progressbar_outer {
21+ position: relative;
22+ width: 100%;
23+ height: 100%;
24+ border: 1px solid #aaaaaa;
25+ background: #eeeeee;
26+ border-radius: 3px;
27+ font-size: 11px;
28+}
29+.openerp .oe_list_progressbar_outer progress {
30+ position: absolute;
31+ top: 0;
32+ left: 0;
33+ height: 100%;
34+}
35+.openerp .oe_list_progressbar_text {
36+ position: relative;
37+ text-align: center;
38+ width: 100%;
39+ height: 100%;
40 }
41 .openerp .tree_header {
42 background-color: #f0f0f0;
43
44=== modified file 'addons/web/static/src/css/base.sass'
45--- addons/web/static/src/css/base.sass 2013-01-15 10:21:41 +0000
46+++ addons/web/static/src/css/base.sass 2013-01-22 11:41:21 +0000
47@@ -2347,8 +2347,33 @@
48 .oe_list_handle
49 @include text-to-entypo-icon("}",#E0E0E0,18px)
50 margin-right: 7px
51- .oe_list_field_progressbar progress
52- width: 100%
53+ .oe_list_progressbar_inner
54+ position: absolute
55+ top: 0
56+ left: 0
57+ border: 1px solid #aaaaaa
58+ background: #aaaaaa
59+ height: 100%
60+ margin-top: -1px
61+ margin-bottom: -1px
62+ .oe_list_progressbar_outer
63+ position: relative
64+ width: 100%
65+ height: 100%
66+ border: 1px solid #aaaaaa
67+ background: #eeeeee
68+ border-radius: 3px
69+ font-size: 11px
70+ .oe_list_progressbar_outer progress
71+ position: absolute
72+ top: 0
73+ left: 0
74+ height: 100%
75+ .oe_list_progressbar_text
76+ position: relative
77+ text-align: center
78+ width: 100%
79+ height: 100%
80 // }}}
81 // Tree view {{{
82 .tree_header
83
84=== modified file 'addons/web/static/src/js/view_list.js'
85--- addons/web/static/src/js/view_list.js 2013-01-03 14:46:51 +0000
86+++ addons/web/static/src/js/view_list.js 2013-01-22 11:41:21 +0000
87@@ -2236,7 +2236,7 @@
88 */
89 _format: function (row_data, options) {
90 return _.template(
91- '<progress value="<%-value%>" max="100"><%-value%>%</progress>', {
92+ '<div class="oe_list_progressbar_outer"><div class="oe_list_progressbar_inner" style="width: <%-value%>%;"></div><div class="oe_list_progressbar_text"><span><%-value%>%</span></div></div>', {
93 value: _.str.sprintf("%.0f", row_data[this.id].value || 0)
94 });
95 }