Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #254 from grtjn/develop
Browse files Browse the repository at this point in the history
Refinements for #246
  • Loading branch information
grtjn committed Jan 26, 2016
2 parents 5815f86 + 83d7131 commit 9d1ee4e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
4 changes: 2 additions & 2 deletions data/config/quick-filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
}
},
{
"label":"Create in last 3 months",
"equery":"{\"range-query\":{\"type\":\"dateTime\",\"json-property\":\"lastModifiedAt\",\"value\":new Date(new Date().setMonth(new Date().getMonth()-3)),\"range-operator\":\"GE\"}}"
"label":"Created in last 3 months",
"equery":"{\"range-query\":{\"type\":\"dateTime\",\"json-property\":\"createdAt\",\"value\":new Date(new Date().setMonth(new Date().getMonth()-3)),\"range-operator\":\"GE\"}}"
}
]
}
7 changes: 7 additions & 0 deletions deploy/ml-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@
<range-value-positions>false</range-value-positions>
</range-element-index>

<range-element-index>
<scalar-type>dateTime</scalar-type>
<namespace-uri/>
<localname>createdAt</localname>
<range-value-positions>false</range-value-positions>
</range-element-index>

</range-element-indexes>
<range-element-attribute-indexes>
<!--
Expand Down
11 changes: 7 additions & 4 deletions ui/app/search/search.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<div class="row">
<div class="col-sm-2">
<div class="row facet-list">
<div class="col-sm-12 facet" ng-repeat="q in model.quick">
<label class="checkbox-inline restricted">
<input type="checkbox" name="q.label" ng-model="q.checked" ng-change="addQuery()"><a ng-click="q.checked = !q.checked; addQuery();">{{ q.label }}</a>
</label>
<div class="col-sm-12 facet primary-facet">
<h3>Refine By</h3>
<div ng-repeat="q in model.quick">
<label class="checkbox-inline restricted">
<input type="checkbox" name="q.label" ng-model="q.checked" ng-change="addQuery()"><a ng-click="q.checked = !q.checked; addQuery();">{{ q.label }}</a>
</label>
</div>
</div>
</div>
<div class="row">
Expand Down
17 changes: 15 additions & 2 deletions ui/app/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ footer .text-muted {
}
}
/* Facets*/
.facet.primary-facet {
h3, div, a {
color: #d9534f;
}
h3 {
border-bottom-color: #d9534f;
}
}
.facet-selected {
font-weight: bold;
background-color: #d9534f !important;
Expand All @@ -341,11 +349,16 @@ footer .text-muted {
background: #fff;
padding: 5px;
}
.facet > :nth-child(2) {
.facet > div:nth-child(2),
.facet > div:nth-child(3) {
border-top-right-radius: 5px;
border-top-left-radius: 5px;
}
.facet > :last-child {
.facet.primary-facet > div:nth-child(3) {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.facet > div:last-child {
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
Expand Down

0 comments on commit 9d1ee4e

Please sign in to comment.