Commit 773c08ef authored by Taisiya Glushko's avatar Taisiya Glushko Committed by Matija Obreza
Browse files

'click'-able size; radio-buttons styles

parent b857fd9a
......@@ -506,7 +506,7 @@ var GenesysFilter = {
var key = $(element).attr('i-key');
delete jsonData[key];
// Clear previous crop selection
element.parent().find('.complex').remove();
element.parent().parent().find('.complex').remove();
if (value !== null) {
GenesysFilterUtil.appendHtml(key, value, value, element);
......
This diff is collapsed.
......@@ -378,7 +378,7 @@
GenesysFilter.filterBoolean($(this), jsonData, i18nFilterMessage);
});
$('body').on('keyup keypress click blur change', '.filter-crop', function () {
$('body').on('click', '.filter-crop', function () {
GenesysFilter.filterCrop($(this), jsonData);
});
......@@ -511,9 +511,7 @@
// }
function renderCropSuggestions(filters) {
$(".crops input").remove();
$(".crops label").remove();
$(".crops br").remove();
$(".radio-wrapper").remove();
$.each(filters, function (name, value) {
var input = $("<input/>", {
type: 'radio',
......@@ -531,11 +529,10 @@
'for': 'crops_' + name,
text: key + " (" + value[key] + ")"
});
var filtval = $("div.filtval[i-key^='crops']");
var attach = filtval[0] != null ? filtval[0] : (".crops button.applyBtn");
$(attach).before(input);
$(attach).before(label);
$(attach).before($("<br/>"));
var wrapper = $("<div/>", {'class': "radio-wrapper"});
wrapper.append(input);
wrapper.append(label);
$(attach).before(wrapper);
});
}
......@@ -676,7 +673,7 @@
}
function resize() {
if ($(window).width() < 992) {
if (window.innerWidth < 992) {
var headers = $(".accessions").find("thead td");
$.each(headersCopy, function (index) {
if (index >= 3 && headerSelects[index] != true) {
......@@ -732,7 +729,7 @@
}
}
lastWindowWidth = $(window).width();
lastWindowWidth = window.innerWidth;
}
resize();
......
......@@ -34,11 +34,12 @@
<!-- <option disabled selected>Select crop</option> -->
<c:forEach items="${cropList}" var="c" varStatus="i">
<c:forEach items="${c.value}" var="val">
<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>
<br/>
<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>
<!-- </select> -->
......
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