Commit 2a0739010467030e8ea74d30b6188aa06444fa8c

Authored by Dmitriy Zaporozhets
1 parent c49dcbac

Remove unnecessary title. Fix graphs width for less then 1214px resolution

app/assets/javascripts/stat_graph_contributors_graph.js.coffee
... ... @@ -46,7 +46,11 @@ class window.ContributorsGraph
46 46  
47 47 class window.ContributorsMasterGraph extends ContributorsGraph
48 48 constructor: (@data) ->
49   - @width = 1100
  49 + if $(window).width() > 1214
  50 + @width = 1100
  51 + else
  52 + @width = 870
  53 +
50 54 @height = 125
51 55 @x = null
52 56 @y = null
... ... @@ -118,7 +122,11 @@ class window.ContributorsMasterGraph extends ContributorsGraph
118 122  
119 123 class window.ContributorsAuthorGraph extends ContributorsGraph
120 124 constructor: (@data) ->
121   - @width = 490
  125 + if $(window).width() > 1214
  126 + @width = 490
  127 + else
  128 + @width = 380
  129 +
122 130 @height = 130
123 131 @x = null
124 132 @y = null
... ...
app/assets/stylesheets/sections/stat_graph.scss
... ... @@ -14,27 +14,29 @@
14 14 font-size: 10px;
15 15 }
16 16  
17   -#contributors .person {
18   - &:nth-child(even) {
19   - float: right;
  17 +#contributors {
  18 + .contributors-list {
  19 + margin: 0 0 10px 0;
  20 + list-style: none;
  21 + padding: 0;
20 22 }
21   - float: left;
22   - margin-top: 10px;
23   -}
24 23  
25   -.contributors-list {
26   - margin: 0 0 10px 0;
27   - list-style: none;
28   - padding: 0;
29   -}
  24 + .person {
  25 + &:nth-child(even) {
  26 + float: right;
  27 + }
  28 + float: left;
  29 + margin-top: 10px;
  30 + }
30 31  
31   -#contributors .person .spark {
32   - display: block;
33   - background: #f3f3f3;
34   -}
  32 + .person .spark {
  33 + display: block;
  34 + background: #f3f3f3;
  35 + }
35 36  
36   -#contributors .person .area-contributor {
37   - fill: #f17f49;
  37 + .person .area-contributor {
  38 + fill: #f17f49;
  39 + }
38 40 }
39 41  
40 42 .selection rect {
... ...
app/views/projects/network/_head.html.haml
1   -%h3.page-title Project Network Graph
2   -
3 1 .clearfix
4 2 .pull-left
5 3 = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
... ...
features/steps/project/project_network_graph.rb
... ... @@ -3,7 +3,6 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
3 3 include SharedProject
4 4  
5 5 Then 'page should have network graph' do
6   - page.should have_content "Project Network Graph"
7 6 page.should have_selector ".graph"
8 7 end
9 8  
... ...