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
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2013-01-15 10:21:41 +0000
+++ addons/web/static/src/css/base.css 2013-01-22 11:41:21 +0000
@@ -2986,8 +2986,36 @@
2986 content: "}";2986 content: "}";
2987 color: #e0e0e0;2987 color: #e0e0e0;
2988}2988}
2989.openerp .oe_list_content .oe_list_field_progressbar progress {2989.openerp .oe_list_progressbar_inner {
2990 width: 100%;2990 position: absolute;
2991 top: 0;
2992 left: 0;
2993 border: 1px solid #aaaaaa;
2994 background: #aaaaaa;
2995 height: 100%;
2996 margin-top: -1px;
2997 margin-bottom: -1px;
2998}
2999.openerp .oe_list_progressbar_outer {
3000 position: relative;
3001 width: 100%;
3002 height: 100%;
3003 border: 1px solid #aaaaaa;
3004 background: #eeeeee;
3005 border-radius: 3px;
3006 font-size: 11px;
3007}
3008.openerp .oe_list_progressbar_outer progress {
3009 position: absolute;
3010 top: 0;
3011 left: 0;
3012 height: 100%;
3013}
3014.openerp .oe_list_progressbar_text {
3015 position: relative;
3016 text-align: center;
3017 width: 100%;
3018 height: 100%;
2991}3019}
2992.openerp .tree_header {3020.openerp .tree_header {
2993 background-color: #f0f0f0;3021 background-color: #f0f0f0;
29943022
=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass 2013-01-15 10:21:41 +0000
+++ addons/web/static/src/css/base.sass 2013-01-22 11:41:21 +0000
@@ -2347,8 +2347,33 @@
2347 .oe_list_handle2347 .oe_list_handle
2348 @include text-to-entypo-icon("}",#E0E0E0,18px)2348 @include text-to-entypo-icon("}",#E0E0E0,18px)
2349 margin-right: 7px2349 margin-right: 7px
2350 .oe_list_field_progressbar progress2350 .oe_list_progressbar_inner
2351 width: 100%2351 position: absolute
2352 top: 0
2353 left: 0
2354 border: 1px solid #aaaaaa
2355 background: #aaaaaa
2356 height: 100%
2357 margin-top: -1px
2358 margin-bottom: -1px
2359 .oe_list_progressbar_outer
2360 position: relative
2361 width: 100%
2362 height: 100%
2363 border: 1px solid #aaaaaa
2364 background: #eeeeee
2365 border-radius: 3px
2366 font-size: 11px
2367 .oe_list_progressbar_outer progress
2368 position: absolute
2369 top: 0
2370 left: 0
2371 height: 100%
2372 .oe_list_progressbar_text
2373 position: relative
2374 text-align: center
2375 width: 100%
2376 height: 100%
2352 // }}}2377 // }}}
2353 // Tree view {{{2378 // Tree view {{{
2354 .tree_header2379 .tree_header
23552380
=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js 2013-01-03 14:46:51 +0000
+++ addons/web/static/src/js/view_list.js 2013-01-22 11:41:21 +0000
@@ -2236,7 +2236,7 @@
2236 */2236 */
2237 _format: function (row_data, options) {2237 _format: function (row_data, options) {
2238 return _.template(2238 return _.template(
2239 '<progress value="<%-value%>" max="100"><%-value%>%</progress>', {2239 '<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>', {
2240 value: _.str.sprintf("%.0f", row_data[this.id].value || 0)2240 value: _.str.sprintf("%.0f", row_data[this.id].value || 0)
2241 });2241 });
2242 }2242 }