Skip to content

Commit

Permalink
styles for group filters. #10
Browse files Browse the repository at this point in the history
  • Loading branch information
furti committed Sep 14, 2014
1 parent bb6ec81 commit 4bee09e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
6 changes: 4 additions & 2 deletions ng-dashboard-0.0.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@
}
});
},
template: '<h3 ng-if="groupData.title">{{groupData.title}}</h3>' +
'<filter filter-data="groupFilter" crossfilter="crossFilter" ng-repeat="groupFilter in groupData.filters"></filter>'
template: '<div class="widget-group-header">' +
'<h3 ng-if="groupData.title">{{groupData.title}}</h3>' +
'<filter filter-data="groupFilter" ng-class="groupFilter.type" class="group-filter" crossfilter="crossFilter" ng-repeat="groupFilter in groupData.filters"></filter>' +
'</div>'
};
}
]);
Expand Down
2 changes: 1 addition & 1 deletion ng-dashboard-0.0.1.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sample/script/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
dataUrl: './sample/data/data.json',
filters: [{
title: 'Experiments',
allTitle: 'All',
type: 'select',
dimension: 'd.Expt'
}],
Expand Down
2 changes: 1 addition & 1 deletion script/filters/select-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

var template = '<label>{{filterData.title}}</label>' +
'<select ng-model="selected" ng-options="value for value in values" ng-change="filterChanged()">' +
'<option value=""></option>' +
'<option value="">{{filterData.allTitle}}</option>' +
'</select>';

function SelectFilter() {}
Expand Down
6 changes: 4 additions & 2 deletions script/widget-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@
}
});
},
template: '<h3 ng-if="groupData.title">{{groupData.title}}</h3>' +
'<filter filter-data="groupFilter" crossfilter="crossFilter" ng-repeat="groupFilter in groupData.filters"></filter>'
template: '<div class="widget-group-header">' +
'<h3 ng-if="groupData.title">{{groupData.title}}</h3>' +
'<filter filter-data="groupFilter" ng-class="groupFilter.type" class="group-filter" crossfilter="crossFilter" ng-repeat="groupFilter in groupData.filters"></filter>' +
'</div>'
};
}
]);
Expand Down
19 changes: 19 additions & 0 deletions style/ng-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,28 @@
padding: 20px;
display: block;
}
.widget-group-header {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.widget-group-header h3 {
margin-top: 0;
margin-bottom: 0;
margin-right: 20px;
}
widget-body {
display: block;
overflow: auto;
}
/**
* Filters
*/

.group-filter.select label {
margin-right: 5px;
margin-bottom: 0;
}
/**
* Flow Layout
*/
Expand All @@ -20,6 +38,7 @@ widget-body {
/**
* Grid Layout
*/

@media (min-width: 768px) {
.widget-group-grid {
display: flex;
Expand Down

0 comments on commit 4bee09e

Please sign in to comment.