Implementováno a sjednoceno řazení záznamů podle českých znaků.
Změnit v databázi collation z ut8_czech_ci na latin2_czech_cs!!! Sjednocen vzhled gridů ve všech agendách. closes #83multitenant
parent
0f9d1baf94
commit
1c19625ffb
@ -0,0 +1,25 @@
|
|||||||
|
package info.bukova.isspst.sort;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listheader;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class CzechSortListheader extends Listheader {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSort(String type) {
|
||||||
|
|
||||||
|
if (type.startsWith("auto"))
|
||||||
|
{
|
||||||
|
// czech(propertyName)
|
||||||
|
String propertyName = type.substring("auto(".length(), type.length() - 1);
|
||||||
|
this.setSortAscending(new CzechStringComparator(propertyName, true));
|
||||||
|
this.setSortDescending(new CzechStringComparator(propertyName, false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// auto(propertyName)
|
||||||
|
super.setSort(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,115 @@
|
|||||||
|
package info.bukova.isspst.sort;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.text.Collator;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.RuleBasedCollator;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
public class CzechStringComparator implements Comparator<Object> {
|
||||||
|
private String m_rule;
|
||||||
|
private final String m_property;
|
||||||
|
private final boolean m_ascending;
|
||||||
|
private Method m_getter;
|
||||||
|
private Comparator<Object> m_comparator;
|
||||||
|
|
||||||
|
public CzechStringComparator(String property, boolean ascending) {
|
||||||
|
m_rule = "";
|
||||||
|
m_rule += "< A,a < Á,á < Ä,ä ";
|
||||||
|
m_rule += "< B,b ";
|
||||||
|
m_rule += "< C,c < Ć,ć < Č,č ";
|
||||||
|
m_rule += "< D,d < Ď,ď ";
|
||||||
|
m_rule += "< E,e < É,é < Ë,ë ";
|
||||||
|
m_rule += "< F,f ";
|
||||||
|
m_rule += "< G,g ";
|
||||||
|
m_rule += "< H,h ";
|
||||||
|
m_rule += "< CH,Ch,ch ";
|
||||||
|
m_rule += "< I,i < Í,í ";
|
||||||
|
m_rule += "< J,j ";
|
||||||
|
m_rule += "< K,k ";
|
||||||
|
m_rule += "< L,l < Ľ,ľ < Ĺ,ĺ ";
|
||||||
|
m_rule += "< M,m ";
|
||||||
|
m_rule += "< N,n < Ń,ń < Ň,ň ";
|
||||||
|
m_rule += "< O,o < Ó,ó < Ö,ö ";
|
||||||
|
m_rule += "< P,p ";
|
||||||
|
m_rule += "< Q,q ";
|
||||||
|
m_rule += "< R,r < Ŕ,ŕ < Ř,ř ";
|
||||||
|
m_rule += "< S,s < ß < Ś,ś < Š,š ";
|
||||||
|
m_rule += "< T,t < Ť,ť ";
|
||||||
|
m_rule += "< U,u < Ú,ú < Ů,ů < Ü,ü ";
|
||||||
|
m_rule += "< V,v ";
|
||||||
|
m_rule += "< W,w ";
|
||||||
|
m_rule += "< X,x ";
|
||||||
|
m_rule += "< Y,y < Ý,ý ";
|
||||||
|
m_rule += "< Z,z < Ź,ź < Ž,ž ";
|
||||||
|
|
||||||
|
m_property = property;
|
||||||
|
m_ascending = ascending;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(Object argL, Object argR) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
return this.internalCompare(argL, argR);
|
||||||
|
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int internalCompare(Object argL, Object argR)
|
||||||
|
throws ParseException, IllegalAccessException,
|
||||||
|
IllegalArgumentException, InvocationTargetException {
|
||||||
|
if (m_getter == null) {
|
||||||
|
m_getter = ReflectionTools.getGetterMethod(argL, m_property);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_comparator == null) {
|
||||||
|
Collator c = new RuleBasedCollator(m_rule);
|
||||||
|
c.setStrength(Collator.TERTIARY);
|
||||||
|
m_comparator = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object valL = m_getter.invoke(argL);
|
||||||
|
Object valR = m_getter.invoke(argR);
|
||||||
|
boolean isNullValL = (valL == null);
|
||||||
|
boolean isNullValR = (valR == null);
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
if (isNullValL || isNullValR)
|
||||||
|
{
|
||||||
|
if (isNullValL && isNullValR)
|
||||||
|
{
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
else if (isNullValL)
|
||||||
|
{
|
||||||
|
result = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = m_comparator.compare(valL, valR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (m_ascending ? result : -result);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package info.bukova.isspst.sort;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
public class ReflectionTools {
|
||||||
|
|
||||||
|
private static String capitalizeFirstLetter(String string)
|
||||||
|
{
|
||||||
|
String result = string.substring(0,1).toUpperCase() + string.substring(1, string.length());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getGetterName(String propertyName)
|
||||||
|
{
|
||||||
|
String getterName = "get" + ReflectionTools.capitalizeFirstLetter(propertyName);
|
||||||
|
return getterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getBoolGetterName(String propertyName)
|
||||||
|
{
|
||||||
|
String getterName = "is" + ReflectionTools.capitalizeFirstLetter(propertyName);
|
||||||
|
return getterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Method getGetterMethod(Object bean, String propertyName)
|
||||||
|
{
|
||||||
|
Class<?> beanClass = bean.getClass();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return beanClass.getMethod(ReflectionTools.getGetterName(propertyName));
|
||||||
|
}
|
||||||
|
catch(Throwable t)
|
||||||
|
{
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return beanClass.getMethod(ReflectionTools.getBoolGetterName(propertyName));
|
||||||
|
}
|
||||||
|
catch(Throwable t)
|
||||||
|
{
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new IllegalArgumentException("Not getter method found for '" + propertyName + "', bean: " + bean);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
jdbc.driverClassName=com.mysql.jdbc.Driver
|
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||||
jdbc.dialect=org.hibernate.dialect.MySQLDialect
|
jdbc.dialect=org.hibernate.dialect.MySQLDialect
|
||||||
jdbc.databaseurl=jdbc:mysql://127.0.0.1:3306/isspst?characterEncoding=utf8
|
jdbc.databaseurl=jdbc:mysql://127.0.0.1:3306/isspst?characterEncoding=latin2
|
||||||
jdbc.username=root
|
jdbc.username=root
|
||||||
jdbc.password=xsacfgd
|
jdbc.password=xsacfgd
|
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<language-addon>
|
||||||
|
<addon-name>CzechSortListheader</addon-name>
|
||||||
|
<language-name>xul/html</language-name>
|
||||||
|
<component>
|
||||||
|
<component-name>listheader</component-name>
|
||||||
|
<extends>listheader</extends>
|
||||||
|
<component-class>info.bukova.isspst.sort.CzechSortListheader</component-class>
|
||||||
|
</component>
|
||||||
|
</language-addon>
|
@ -1,71 +1,84 @@
|
|||||||
<?page title="Adresa" contentType="text/html;charset=UTF-8"?>
|
<?page title="${labels.SuppliersFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||||
<zk>
|
<zk>
|
||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
<window id="editWin" title="Adresa" border="normal" apply="org.zkoss.bind.BindComposer"
|
<window id="editWin" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressForm')" closable="true" width="600px">
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressForm')"
|
<caption zclass="form-caption" label="${labels.SuppliersFormTitle}" />
|
||||||
closable="true" width="600px">
|
<grid width="580px">
|
||||||
|
<columns>
|
||||||
<grid width="580px">
|
<column label="" hflex="min" />
|
||||||
<columns>
|
<column label="" hflex="min" />
|
||||||
<column label="" hflex="min"/>
|
<column label="" />
|
||||||
<column label="" hflex="min"/>
|
</columns>
|
||||||
<column label=""/>
|
<rows>
|
||||||
</columns>
|
<row>
|
||||||
<rows>
|
<label value="${labels.SuppliersFormCompany}" />
|
||||||
<row>
|
<textbox id="company" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.company)" instant="true" width="320px" />
|
||||||
<label value="Firma" /> <textbox id="company" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.company)" instant="true" width="320px"/>
|
<button image="/img/search.png" label="${labels.SuppliersFormFindInARES}" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((vm.dataBean.ic == 0) && (empty vm.dataBean.company))" />
|
||||||
<button image="/img/search.png" label="Hledat v ARESu" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((vm.dataBean.ic == 0) && (empty vm.dataBean.company))" />
|
</row>
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<label value="${labels.SuppliersFormIC}" />
|
||||||
<label value="IČ" /> <textbox value="@bind(vm.dataBean.ic)"/>
|
<textbox value="@bind(vm.dataBean.ic)" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="DIČ" /> <textbox value="@bind(vm.dataBean.dic)"/>
|
<label value="${labels.SuppliersFormDIC}" />
|
||||||
</row>
|
<textbox value="@bind(vm.dataBean.dic)" />
|
||||||
<row>
|
</row>
|
||||||
<label value="Oddělení" /> <textbox value="@bind(vm.dataBean.department)"/>
|
<row>
|
||||||
</row>
|
<label value="${labels.SuppliersFormDepartment}" />
|
||||||
<row>
|
<textbox value="@bind(vm.dataBean.department)" />
|
||||||
<label value="Kontaktní osoba" /> <textbox value="@bind(vm.dataBean.contactName)"/>
|
</row>
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<label value="${labels.SuppliersFormContact}" />
|
||||||
<label value="Ulice" /> <textbox value="@bind(vm.dataBean.street)" width="320px"/>
|
<textbox value="@bind(vm.dataBean.contactName)" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="Číslo domu" /> <textbox value="@bind(vm.dataBean.houseNumber)" width="80px"/>
|
<label value="${labels.SuppliersFormStreet}" />
|
||||||
</row>
|
<textbox value="@bind(vm.dataBean.street)" width="320px" />
|
||||||
<row>
|
</row>
|
||||||
<label value="Město" /> <textbox id="city" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.city)" width="320px"/>
|
<row>
|
||||||
</row>
|
<label value="${labels.SuppliersFormNo}" />
|
||||||
<row>
|
<textbox value="@bind(vm.dataBean.houseNumber)" width="80px" />
|
||||||
<label value="PSČ" /> <textbox value="@bind(vm.dataBean.zipCode)"/>
|
</row>
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<label value="${labels.SuppliersFormCity}" />
|
||||||
<label value="Telefon" /> <textbox value="@bind(vm.dataBean.phone)"/>
|
<textbox id="city" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.city)" width="320px" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="E-mail" /> <textbox id="email" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.email)" width="320px"/>
|
<label value="${labels.SuppliersFormZIP}" />
|
||||||
</row>
|
<textbox value="@bind(vm.dataBean.zipCode)" />
|
||||||
<row>
|
</row>
|
||||||
<label value="Web" /> <textbox id="web" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.web)" width="320px"/>
|
<row>
|
||||||
</row>
|
<label value="${labels.SuppliersFormPhone}" />
|
||||||
</rows>
|
<textbox value="@bind(vm.dataBean.phone)" />
|
||||||
</grid>
|
</row>
|
||||||
<hlayout>
|
<row>
|
||||||
<panel>
|
<label value="${labels.SuppliersFormEmail}" />
|
||||||
<panelchildren>
|
<textbox id="email" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.email)" width="320px" />
|
||||||
<vlayout>
|
</row>
|
||||||
<panel>
|
<row>
|
||||||
<panelchildren><label value="Poznámka"/> </panelchildren>
|
<label value="${labels.SuppliersFormWWW}" />
|
||||||
</panel>
|
<textbox id="web" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.web)" width="320px" />
|
||||||
<panel>
|
</row>
|
||||||
<panelchildren><ckeditor height="65px" width="330px" toolbar="Basic" value="@bind(vm.dataBean.description)"/>
|
</rows>
|
||||||
</panelchildren>
|
</grid>
|
||||||
</panel>
|
<hlayout>
|
||||||
</vlayout>
|
<panel>
|
||||||
</panelchildren>
|
<panelchildren>
|
||||||
</panel>
|
<vlayout>
|
||||||
</hlayout>
|
<panel>
|
||||||
<include src="/app/formButtons.zul"/>
|
<panelchildren>
|
||||||
</window>
|
<label value="${labels.SuppliersFormNote}" />
|
||||||
|
</panelchildren>
|
||||||
|
</panel>
|
||||||
|
<panel>
|
||||||
|
<panelchildren>
|
||||||
|
<ckeditor height="65px" width="100%" toolbar="Basic" value="@bind(vm.dataBean.description)" />
|
||||||
|
</panelchildren>
|
||||||
|
</panel>
|
||||||
|
</vlayout>
|
||||||
|
</panelchildren>
|
||||||
|
</panel>
|
||||||
|
</hlayout>
|
||||||
|
<include src="/app/formButtons.zul" />
|
||||||
|
</window>
|
||||||
</zk>
|
</zk>
|
@ -1,120 +1,126 @@
|
|||||||
<?page title="Dodavatelé" contentType="text/html;charset=UTF-8"?>
|
<?page title="${labels.AgendaSuppliers}" contentType="text/html;charset=UTF-8"?>
|
||||||
<zk>
|
<zk>
|
||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
<window title="Dodavatelé" border="normal"
|
<window border="normal" apply="org.zkoss.bind.BindComposer" height="570px" viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressList')">
|
||||||
apply="org.zkoss.bind.BindComposer" height="570px"
|
<caption zclass="form-caption" label="${labels.AgendaSuppliers}" />
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressList')">
|
<include src="/app/toolbar.zul" />
|
||||||
|
|
||||||
<include src="/app/toolbar.zul"/>
|
<hbox width="100%">
|
||||||
|
<listbox id="dataGrid" model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" onAfterRender="@command('afterRender')" selectedIndex="@load(vm.selIndex)" hflex="6" height="480px">
|
||||||
|
<listhead vflex="true" menupopup="auto">
|
||||||
|
<listheader label="${labels.SuppliersGridColumnCompany}" sort="auto(company)" />
|
||||||
|
<listheader label="${labels.SuppliersGridColumnIC}" sort="auto(ic)" width="100px" />
|
||||||
|
<listheader label="${labels.SuppliersGridColumnContact}" sort="auto(contactName)" />
|
||||||
|
<listheader label="${labels.SuppliersGridColumnStreet}" sort="auto(street)" />
|
||||||
|
<listheader label="${labels.SuppliersGridColumnNo}" sort="auto(houseNumber)" width="80px" />
|
||||||
|
<listheader label="${labels.SuppliersGridColumnCity}" sort="auto(city)" />
|
||||||
|
</listhead>
|
||||||
|
|
||||||
<hbox width="100%">
|
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
||||||
<listbox id="dataGrid" model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)"
|
<auxheader>
|
||||||
onAfterRender="@command('afterRender')" selectedIndex="@load(vm.selIndex)" hflex="6" height="480px">
|
<div sclass="find-grid-cell">
|
||||||
<listhead vflex="true">
|
<div sclass="find-grid-divtextbox">
|
||||||
<listheader label="Firma" sort="auto(company)" onSort="@command('onSort', column='company')" />
|
<textbox value="@bind(vm.filterTemplate.company)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
||||||
<listheader label="IČ" width="100px"/>
|
</div>
|
||||||
<listheader label="Kontaktní osoba"/>
|
<div sclass="find-grid-img">
|
||||||
<listheader label="Ulice"/>
|
<image src="/img/funnel.png" />
|
||||||
<listheader label="Číslo domu" width="80px"/>
|
</div>
|
||||||
<listheader label="Město" sort="auto(city)" onSort="@command('onSort', column='city')"/>
|
</div>
|
||||||
</listhead>
|
</auxheader>
|
||||||
|
<auxheader>
|
||||||
|
<div sclass="find-grid-cell">
|
||||||
|
<div sclass="find-grid-divtextbox">
|
||||||
|
<textbox value="@bind(vm.filterTemplate.ic)" 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.contactName)" 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.street)" 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.houseNumber)" 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.city)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
||||||
|
</div>
|
||||||
|
<div sclass="find-grid-img">
|
||||||
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
|
</auxhead>
|
||||||
|
|
||||||
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
<template name="model">
|
||||||
<auxheader>
|
<listitem>
|
||||||
<div sclass="find-grid-cell">
|
<listcell label="@load(each.company)" />
|
||||||
<div sclass="find-grid-divtextbox">
|
<listcell label="@load(each.ic)" />
|
||||||
<textbox value="@bind(vm.filterTemplate.company)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
<listcell label="@load(each.contactName)" />
|
||||||
</div>
|
<listcell label="@load(each.street)" />
|
||||||
<div sclass="find-grid-img">
|
<listcell label="@load(each.houseNumber)" />
|
||||||
<image src="/img/funnel.png" />
|
<listcell label="@load(each.city)" />
|
||||||
</div>
|
</listitem>
|
||||||
</div>
|
</template>
|
||||||
</auxheader>
|
</listbox>
|
||||||
<auxheader>
|
|
||||||
<div sclass="find-grid-cell">
|
|
||||||
<div sclass="find-grid-divtextbox">
|
|
||||||
<textbox value="@bind(vm.filterTemplate.ic)" 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.contactName)" 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.street)" 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.houseNumber)" 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.city)" 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">
|
|
||||||
<listitem>
|
|
||||||
<listcell label="@load(each.company)"/>
|
|
||||||
<listcell label="@load(each.ic)"/>
|
|
||||||
<listcell label="@load(each.contactName)"/>
|
|
||||||
<listcell label="@load(each.street)"/>
|
|
||||||
<listcell label="@load(each.houseNumber)"/>
|
|
||||||
<listcell label="@load(each.city)"/>
|
|
||||||
</listitem>
|
|
||||||
</template>
|
|
||||||
</listbox>
|
|
||||||
|
|
||||||
<div hflex="4">
|
|
||||||
<label value="Detail:" sclass="bold"/>
|
|
||||||
<grid visible="@load(vm.dataBean ne null)" hflex="1">
|
|
||||||
<columns>
|
|
||||||
<column hflex="min"/>
|
|
||||||
<column/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row><label value="Oddělení"/><label value="@load(vm.dataBean.department)"/></row>
|
|
||||||
<row><label value="Telefon"/><label value="@load(vm.dataBean.phone)"/></row>
|
|
||||||
<row><label value="Email"/><label value="@load(vm.dataBean.email)"/></row>
|
|
||||||
<row><label value="Web"/><label value="@load(vm.dataBean.web)"/></row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
<label value="Poznámka:" visible="@load(not empty vm.dataBean.description)" sclass="bold"/>
|
|
||||||
<html style="font-family:arial,sans-serif;font-size:12px;" content="@load(vm.dataBean.description)"/>
|
|
||||||
<mapa address="@load((empty vm.dataBean.street ? vm.dataBean.city : vm.dataBean.street).concat(' ').concat(vm.dataBean.houseNumber).concat(', ').concat(vm.dataBean.city))" width="360px" height="180px" visible="@load(vm.dataBean ne null)"/>
|
|
||||||
</div>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
|
|
||||||
</window>
|
|
||||||
|
|
||||||
|
<div hflex="4">
|
||||||
|
<label value="${labels.SuppliersGridColumnDetail}:" sclass="bold" />
|
||||||
|
<grid visible="@load(vm.dataBean ne null)" hflex="1">
|
||||||
|
<columns>
|
||||||
|
<column hflex="min" />
|
||||||
|
<column />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${labels.SuppliersGridColumnDepartment}" />
|
||||||
|
<label value="@load(vm.dataBean.department)" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${labels.SuppliersGridColumnPhone}" />
|
||||||
|
<label value="@load(vm.dataBean.phone)" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${labels.SuppliersGridColumnEmail}" />
|
||||||
|
<label value="@load(vm.dataBean.email)" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label value="${labels.SuppliersGridColumnWWW}" />
|
||||||
|
<label value="@load(vm.dataBean.web)" />
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<label value="${labels.SuppliersGridColumnNote}:" visible="@load(not empty vm.dataBean.description)" sclass="bold" />
|
||||||
|
<html style="font-family:arial,sans-serif;font-size:12px;" content="@load(vm.dataBean.description)" />
|
||||||
|
<mapa address="@load((empty vm.dataBean.street ? vm.dataBean.city : vm.dataBean.street).concat(' ').concat(vm.dataBean.houseNumber).concat(', ').concat(vm.dataBean.city))" width="100%" height="300px" visible="@load(vm.dataBean ne null)" />
|
||||||
|
</div>
|
||||||
|
</hbox>
|
||||||
|
</window>
|
||||||
</zk>
|
</zk>
|
@ -1,92 +1,91 @@
|
|||||||
<?page title="Uživatelé" contentType="text/html;charset=UTF-8"?>
|
<?page title="${labels.AgendaUsers}" contentType="text/html;charset=UTF-8"?>
|
||||||
<zk>
|
<zk>
|
||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
<window title="Uživatelé" border="normal" apply="org.zkoss.bind.BindComposer"
|
<window border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UsersList')" height="570px">
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UsersList')" height="570px">
|
<caption zclass="form-caption" label="${labels.AgendaUsers}" />
|
||||||
|
<include src="/app/toolbar.zul" />
|
||||||
|
|
||||||
<include src="/app/toolbar.zul"/>
|
<hbox width="100%" height="500px">
|
||||||
|
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px">
|
||||||
|
<listhead menupopup="auto">
|
||||||
|
<listheader label="${labels.UsersGridColumnLogin}" sort="auto(username)" />
|
||||||
|
<listheader label="${labels.UsersGridColumnPersonalID}" sort="auto(personalNumber)" />
|
||||||
|
<listheader label="${labels.UsersGridColumnFirstName}" sort="auto(firstName)" />
|
||||||
|
<listheader label="${labels.UsersGridColumnSureName}" sort="auto(lastName)" />
|
||||||
|
</listhead>
|
||||||
|
|
||||||
<hbox width="100%" height="500px">
|
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
||||||
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px">
|
<auxheader>
|
||||||
<listhead>
|
<div sclass="find-grid-cell">
|
||||||
<listheader label="Login"/>
|
<div sclass="find-grid-divtextbox">
|
||||||
<listheader label="Osobní číslo"/>
|
<textbox value="@bind(vm.filterTemplate.username)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
||||||
<listheader label="Jméno"/>
|
</div>
|
||||||
<listheader label="Příjmení"/>
|
<div sclass="find-grid-img">
|
||||||
</listhead>
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
|
<auxheader>
|
||||||
|
<div sclass="find-grid-cell">
|
||||||
|
<div sclass="find-grid-divtextbox">
|
||||||
|
<textbox value="@bind(vm.filterTemplate.personalNumber)" 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.firstName)" 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.lastName)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
||||||
|
</div>
|
||||||
|
<div sclass="find-grid-img">
|
||||||
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
|
</auxhead>
|
||||||
|
|
||||||
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
<template name="model">
|
||||||
<auxheader>
|
<listitem>
|
||||||
<div sclass="find-grid-cell">
|
<listcell label="@load(each.username)" />
|
||||||
<div sclass="find-grid-divtextbox">
|
<listcell label="@load(each.personalNumber)" />
|
||||||
<textbox value="@bind(vm.filterTemplate.username)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
<listcell label="@load(each.firstName)" />
|
||||||
</div>
|
<listcell label="@load(each.lastName)" />
|
||||||
<div sclass="find-grid-img">
|
</listitem>
|
||||||
<image src="/img/funnel.png" />
|
</template>
|
||||||
</div>
|
</listbox>
|
||||||
</div>
|
<panel hflex="1" height="480px" width="70%">
|
||||||
</auxheader>
|
<panelchildren style="overflow:auto;">
|
||||||
<auxheader>
|
<label value="Efektivní práva:" style="font-weight: bold;" />
|
||||||
<div sclass="find-grid-cell">
|
<vbox children="@load(vm.modules)" hflex="1">
|
||||||
<div sclass="find-grid-divtextbox">
|
<template name="children" var="module">
|
||||||
<textbox value="@bind(vm.filterTemplate.personalNumber)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
|
<groupbox closable="false" mold="3d" hflex="1">
|
||||||
</div>
|
<caption label="@load(module.name)" />
|
||||||
<div sclass="find-grid-img">
|
<hbox children="@load(vm.permissions)">
|
||||||
<image src="/img/funnel.png" />
|
<template name="children" var="perm">
|
||||||
</div>
|
<label value="@load(perm.description.concat(', '))" visible="@load(module.id eq perm.module)" />
|
||||||
</div>
|
</template>
|
||||||
</auxheader>
|
</hbox>
|
||||||
<auxheader>
|
</groupbox>
|
||||||
<div sclass="find-grid-cell">
|
|
||||||
<div sclass="find-grid-divtextbox">
|
|
||||||
<textbox value="@bind(vm.filterTemplate.firstName)" 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.lastName)" 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">
|
|
||||||
<listitem>
|
|
||||||
<listcell label="@load(each.username)"/>
|
|
||||||
<listcell label="@load(each.personalNumber)"/>
|
|
||||||
<listcell label="@load(each.firstName)"/>
|
|
||||||
<listcell label="@load(each.lastName)"/>
|
|
||||||
</listitem>
|
|
||||||
</template>
|
|
||||||
</listbox>
|
|
||||||
<panel hflex="1" height="480px" width="70%">
|
|
||||||
<panelchildren style="overflow:auto;">
|
|
||||||
<label value="Efektivní práva:" style="font-weight: bold;"/>
|
|
||||||
<vbox children="@load(vm.modules)" hflex="1">
|
|
||||||
<template name="children" var="module">
|
|
||||||
<groupbox closable="false" mold="3d" hflex="1">
|
|
||||||
<caption label="@load(module.name)"/>
|
|
||||||
<hbox children="@load(vm.permissions)">
|
|
||||||
<template name="children" var="perm">
|
|
||||||
<label value="@load(perm.description.concat(', '))" visible="@load(module.id eq perm.module)"/>
|
|
||||||
</template>
|
</template>
|
||||||
</hbox>
|
</vbox>
|
||||||
</groupbox>
|
</panelchildren>
|
||||||
</template>
|
|
||||||
</vbox>
|
|
||||||
</panelchildren>
|
|
||||||
|
|
||||||
</panel>
|
</panel>
|
||||||
|
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
</window>
|
</window>
|
||||||
</zk>
|
</zk>
|
@ -1,10 +1,10 @@
|
|||||||
<?page title="toolbar" contentType="text/html;charset=UTF-8"?>
|
<?page title="toolbar" contentType="text/html;charset=UTF-8"?>
|
||||||
<zk>
|
<zk>
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<toolbarbutton image="/img/add.png" tooltiptext="Nový" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
|
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
|
||||||
<toolbarbutton image="/img/edit.png" tooltiptext="Upravit" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
|
<toolbarbutton image="/img/edit.png" tooltiptext="${labels.ToolbarRecEdit}" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
|
||||||
<toolbarbutton image="/img/delete.png" tooltiptext="Smazat" id="btnDelete" onClick="@command('delete')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
|
<toolbarbutton image="/img/delete.png" tooltiptext="${labels.ToolbarRecDelete}" id="btnDelete" onClick="@command('delete')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
|
||||||
<toolbarbutton image="/img/funnel.png" tooltiptext="Filtr" id="btnFilter" onClick="@command('filter')" />
|
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
|
||||||
<toolbarbutton image="/img/print.png" tooltiptext="Filtr" id="btnPrint" onClick="@command('onPrint')" />
|
<toolbarbutton image="/img/print.png" tooltiptext="${labels.ToolbarPrint}" id="btnPrint" onClick="@command('onPrint')" />
|
||||||
</toolbar>
|
</toolbar>
|
||||||
</zk>
|
</zk>
|
Loading…
Reference in New Issue