Commit 44ac961b8d7e07f794330b6e527c50b437923fb5

Authored by Dmitriy Zaporozhets
1 parent 3802ae0c

group filter from dashboard. Design improvements of dashboard

app/assets/javascripts/dashboard.js.coffee
@@ -8,15 +8,16 @@ class Dashboard @@ -8,15 +8,16 @@ class Dashboard
8 @toggleFilter($(event.currentTarget)) 8 @toggleFilter($(event.currentTarget))
9 @reloadActivities() 9 @reloadActivities()
10 10
11 - $(".dash-projects-filter").keyup -> 11 + $(".dash-filter").keyup ->
12 terms = $(this).val() 12 terms = $(this).val()
  13 + uiBox = $(this).parents('.ui-box').first()
13 if terms == "" || terms == undefined 14 if terms == "" || terms == undefined
14 - $(".dash-projects-list li").show() 15 + uiBox.find(".dash-list li").show()
15 else 16 else
16 - $(".dash-projects-list li").each (index) -> 17 + uiBox.find(".dash-list li").each (index) ->
17 name = $(this).find(".well-title").text() 18 name = $(this).find(".well-title").text()
18 19
19 - if name.search(terms) == -1 20 + if name.toLowerCase().search(terms.toLowerCase()) == -1
20 $(this).hide() 21 $(this).hide()
21 else 22 else
22 $(this).show() 23 $(this).show()
app/assets/stylesheets/sections/dashboard.scss
@@ -7,7 +7,9 @@ @@ -7,7 +7,9 @@
7 @extend .pull-right; 7 @extend .pull-right;
8 8
9 .ui-box { 9 .ui-box {
10 - margin: 3px; 10 + margin: 0px;
  11 + box-shadow: none;
  12 +
11 > .title { 13 > .title {
12 padding: 2px 15px; 14 padding: 2px 15px;
13 } 15 }
@@ -28,7 +30,6 @@ @@ -28,7 +30,6 @@
28 } 30 }
29 } 31 }
30 } 32 }
31 - @extend .ui-box;  
32 } 33 }
33 } 34 }
34 } 35 }
@@ -47,7 +48,7 @@ @@ -47,7 +48,7 @@
47 } 48 }
48 49
49 .dashboard { 50 .dashboard {
50 - .dash-projects-filter { 51 + .dash-filter {
51 margin: 0; 52 margin: 0;
52 padding: 4px 6px; 53 padding: 4px 6px;
53 width: 202px; 54 width: 202px;
@@ -58,7 +59,29 @@ @@ -58,7 +59,29 @@
58 } 59 }
59 60
60 @media (max-width: 1200px) { 61 @media (max-width: 1200px) {
61 - .dashboard .dash-projects-filter { 62 + .dashboard .dash-filter {
62 width: 132px; 63 width: 132px;
63 } 64 }
64 } 65 }
  66 +
  67 +.dash-sidebar-tabs {
  68 + margin-bottom: 2px;
  69 + border: none;
  70 + margin: 0;
  71 +
  72 + li {
  73 + &.active {
  74 + a {
  75 + @include linear-gradient(#f5f5f5, #eee);
  76 + border-bottom: 1px solid #EEE !important;
  77 + &:hover {
  78 + background: #eee;
  79 + }
  80 + }
  81 + }
  82 +
  83 + a {
  84 + border-color: #CCC !important;
  85 + }
  86 + }
  87 +}
app/assets/stylesheets/sections/events.scss
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 .event-note { 51 .event-note {
52 color: #555; 52 color: #555;
53 margin-top: 5px; 53 margin-top: 5px;
54 - margin-left: 40px; 54 + margin-left: 35px;
55 55
56 pre { 56 pre {
57 border: none; 57 border: none;
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 } 95 }
96 } 96 }
97 ul { 97 ul {
98 - margin-left: 50px; 98 + margin-left: 35px;
99 margin-bottom: 5px; 99 margin-bottom: 5px;
100 .avatar { 100 .avatar {
101 width: 18px; 101 width: 18px;
app/views/dashboard/_groups.html.haml
1 .ui-box 1 .ui-box
2 - %h5.title  
3 - Groups  
4 - %span.light  
5 - (#{groups.count}) 2 + %h5.title.clearfix
  3 + = search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter'
6 - if current_user.can_create_group? 4 - if current_user.can_create_group?
7 %span.pull-right 5 %span.pull-right
8 - = link_to new_group_path, class: "btn btn-small" do 6 + = link_to new_group_path, class: "btn" do
9 %i.icon-plus 7 %i.icon-plus
10 New Group 8 New Group
11 - %ul.well-list 9 + %ul.well-list.dash-list
12 - groups.each do |group| 10 - groups.each do |group|
13 %li 11 %li
14 = link_to group_path(id: group.path), class: dom_class(group) do 12 = link_to group_path(id: group.path), class: dom_class(group) do
app/views/dashboard/_projects.html.haml
1 .ui-box 1 .ui-box
2 %h5.title.clearfix 2 %h5.title.clearfix
3 - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-projects-filter' 3 + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter'
4 - if current_user.can_create_project? 4 - if current_user.can_create_project?
5 %span.pull-right 5 %span.pull-right
6 = link_to new_project_path, class: "btn" do 6 = link_to new_project_path, class: "btn" do
7 %i.icon-plus 7 %i.icon-plus
8 New Project 8 New Project
9 9
10 - %ul.well-list.dash-projects-list 10 + %ul.well-list.dash-list
11 - projects.each do |project| 11 - projects.each do |project|
12 %li 12 %li
13 = link_to project_path(project), class: dom_class(project) do 13 = link_to project_path(project), class: dom_class(project) do