Agenda Budovy

- zprovozněno třídění
- zprovozněny filtry
- textboxy filtrů se nyní roztahují
- css styly se načítají přes zk.xml
multitenant
František Přibyl 11 years ago
parent bb1da67ac5
commit 12b814360c

@ -1,6 +1,7 @@
package info.bukova.isspst.ui; package info.bukova.isspst.ui;
import info.bukova.isspst.data.Building; import info.bukova.isspst.data.Building;
import info.bukova.isspst.filters.BuildingFilter;
import info.bukova.isspst.services.buildings.BuildingService; import info.bukova.isspst.services.buildings.BuildingService;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
@ -16,6 +17,7 @@ public class BuildingList extends ListViewModel<Building> {
service = buildingService; service = buildingService;
dataClass = Building.class; dataClass = Building.class;
formZul = "buildingForm.zul"; formZul = "buildingForm.zul";
dataFilter = new BuildingFilter(getFilterTemplate());
} }
} }

@ -23,6 +23,10 @@
<addon-uri>/WEB-INF/ckez-bind-lang-addon.xml</addon-uri> <addon-uri>/WEB-INF/ckez-bind-lang-addon.xml</addon-uri>
</language-config> </language-config>
<desktop-config>
<theme-uri>/css/zk-modify.css</theme-uri>
</desktop-config>
<!-- <library-property> <!-- <library-property>
<name>org.zkoss.zul.progressbox.position</name> <name>org.zkoss.zul.progressbox.position</name>
<value>center</value> <value>center</value>

@ -7,10 +7,42 @@
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)"> <listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
<listhead> <listhead>
<listheader label="${labels.BuildingsGridColumnCode}" width="10%" /> <listheader label="${labels.BuildingsGridColumnCode}" sort="auto(code)" onSort="@command('onSort', column='code')" width="10%" />
<listheader label="${labels.BuildingsGridColumnName}" width="30%" /> <listheader label="${labels.BuildingsGridColumnName}" sort="auto(name)" onSort="@command('onSort', column='name')" width="30%" />
<listheader label="${labels.BuildingsGridColumnDescription}" width="60%" /> <listheader label="${labels.BuildingsGridColumnDescription}" sort="auto(description)" onSort="@command('onSort', column='description')" width="60%" />
</listhead> </listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.code)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.name)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.description)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model"> <template name="model">
<listitem> <listitem>
<listcell label="@load(each.code)" /> <listcell label="@load(each.code)" />

@ -1,5 +1,4 @@
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?> <?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
<!--?link rel="stylesheet" type="text/css" href="/app/page.css"?-->
<zk> <zk>
<window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')"> <window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')">
<caption src="/img/building.png" zclass="form-caption" label="${labels.FormBuilding}" /> <caption src="/img/building.png" zclass="form-caption" label="${labels.FormBuilding}" />
@ -19,13 +18,13 @@
<row> <row>
<cell sclass="row-title">${labels.BuildingsFormName} :</cell> <cell sclass="row-title">${labels.BuildingsFormName} :</cell>
<cell> <cell>
<textbox width="200px" value="@bind(vm.dataBean.name)" /> <textbox id="name" width="200px" value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
<row> <row>
<cell sclass="row-title">${labels.BuildingsFormDescription} :</cell> <cell sclass="row-title">${labels.BuildingsFormDescription} :</cell>
<cell> <cell>
<textbox width="300px" value="@bind(vm.dataBean.description)" /> <textbox id="description" width="300px" value="@bind(vm.dataBean.description)" />
</cell> </cell>
</row> </row>
</rows> </rows>

@ -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%;
}
Loading…
Cancel
Save