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
@toggleFilter($(event.currentTarget))
@reloadActivities()
$(".dash-projects-filter").keyup ->
$(".dash-filter").keyup ->
terms = $(this).val()
uiBox = $(this).parents('.ui-box').first()
if terms == "" || terms == undefined
$(".dash-projects-list li").show()
uiBox.find(".dash-list li").show()
else
$(".dash-projects-list li").each (index) ->
uiBox.find(".dash-list li").each (index) ->
name = $(this).find(".well-title").text()
if name.search(terms) == -1
if name.toLowerCase().search(terms.toLowerCase()) == -1
$(this).hide()
else
$(this).show()
......
......@@ -7,7 +7,9 @@
@extend .pull-right;
.ui-box {
margin: 3px;
margin: 0px;
box-shadow: none;
> .title {
padding: 2px 15px;
}
......@@ -28,7 +30,6 @@
}
}
}
@extend .ui-box;
}
}
}
......@@ -47,7 +48,7 @@
}
.dashboard {
.dash-projects-filter {
.dash-filter {
margin: 0;
padding: 4px 6px;
width: 202px;
......@@ -58,7 +59,29 @@
}
@media (max-width: 1200px) {
.dashboard .dash-projects-filter {
.dashboard .dash-filter {
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 @@
.event-note {
color: #555;
margin-top: 5px;
margin-left: 40px;
margin-left: 35px;
pre {
border: none;
......@@ -95,7 +95,7 @@
}
}
ul {
margin-left: 50px;
margin-left: 35px;
margin-bottom: 5px;
.avatar {
width: 18px;
......
.ui-box
%h5.title
Groups
%span.light
(#{groups.count})
%h5.title.clearfix
= search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter'
- if current_user.can_create_group?
%span.pull-right
= link_to new_group_path, class: "btn btn-small" do
= link_to new_group_path, class: "btn" do
%i.icon-plus
New Group
%ul.well-list
%ul.well-list.dash-list
- groups.each do |group|
%li
= link_to group_path(id: group.path), class: dom_class(group) do
......
.ui-box
%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?
%span.pull-right
= link_to new_project_path, class: "btn" do
%i.icon-plus
New Project
%ul.well-list.dash-projects-list
%ul.well-list.dash-list
- projects.each do |project|
%li
= 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