Merge branch 'master' of https://git.bukova.info/repos/git/isspst
commit
34c4144f46
@ -0,0 +1,56 @@
|
||||
package info.bukova.isspst.filters;
|
||||
|
||||
import static info.bukova.isspst.StringUtils.nullStr;
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
import org.hamcrest.Description;
|
||||
import org.hamcrest.Factory;
|
||||
import org.hamcrest.Matcher;
|
||||
import org.hamcrest.TypeSafeMatcher;
|
||||
|
||||
public class BuildingFilter implements Filter<Building> {
|
||||
|
||||
private Building condBuilding;
|
||||
|
||||
public BuildingFilter(Building condBuilding) {
|
||||
this.condBuilding = condBuilding;
|
||||
}
|
||||
|
||||
private static class BuildingMatcher extends TypeSafeMatcher<Building> {
|
||||
|
||||
private Building condBuilding;
|
||||
|
||||
public BuildingMatcher(Building cond) {
|
||||
this.condBuilding = cond;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeTo(Description desc) {
|
||||
desc.appendText("buildings matches");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matchesSafely(Building item) {
|
||||
return nullStr(item.getCode()).toLowerCase().contains(nullStr(condBuilding.getCode()).toLowerCase())
|
||||
&& nullStr(item.getName()).toLowerCase().contains(nullStr(condBuilding.getName()).toLowerCase())
|
||||
&& nullStr(item.getDescription()).toLowerCase().contains(nullStr(condBuilding.getDescription()).toLowerCase());
|
||||
}
|
||||
|
||||
@Factory
|
||||
public static Matcher<Building> matchBuilding(Building building) {
|
||||
return new BuildingMatcher(building);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuildingMatcher matcher() {
|
||||
return new BuildingMatcher(condBuilding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryString() {
|
||||
// TODO query string
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +1,23 @@
|
||||
package info.bukova.isspst.ui;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
import info.bukova.isspst.filters.BuildingFilter;
|
||||
import info.bukova.isspst.services.buildings.BuildingService;
|
||||
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
|
||||
public class BuildingList extends ListViewModel<Building> {
|
||||
|
||||
|
||||
@WireVariable
|
||||
private BuildingService buildingService;
|
||||
|
||||
|
||||
@Init
|
||||
public void init() {
|
||||
service = buildingService;
|
||||
dataClass = Building.class;
|
||||
formZul = "buildingForm.zul";
|
||||
dataFilter = new BuildingFilter(getFilterTemplate());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
BuildingsFormCodeConstr=Zadejte k\u00f3d budovy...
|
@ -0,0 +1,7 @@
|
||||
<?page title="${labels.HeaderText}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
<style src="/css/page.css"/>
|
||||
<div id="header">
|
||||
${labels.AppName}
|
||||
</div>
|
||||
</zk>
|
@ -1,70 +0,0 @@
|
||||
/*body {
|
||||
font-family: sans-serif;
|
||||
}*/
|
||||
|
||||
#container {
|
||||
min-height:100%;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#header{
|
||||
width: auto;
|
||||
height:40px;
|
||||
border: 1px solid #ccc;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
#leftcolumn{
|
||||
width:140px;
|
||||
/* margin: 20px 20px 20px 0px;*/
|
||||
padding:10px;
|
||||
float: left;
|
||||
/* border: 1px solid #ccc;*/
|
||||
}
|
||||
|
||||
#navbar{
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#maincolumn{
|
||||
padding:10px;
|
||||
padding-bottom:20px; /* Height of the footer */
|
||||
margin: 0px 0px 0px 160px;
|
||||
}
|
||||
|
||||
#footer{
|
||||
clear:both;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
width:100%;
|
||||
height:20px; /* Height of the footer */
|
||||
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.form-caption {
|
||||
--1overflow:hidden;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
/*aaa*/
|
||||
.form-caption-content {
|
||||
float:left;
|
||||
}
|
||||
|
||||
/*
|
||||
a:link,a:visited {
|
||||
font-size: 12px;
|
||||
color: #0000A0;
|
||||
background-color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
target-new: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
font-size: 12px;
|
||||
color: #0000A0;
|
||||
background-color: #a3d3f8;
|
||||
text-decoration: none;
|
||||
target-new: none;
|
||||
}*/
|
@ -0,0 +1,80 @@
|
||||
html {
|
||||
/*vertical scrollbar allways visible */
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#container {
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#header {
|
||||
width: auto;
|
||||
height: 40px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
background: url("/isspst/img/header-bg.png") 50% 0 repeat-x;
|
||||
|
||||
color: #ffffff;
|
||||
font-size: 35px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-shadow: 2px 2px 2px #000000;
|
||||
}
|
||||
|
||||
#leftcolumn {
|
||||
width: 140px;
|
||||
padding: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#navbar {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#maincolumn {
|
||||
padding: 10px;
|
||||
padding-bottom: 20px; /* Height of the footer */
|
||||
margin: 0px 0px 0px 160px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
clear: both;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 20px; /* Height of the footer */
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.form-caption {
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-shadow: 2px 2px 2px #888888;
|
||||
padding-left: 5px;
|
||||
}
|
||||
/*aaa*/
|
||||
.form-caption-content {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/*
|
||||
a:link,a:visited {
|
||||
font-size: 12px;
|
||||
color: #0000A0;
|
||||
background-color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
target-new: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
font-size: 12px;
|
||||
color: #0000A0;
|
||||
background-color: #a3d3f8;
|
||||
text-decoration: none;
|
||||
target-new: none;
|
||||
}*/
|
@ -0,0 +1,18 @@
|
||||
.find-grid-cell {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.find-grid-img {
|
||||
display: table-cell;
|
||||
width: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.find-grid-divtextbox {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.find-grid-textbox {
|
||||
width: 100%;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 394 KiB |
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in New Issue