Bhumi Thakkar (Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-bug-1095675-bth into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1095675-bth/+merge/141891

Hello,

  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.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1095675-bth/+merge/141891
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-1095675-bth.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css	2012-12-20 18:37:56 +0000
+++ addons/web/static/src/css/base.css	2013-01-04 11:04:25 +0000
@@ -2975,8 +2975,36 @@
   content: "}";
   color: #e0e0e0;
 }
-.openerp .oe_list_content .oe_list_field_progressbar progress {
-  width: 100%;
+.openerp .oe_list_progressbar_inner {
+  position: absolute;
+  top: 0;
+  left: 0;
+  border: 1px solid #aaaaaa;
+  background: #aaaaaa;
+  height: 100%;
+  margin-top: -1px;
+  margin-bottom: -1px;
+}
+.openerp .oe_list_progressbar_outer {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  border: 1px solid #aaaaaa;
+  background: #eeeeee;
+  border-radius: 3px;
+  font-size: 11px;
+}
+.openerp .oe_list_progressbar_outer progress {
+  position: absolute;
+  top: 0;
+  left: 0;
+  height: 100%;
+}
+.openerp .oe_list_progressbar_text {
+  position: relative;
+  text-align: center;
+  width: 100%;
+  height: 100%;
 }
 .openerp .tree_header {
   background-color: #f0f0f0;

=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass	2012-12-20 18:37:56 +0000
+++ addons/web/static/src/css/base.sass	2013-01-04 11:04:25 +0000
@@ -2339,8 +2339,34 @@
             .oe_list_handle
                 @include text-to-entypo-icon("}",#E0E0E0,18px)
                 margin-right: 7px
-        .oe_list_field_progressbar progress
-            width: 100%
+    .oe_list_progressbar_inner
+        position: absolute
+        top: 0
+        left: 0
+        border: 1px solid #AAA
+        background: #AAA
+        height: 100%
+        margin-top: -1px
+        margin-bottom: -1px
+    .oe_list_progressbar_outer
+        position: relative
+        width: 100%
+        height: 100%
+        border: 1px solid #AAA
+        background: #EEE
+        border-radius: 3px
+        font-size: 11px
+        progress
+            position: absolute
+            top: 0
+            left: 0
+            height: 100%
+            float:left
+    .oe_list_progressbar_text
+        position: relative
+        text-align: center
+        width: 100%
+        height: 100%
     // }}}
     // Tree view {{{
     .tree_header

=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js	2012-12-20 15:07:16 +0000
+++ addons/web/static/src/js/view_list.js	2013-01-04 11:04:25 +0000
@@ -2221,7 +2221,7 @@
      */
     _format: function (row_data, options) {
         return _.template(
-            '<progress value="<%-value%>" max="100"><%-value%>%</progress>', {
+            '<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>', {
                 value: _.str.sprintf("%.0f", row_data[this.id].value || 0)
             });
     }

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to