Commit 44ac961b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

group filter from dashboard. Design improvements of dashboard

parent 3802ae0c
...@@ -8,15 +8,16 @@ class Dashboard ...@@ -8,15 +8,16 @@ class Dashboard
@toggleFilter($(event.currentTarget)) @toggleFilter($(event.currentTarget))
@reloadActivities() @reloadActivities()
$(".dash-projects-filter").keyup -> $(".dash-filter").keyup ->
terms = $(this).val() terms = $(this).val()
uiBox = $(this).parents('.ui-box').first()
if terms == "" || terms == undefined if terms == "" || terms == undefined
$(".dash-projects-list li").show() uiBox.find(".dash-list li").show()
else else
$(".dash-projects-list li").each (index) -> uiBox.find(".dash-list li").each (index) ->
name = $(this).find(".well-title").text() name = $(this).find(".well-title").text()
if name.search(terms) == -1 if name.toLowerCase().search(terms.toLowerCase()) == -1
$(this).hide() $(this).hide()
else else
$(this).show() $(this).show()
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
@extend .pull-right; @extend .pull-right;
.ui-box { .ui-box {
margin: 3px; margin: 0px;
box-shadow: none;
> .title { > .title {
padding: 2px 15px; padding: 2px 15px;
} }
...@@ -28,7 +30,6 @@ ...@@ -28,7 +30,6 @@
} }
} }
} }
@extend .ui-box;
} }
} }
} }
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
} }
.dashboard { .dashboard {
.dash-projects-filter { .dash-filter {
margin: 0; margin: 0;
padding: 4px 6px; padding: 4px 6px;
width: 202px; width: 202px;
...@@ -58,7 +59,29 @@ ...@@ -58,7 +59,29 @@
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.dashboard .dash-projects-filter { .dashboard .dash-filter {
width: 132px; width: 132px;
} }
} }
.dash-sidebar-tabs {
margin-bottom: 2px;
border: none;
margin: 0;
li {
&.active {
a {
@include linear-gradient(#f5f5f5, #eee);
border-bottom: 1px solid #EEE !important;
&:hover {
background: #eee;
}
}
}
a {
border-color: #CCC !important;
}
}
}
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
.event-note { .event-note {
color: #555; color: #555;
margin-top: 5px; margin-top: 5px;
margin-left: 40px; margin-left: 35px;
pre { pre {
border: none; border: none;
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
} }
ul { ul {
margin-left: 50px; margin-left: 35px;
margin-bottom: 5px; margin-bottom: 5px;
.avatar { .avatar {
width: 18px; width: 18px;
......
.ui-box .ui-box
%h5.title %h5.title.clearfix
Groups = search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter'
%span.light
(#{groups.count})
- if current_user.can_create_group? - if current_user.can_create_group?
%span.pull-right %span.pull-right
= link_to new_group_path, class: "btn btn-small" do = link_to new_group_path, class: "btn" do
%i.icon-plus %i.icon-plus
New Group New Group
%ul.well-list %ul.well-list.dash-list
- groups.each do |group| - groups.each do |group|
%li %li
= link_to group_path(id: group.path), class: dom_class(group) do = link_to group_path(id: group.path), class: dom_class(group) do
......
.ui-box .ui-box
%h5.title.clearfix %h5.title.clearfix
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-projects-filter' = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter'
- if current_user.can_create_project? - if current_user.can_create_project?
%span.pull-right %span.pull-right
= link_to new_project_path, class: "btn" do = link_to new_project_path, class: "btn" do
%i.icon-plus %i.icon-plus
New Project New Project
%ul.well-list.dash-projects-list %ul.well-list.dash-list
- projects.each do |project| - projects.each do |project|
%li %li
= link_to project_path(project), class: dom_class(project) do = link_to project_path(project), class: dom_class(project) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment