Commit c2a36e62 authored by Maxim's avatar Maxim
Browse files

Update panel background

parent c7092da7
......@@ -449,6 +449,7 @@ filter.download-dwca=Download ZIP
filter.download-mcpd=Download MCPD
filter.add=Refine search by category
filter.additional=Refine search by trait
filter.additional-traits=Select traits
filter.apply=Apply
filter.close=Close
filter.remove=Remove filter
......
......@@ -2020,7 +2020,7 @@ h2.short {
}
span.glyphicon.glyphicon-menu-down {
html[dir="ltr"] & {
right: 1px;
right: 17px;
}
html[dir="rtl"] & {
left: 1px;
......@@ -2050,6 +2050,7 @@ h2.short {
color: #2b2924;
font-family: $heading-font-family;
display: inline-block;
padding: 0 15px;
width: 100%;
}
}
......@@ -2092,6 +2093,7 @@ h2.short {
display: block;
border-radius: 4px;
color: $white-color;
margin-left: 15px;
}
}
#collapseFilters .panel-body .panel-group .panel-default .panel-body {
......@@ -2125,6 +2127,7 @@ h2.short {
font-size: 14px;
border: none;
display: block;
//margin-left: 15px;
}
.removeFilterBtn {
background-color: #bebaa9;
......@@ -2133,6 +2136,7 @@ h2.short {
border: none;
display: block;
color: #fff;
//margin-right: 15px;
}
.filtval.complex {
display: inline-block;
......@@ -2143,6 +2147,7 @@ h2.short {
color: #918a6a;
position: relative;
margin-bottom: 10px;
//margin-left: 15px;
&:after {
font-family: 'FontAwesome';
content: "\f00d";
......@@ -2192,6 +2197,16 @@ h2.short {
}
}
}
#panel_additional{
.panel-collapse, .panel-heading {
background: #F2EEE2;
}
& > .panel-heading {
background: #E6E0C6;
}
}
}
.filters > .panel-group {
margin-bottom: 0;
......
......@@ -38,79 +38,79 @@
<div id="panel_<c:out value="${normalizedKey}" />_collapse" class="panel-collapse collapse">
<div class="panel-body">
<div id="collapse_filt_<c:out value="${normalizedKey}" />" class="<c:out value="${normalizedKey}" />">
<div id="collapse_filt_<c:out value="${normalizedKey}" />" class="<c:out value="${normalizedKey}" /> col-xs-12">
<c:choose>
<c:when test="${filter.filterType=='LIST'}">
<c:forEach items="${filter.options}" var="option" varStatus="i">
<div class="checkbox-wrapper">
<label>
<c:set var="filterVal" value=""/>
<c:forEach items="${filters[appliedFilter.key]}" var="optionVal">
<c:if test="${optionVal eq option.value}">
<c:set var="filterVal" value="${option.value}"/>
</c:if>
</c:forEach>
<input class="filter-list"
id="<c:out value="${normalizedKey}${option.value}" />_input" ${(filterVal eq option.value)?'checked':''}
norm-key="<c:out value="${normalizedKey}" />"
i-key="<c:out value="${filter.key}" />" type="checkbox"
value="${option.value}"/>
<spring:message code="${option.name}"/>
(${empty option.count ? 0: option.count})
</label>
</div>
</c:forEach>
</c:when>
<c:when test="${filter.filterType=='I18NLIST'}">
<div class="">
<c:forEach items="${filter.options}" var="option">
<div>
<c:choose>
<c:when test="${filter.filterType=='LIST'}">
<c:forEach items="${filter.options}" var="option" varStatus="i">
<div class="checkbox-wrapper">
<label>
<c:set var="filterVal" value=""/>
<c:forEach items="${filters[appliedFilter.key]}" var="optionVal">
<c:if test="${optionVal eq option.value}">
<c:set var="filterVal" value="${option.value}"/>
</c:if>
</c:forEach>
<input class="filter-list"
id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filters[appliedFilter.key], option.value)?'checked':''}
id="<c:out value="${normalizedKey}${option.value}" />_input" ${(filterVal eq option.value)?'checked':''}
norm-key="<c:out value="${normalizedKey}" />"
i-key="<c:out value="${filter.key}" />" type="checkbox"
value="${option.value}"/>
<spring:message code="${option.name}"/>
(${empty option.count ? 0: option.count})
</label>
</div>
</c:forEach>
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="null">
<spring:message
code="boolean.null"/>
</label>
</c:when>
<c:when test="${filter.filterType=='I18NLIST'}">
<div class="">
<c:forEach items="${filter.options}" var="option">
<div>
<label>
<input class="filter-list"
id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filters[appliedFilter.key], option.value)?'checked':''}
norm-key="<c:out value="${normalizedKey}" />"
i-key="<c:out value="${filter.key}" />" type="checkbox"
value="${option.value}"/>
<spring:message code="${option.name}"/>
</label>
</div>
</c:forEach>
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="null">
<spring:message
code="boolean.null"/>
</label>
</div>
</div>
</div>
</c:when>
<c:when test="${filter.filterType=='AUTOCOMPLETE'}">
<div class="ui-front">
<div class="form-group input-group">
<input id="<c:out value="${normalizedKey}" />_input"
class="span2 form-control autocomplete-filter string-type"
x-source="<c:url value="${filter.autocompleteUrl}" />"
placeholder="<spring:message code="filter.autocomplete-placeholder" />"
type="text"/>
</c:when>
<c:when test="${filter.filterType=='AUTOCOMPLETE'}">
<div class="ui-front">
<div class="form-group input-group">
<input id="<c:out value="${normalizedKey}" />_input"
class="span2 form-control autocomplete-filter string-type"
x-source="<c:url value="${filter.autocompleteUrl}" />"
placeholder="<spring:message code="filter.autocomplete-placeholder" />"
type="text"/>
<span class="input-group-btn">
<button class="btn notimportant filter-auto"
norm-key="<c:out value="${normalizedKey}" />"
i-key="<c:out value="${filter.key}" />">+
</button>
</span>
</div>
</div>
</div>
</c:when>
<c:when test="${filter.dataType=='NUMERIC'}">
<div class="input-group">
<input id="<c:out value="${normalizedKey}" />_input_1" class="span5 form-control"
style="width: 50%" type="text"/>
<input id="<c:out value="${normalizedKey}" />_input_2" class="span5 form-control"
style="width: 50%" type="text"/>
</c:when>
<c:when test="${filter.dataType=='NUMERIC'}">
<div class="input-group">
<input id="<c:out value="${normalizedKey}" />_input_1" class="span5 form-control"
style="width: 50%" type="text"/>
<input id="<c:out value="${normalizedKey}" />_input_2" class="span5 form-control"
style="width: 50%" type="text"/>
<span class="input-group-btn">
<button class="btn btn-secondary notimportant filter-range"
norm-key="<c:out value="${normalizedKey}" />"
......@@ -118,46 +118,46 @@
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</button>
</span>
</div>
</c:when>
<c:when test="${filter.dataType=='BOOLEAN'}">
<div class="">
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'true')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="true">
<spring:message
code="boolean.true"/>
</label>
</div>
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'false')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="false">
<spring:message
code="boolean.false"/>
</label>
</div>
<c:if test="${filter.allowsNull}">
</c:when>
<c:when test="${filter.dataType=='BOOLEAN'}">
<div class="">
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''}
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'true')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="null">
id="<c:out value="${normalizedKey}" />" value="true">
<spring:message
code="boolean.null"/>
code="boolean.true"/>
</label>
</div>
</c:if>
</div>
</c:when>
<c:when test="${filter.key=='crops'}">
<div class="form-group input-group">
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'false')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="false">
<spring:message
code="boolean.false"/>
</label>
</div>
<c:if test="${filter.allowsNull}">
<div>
<label>
<input
type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />" value="null">
<spring:message
code="boolean.null"/>
</label>
</div>
</c:if>
</div>
</c:when>
<c:when test="${filter.key=='crops'}">
<div class="form-group input-group">
<span class="">
<select name="crops" id="cropselector" i-key="${filter.key}"
class="form-control filter-crop">
......@@ -168,18 +168,18 @@
</c:forEach>
</select>
</span>
</div>
</c:when>
<c:otherwise>
<span class="glyphicon glyphicon-menu-down"></span>
<select class="form-control like-switcher">
<option value="equals"><spring:message code="filter.string.equals"/></option>
<option value="like"><spring:message code="filter.string.like"/></option>
</select>
</div>
</c:when>
<c:otherwise>
<span class="glyphicon glyphicon-menu-down"></span>
<select class="form-control like-switcher">
<option value="equals"><spring:message code="filter.string.equals"/></option>
<option value="like"><spring:message code="filter.string.like"/></option>
</select>
<div class="input-group">
<input type="text" class="span2 form-control string-type"
id="<c:out value="${normalizedKey}" />_input">
<div class="input-group">
<input type="text" class="span2 form-control string-type"
id="<c:out value="${normalizedKey}" />_input">
<span class="input-group-btn">
<button class="btn btn-secondary notimportant filter-auto" type="button"
norm-key="<c:out value="${normalizedKey}" />"
......@@ -187,13 +187,13 @@
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</button>
</span>
</div>
</c:otherwise>
</c:choose>
</div>
</c:otherwise>
</c:choose>
<c:forEach items="${filterMap[appliedFilter.key]}" var="value">
<%@include file="filtval.jspf" %>
</c:forEach>
<c:forEach items="${filterMap[appliedFilter.key]}" var="value">
<%@include file="filtval.jspf" %>
</c:forEach>
<div class="filtersBtn clearfix">
<button type="button" class="btn btn-success applyBtn pull-left ">
......
......@@ -28,7 +28,7 @@
filterMap="${filters}"/>
</div>
<button type="button" class="btn addFiltersBtn" data-toggle="modal" data-target="#myModal">
<spring:message code="filter.additional"/>
<spring:message code="filter.additional-traits"/>
</button>
</filters:panel>
</div>
......
......@@ -27,133 +27,135 @@
<c:set var="normalizedKey" value="${filter.key.replace('.', '-').replace(':', '_')}"/>
<c:set var="appliedFilter" value="${appliedFilters.get(filter.key)}"/>
<div id="collapse_filt_${filterKey}" class="${filterKey}">
<div id="collapse_filt_${filterKey}" class="${filterKey} col-xs-12">
<c:choose>
<c:when test="${type eq 'select'}">
<!-- <select name="crops" i-key="crops" class="form-control filter-crop"> -->
<!-- <option disabled selected>Select crop</option> -->
<c:forEach items="${cropList}" var="c" varStatus="i">
<c:forEach items="${c.value}" var="val">
<div class="radio-wrapper">
<input type="radio" name="crops" id="crops_${i.count}" i-key="crops" class="filter-crop"
value="${c.key}" ${c.key == currentCrop.shortName? 'checked' : ''} />
<label for="crops_${i.count}">
<c:out value="${val.key}"/> (${val.value})
</label>
</div>
<c:choose>
<c:when test="${type eq 'select'}">
<!-- <select name="crops" i-key="crops" class="form-control filter-crop"> -->
<!-- <option disabled selected>Select crop</option> -->
<c:forEach items="${cropList}" var="c" varStatus="i">
<c:forEach items="${c.value}" var="val">
<div class="radio-wrapper">
<input type="radio" name="crops" id="crops_${i.count}" i-key="crops" class="filter-crop"
value="${c.key}" ${c.key == currentCrop.shortName? 'checked' : ''} />
<label for="crops_${i.count}">
<c:out value="${val.key}"/> (${val.value})
</label>
</div>
</c:forEach>
</c:forEach>
</c:forEach>
<!-- </select> -->
</c:when>
<c:when test="${type eq 'like'}">
<span class="glyphicon glyphicon-menu-down"></span>
<select class="form-control like-switcher">
<option value="equals"><spring:message code="filter.string.equals"/></option>
<option value="like"><spring:message code="filter.string.like"/></option>
</select>
<div class="input-group">
<input type="text" class="span2 form-control string-type" id="<c:out value="${normalizedKey}" />_input">
<!-- </select> -->
</c:when>
<c:when test="${type eq 'like'}">
<span class="glyphicon glyphicon-menu-down"></span>
<select class="form-control like-switcher">
<option value="equals"><spring:message code="filter.string.equals"/></option>
<option value="like"><spring:message code="filter.string.like"/></option>
</select>
<div class="input-group">
<input type="text" class="span2 form-control string-type" id="<c:out value="${normalizedKey}" />_input">
<span class="input-group-btn">
<button class="btn btn-secondary notimportant filter-auto" type="button"
norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</button>
</span>
</div>
</c:when>
<c:when test="${type eq 'option'}">
<c:forEach items="${filter.options}" var="option" varStatus="i">
<div class="checkbox-wrapper">
<label>
<input class="filter-list"
id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filterMap[appliedFilter.key], option.value)?'checked':''}
norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />"
type="checkbox" value="${option.value}"/>
<spring:message code="${option.name}"/>
(${filter.counts[i.index]})
</label>
</div>
</c:forEach>
</c:when>
<c:when test="${type eq 'autocomplete'}">
<div class="input-group">
<input id="<c:out value="${normalizedKey}" />_input"
class="span2 form-control autocomplete-filter string-type"
x-source="<c:url value="${filter.autocompleteUrl}" />"
placeholder="<spring:message code="filter.autocomplete-placeholder" />" type="text"/>
</c:when>
<c:when test="${type eq 'option'}">
<c:forEach items="${filter.options}" var="option" varStatus="i">
<div class="checkbox-wrapper">
<label>
<input class="filter-list"
id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filterMap[appliedFilter.key], option.value)?'checked':''}
norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />"
type="checkbox" value="${option.value}"/>
<spring:message code="${option.name}"/>
(${filter.counts[i.index]})
</label>
</div>
</c:forEach>
</c:when>
<c:when test="${type eq 'autocomplete'}">
<div class="input-group">
<input id="<c:out value="${normalizedKey}" />_input"
class="span2 form-control autocomplete-filter string-type"
x-source="<c:url value="${filter.autocompleteUrl}" />"
placeholder="<spring:message code="filter.autocomplete-placeholder" />" type="text"/>
<span class="input-group-btn">
<button class="btn btn-secondary notimportant filter-auto" type="button"
norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</button>
</span>
</div>
</c:when>
<c:when test="${type eq 'range'}">
<c:choose>
<c:when test="${filterKey eq 'geo.latitude'}">
<filters:filter-range-child filter="${availableFilters['geo.latitude']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
</div>
</c:when>
<c:when test="${type eq 'range'}">
<c:choose>
<c:when test="${filterKey eq 'geo.latitude'}">
<filters:filter-range-child filter="${availableFilters['geo.latitude']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
<p class="label-name"><spring:message code="filter.geo.longitude"/></p>
<filters:filter-range-child filter="${availableFilters['geo.longitude']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
<p class="label-name"><spring:message code="filter.geo.longitude"/></p>
<filters:filter-range-child filter="${availableFilters['geo.longitude']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
<p class="label-name"><spring:message code="filter.geo.elevation"/></p>
<filters:filter-range-child filter="${availableFilters['geo.elevation']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
</c:when>
<c:otherwise>
<filters:filter-range-child filter="${availableFilters[filterKey]}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
</c:otherwise>
</c:choose>
</c:when>
<c:when test="${type eq 'boolean'}">
<div class="checkbox-wrapper">
<label>
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'true')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />"
value="true">
<spring:message code="boolean.true"/>
</label>
</div>
<div class="checkbox-wrapper">
<label>
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'false')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />"
value="false">
<spring:message code="boolean.false"/>
</label>
</div>
<c:if test="${filter.allowsNull}">
<p class="label-name"><spring:message code="filter.geo.elevation"/></p>
<filters:filter-range-child filter="${availableFilters['geo.elevation']}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
</c:when>
<c:otherwise>
<filters:filter-range-child filter="${availableFilters[filterKey]}"
appliedFilters="${appliedFilters}" filterMap="${filterMap}"/>
</c:otherwise>
</c:choose>
</c:when>
<c:when test="${type eq 'boolean'}">
<div class="checkbox-wrapper">
<label>
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'null')?'checked':''}
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'true')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />"
value="null">
<spring:message code="boolean.null"/>
value="true">
<spring:message code="boolean.true"/>
</label>
</div>
</c:if>
</c:when>
<c:otherwise/>
</c:choose>
<div class="checkbox-wrapper">
<label>
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'false')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />"
value="false">
<spring:message code="boolean.false"/>
</label>
</div>
<c:if test="${filter.allowsNull}">
<div class="checkbox-wrapper">
<label>
<input type="checkbox" ${fn:contains(filterMap[appliedFilter.key], 'null')?'checked':''}
class="filter-bool" i-key="<c:out value="${filter.key}" />"
id="<c:out value="${normalizedKey}" />"
value="null">
<spring:message code="boolean.null"/>
</label>
</div>
</c:if>
</c:when>
<c:otherwise/>
</c:choose>
<c:if test="${type ne 'range'}">
<c:forEach items="${filterMap[appliedFilter.key]}" var="value">
<%@include file="filtval.jspf" %>
<%--<div class="filtval complex"--%>
<%--x-key="<c:out value="${normalizedKey}" /><c:out value="${value}"/>"--%>
<%--i-key="<c:out value="${filter.key}" />"><c:out value="${string}"/>--%>
<%--</div>--%>
<%--<c:remove var="string"/>--%>
</c:forEach>
</c:if>
<c:if test="${type ne 'range'}">
<c:forEach items="${filterMap[appliedFilter.key]}" var="value">
<%@include file="filtval.jspf" %>
<%--<div class="filtval complex"--%>
<%--x-key="<c:out value="${normalizedKey}" /><c:out value="${value}"/>"--%>
<%--i-key="<c:out value="${filter.key}" />"><c:out value="${string}"/>--%>
<%--</div>--%>
<%--<c:remove var="string"/>--%>
</c:forEach>
</c:if>
<button type="button" class="btn btn-success applyBtn">
<spring:message code="filter.apply"/>
......
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