Commit 79e2a9dfe72fe0ac94c6b989abe469e45a01fd81
Committed by
Sergio Oliveira
1 parent
30100e16
Exists in
master
and in
39 other branches
Update charts and fix layout issues
Showing
4 changed files
with
12 additions
and
13 deletions
Show diff stats
src/accounts/templates/accounts/user_detail.html
@@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
8 | {% trans "Messages" as group_collabs %} | 8 | {% trans "Messages" as group_collabs %} |
9 | {% trans "Contributions" as type_collabs %} | 9 | {% trans "Contributions" as type_collabs %} |
10 | 10 | ||
11 | - {% include "doughnut-chart.html" with chart_data=type_count chart_div="collabs" name=type_collabs %} | ||
12 | - {% include "doughnut-chart.html" with chart_data=list_activity chart_div="collabs2" name=group_collabs %} | 11 | + {% include "doughnut-chart.html" with chart_data=type_count chart_canvas="collabs" name=type_collabs %} |
12 | + {% include "doughnut-chart.html" with chart_data=list_activity chart_canvas="collabs2" name=group_collabs %} | ||
13 | {% endblock %} | 13 | {% endblock %} |
14 | 14 | ||
15 | {% block main-content %} | 15 | {% block main-content %} |
@@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
102 | <div class="panel-body"> | 102 | <div class="panel-body"> |
103 | <div id="collabs"></div> | 103 | <div id="collabs"></div> |
104 | <div class="chart collabs"> | 104 | <div class="chart collabs"> |
105 | - <canvas width="270" height="270"></canvas> | 105 | + <canvas width="200" height="200"></canvas> |
106 | <p></p> | 106 | <p></p> |
107 | </div> | 107 | </div> |
108 | </div> | 108 | </div> |
@@ -117,7 +117,7 @@ | @@ -117,7 +117,7 @@ | ||
117 | </div> | 117 | </div> |
118 | <div class="panel-body"> | 118 | <div class="panel-body"> |
119 | <div class="chart collabs2"> | 119 | <div class="chart collabs2"> |
120 | - <canvas width="270" height="270"></canvas> | 120 | + <canvas width="200" height="200"></canvas> |
121 | <p></p> | 121 | <p></p> |
122 | </div> | 122 | </div> |
123 | </div> | 123 | </div> |
src/static/css/screen.css
@@ -440,9 +440,8 @@ span.highlighted { | @@ -440,9 +440,8 @@ span.highlighted { | ||
440 | 440 | ||
441 | .chart > p { | 441 | .chart > p { |
442 | text-align: center; | 442 | text-align: center; |
443 | - margin-top: 10px; | 443 | + line-height: 1.5em; |
444 | } | 444 | } |
445 | .chart > p > label { | 445 | .chart > p > label { |
446 | - margin: 0 3px; | ||
447 | - line-height: 2.5em; | 446 | + margin: 0 2px; |
448 | } | 447 | } |
src/templates/base.html
@@ -22,10 +22,6 @@ | @@ -22,10 +22,6 @@ | ||
22 | href="{{ STATIC_URL }}third-party/font-awesome/css/font-awesome.min.css" | 22 | href="{{ STATIC_URL }}third-party/font-awesome/css/font-awesome.min.css" |
23 | type="text/css" media="screen" /> | 23 | type="text/css" media="screen" /> |
24 | 24 | ||
25 | - {% if not is_mobile %} | ||
26 | - {% conversejs_static %} | ||
27 | - {% endif %} | ||
28 | - | ||
29 | <link rel="stylesheet" href="{{ STATIC_URL }}css/screen.css" | 25 | <link rel="stylesheet" href="{{ STATIC_URL }}css/screen.css" |
30 | type="text/css" media="screen" /> | 26 | type="text/css" media="screen" /> |
31 | 27 | ||
@@ -38,6 +34,10 @@ | @@ -38,6 +34,10 @@ | ||
38 | {% block head_js %}{% endblock %} | 34 | {% block head_js %}{% endblock %} |
39 | {% block head_css %}{% endblock %} | 35 | {% block head_css %}{% endblock %} |
40 | 36 | ||
37 | + {% if not is_mobile %} | ||
38 | + {% conversejs_static %} | ||
39 | + {% endif %} | ||
40 | + | ||
41 | {% endblock %} | 41 | {% endblock %} |
42 | </head> | 42 | </head> |
43 | 43 |
src/templates/doughnut-chart.html
@@ -12,7 +12,7 @@ $(function () { | @@ -12,7 +12,7 @@ $(function () { | ||
12 | var description = $('.{{ chart_canvas }} > p'); | 12 | var description = $('.{{ chart_canvas }} > p'); |
13 | var data = []; | 13 | var data = []; |
14 | 14 | ||
15 | - {% for option, value in type_count.items %} | 15 | + {% for option, value in chart_data.items %} |
16 | color = colors.shift(); | 16 | color = colors.shift(); |
17 | data.push( | 17 | data.push( |
18 | { | 18 | { |
@@ -23,7 +23,7 @@ $(function () { | @@ -23,7 +23,7 @@ $(function () { | ||
23 | } | 23 | } |
24 | ); | 24 | ); |
25 | description.append($('<label>') | 25 | description.append($('<label>') |
26 | - .addClass('label label-defaultj') | 26 | + .addClass('label label-default') |
27 | .css('background', color) | 27 | .css('background', color) |
28 | .append('{{ option }}') | 28 | .append('{{ option }}') |
29 | ); | 29 | ); |