Agenda Budovy
- zprovozněno třídění - zprovozněny filtry - textboxy filtrů se nyní roztahují - css styly se načítají přes zk.xml
This commit is contained in:
@@ -1,21 +1,23 @@
|
|||||||
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;
|
||||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||||
|
|
||||||
public class BuildingList extends ListViewModel<Building> {
|
public class BuildingList extends ListViewModel<Building> {
|
||||||
|
|
||||||
@WireVariable
|
@WireVariable
|
||||||
private BuildingService buildingService;
|
private BuildingService buildingService;
|
||||||
|
|
||||||
@Init
|
@Init
|
||||||
public void init() {
|
public void init() {
|
||||||
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>
|
||||||
|
|||||||
@@ -3,14 +3,46 @@
|
|||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
<window title="${labels.AgendaBuildings}" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingList')">
|
<window title="${labels.AgendaBuildings}" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingList')">
|
||||||
|
|
||||||
<include src="/app/toolbar.zul"/>
|
<include src="/app/toolbar.zul" />
|
||||||
|
|
||||||
<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%;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user