Skip to content

Commit

Permalink
updates #120
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto authored and alberto committed Jun 9, 2017
1 parent 1b71275 commit 8cc5525
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
3 changes: 2 additions & 1 deletion search/web/inc/da.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<input style="float:left;" class="da_input" id="f1" size="10" type="text" value="" onkeyup="checkDoFilter(event)" />
<span style="float:left;">&nbsp;<fmt:message bundle="${lctx}">Do</fmt:message>:&nbsp;</span>
<input style="float:left;" class="da_input" id="f2" size="10" type="text" value="" onkeyup="checkDoFilter(event)" />
<a href="javascript:doFilter();" style="float:right; width:16px;overflow:hidden;" ><span class="ui-icon ui-icon-search" title="<fmt:message bundle="${lctx}">dateaxis.use</fmt:message>" >a</span></a>
<a href="javascript:doFilter();" style="float:right; width:16px;overflow:hidden;" ><span class="ui-icon ui-icon-search" title="<fmt:message bundle="${lctx}">dateaxis.use</fmt:message>" >a</span></a>
<label for="exactDay">konkrétní den</label><input type="checkbox" id="exactDay" name="exactDay" />
</div>
<div id="content-resizable" style="position:relative;float:none;">
<div id="content-scroll" style="float:left;" >
Expand Down
11 changes: 9 additions & 2 deletions search/web/inc/dac.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,19 @@
}
</script>
<div id="da-inputs" >
<span style="float:left;"><fmt:message bundle="${lctx}">Od</fmt:message>:&nbsp;</span>
<span class="exactbox" style="float:left;"><fmt:message bundle="${lctx}">Od</fmt:message>:&nbsp;</span>
<input style="float:left;" class="da_input" id="f1" size="10" type="text" value="" onchange="checkValid(event, this)" />
<div class="exactbox" style="float:left; <c:if test="${param.exactDay == 'true'}">display:none;</c:if> /> ">
<span style="float:left;">&nbsp;<fmt:message bundle="${lctx}">Do</fmt:message>:&nbsp;</span>
<input style="float:left;" class="da_input" id="f2" size="10" type="text" value="" onchange="checkValid(event, this)" />
<a href="javascript:doFilter();" style="float:right; width:16px;overflow:hidden;" ><span class="ui-icon ui-icon-search" title="<fmt:message bundle="${lctx}">dateaxis.use</fmt:message>" >a</span></a>
</div>
<a href="javascript:doFilter();" style="float:right; width:16px;overflow:hidden;" ><span class="ui-icon ui-icon-search" title="<fmt:message bundle="${lctx}">dateaxis.use</fmt:message>" >a</span></a>

</div>
<div>
<label for="exactDay">konkrétní den</label><input type="checkbox" id="exactDay" name="exactDay" onchange="$('.exactbox').toggle()"
<c:if test="${param.exactDay == 'true'}">checked="checked"</c:if> />
</div>
<div style="overflow:hidden; width:100%; height:100%;position: relative;left:0px;top:0px;padding:0px;">
<div id="canvasda" class="years" style="overflow:auto; position: relative;">
<div class="info"></div><div class="yearLabel"></div><div class="bar"><div class="sel"></div></div>
Expand Down
28 changes: 21 additions & 7 deletions search/web/inc/searchParams-core.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,27 @@
<%-- datum --%>
<c:if test="${param.da_od != null && !empty param.da_od}">
<c:set var="fieldedSearch" value="true" scope="request" />
<c:set var="da">(rok:[${searchParams.yearFrom} TO ${searchParams.yearUntil}]) OR (datum_begin:[1 TO ${searchParams.yearUntil}] AND datum_end:[${searchParams.yearFrom} TO 3000])</c:set>
<c:if test="${param.da_od == param.da_do}">
<c:set var="da">
${da} OR (datum:"${searchParams.dateFromFormatted}")
</c:set>
</c:if>
<c:param name="fq" value="${da}" />
<c:choose>
<c:when test="${param.exactDay == 'true'}" >
<c:set var="da">datum_str:"${param.da_od}"</c:set>
<c:set var="daNoZeroes"></c:set>
<c:if test="${fn:startsWith(param.da_od, '0')}">
<c:set var="daNoZeroes">${fn:substring(param.da_od, 1, -1)}</c:set>
</c:if>
<c:set var="daNoZeroes">${fn:replace(daNoZeroes, '.0', '.')}</c:set>
<c:set var="da">${da} OR datum_str:"${daNoZeroes}"</c:set>
<c:param name="fq" value="${da}" />
</c:when>
<c:otherwise>
<c:set var="da">(rok:[${searchParams.yearFrom} TO ${searchParams.yearUntil}]) OR (datum_begin:[1 TO ${searchParams.yearUntil}] AND datum_end:[${searchParams.yearFrom} TO 3000])</c:set>
<c:if test="${param.da_od == param.da_do}">
<c:set var="da">
${da} OR (datum:"${searchParams.dateFromFormatted}")
</c:set>
</c:if>
</c:otherwise>
</c:choose>

<c:set var="rows" value="${rowsdefault}" scope="request" />
</c:if>
<c:if test="${!empty param.offset}">
Expand Down
12 changes: 10 additions & 2 deletions search/web/inc/usedFilters.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@
<%-- datum --%>
<c:if test="${param.da_od != null && param.da_do != ''}">
<li>
<a title="<fmt:message bundle="${lctx}" key="filter.remove_criteria" />" class="mainNav" href="javascript:removeDateAxisFilter();">
<fmt:message bundle="${lctx}" key="common.date" />: <c:out value="${param.da_od}" /> - <c:out value="${param.da_do}" /></a>
<c:choose>
<c:when test="${param.exactDay == 'true'}" >
<a title="<fmt:message bundle="${lctx}" key="filter.remove_criteria" />" class="mainNav" href="javascript:removeDateAxisFilter();">
<fmt:message bundle="${lctx}" key="common.date" />: <c:out value="${param.da_od}" /></a>
</c:when>
<c:otherwise>
<a title="<fmt:message bundle="${lctx}" key="filter.remove_criteria" />" class="mainNav" href="javascript:removeDateAxisFilter();">
<fmt:message bundle="${lctx}" key="common.date" />: <c:out value="${param.da_od}" /> - <c:out value="${param.da_do}" /></a>
</c:otherwise>
</c:choose>
</li>
</c:if>

Expand Down
2 changes: 2 additions & 0 deletions search/web/js/dateAxisV.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ function doFilter(){

page.setValue("da_od", decodeDate($("#" + fromField).val()));
page.setValue("da_do", decodeDate($("#" + toField).val()));

page.setValue("exactDay", $("#exactDay").is(':checked'));
var newurl = "r.jsp?" + page.toString() + dateAxisAdditionalParams;

document.location.href = newurl;
Expand Down

0 comments on commit 8cc5525

Please sign in to comment.