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.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.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>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window id="editWin" title="Adresa" border="normal" apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressForm')"
|
||||
closable="true" width="600px">
|
||||
|
||||
<grid width="580px">
|
||||
<columns>
|
||||
<column label="" hflex="min"/>
|
||||
<column label="" hflex="min"/>
|
||||
<column label=""/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<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="Hledat v ARESu" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((vm.dataBean.ic == 0) && (empty vm.dataBean.company))" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="IČ" /> <textbox value="@bind(vm.dataBean.ic)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="DIČ" /> <textbox value="@bind(vm.dataBean.dic)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Oddělení" /> <textbox value="@bind(vm.dataBean.department)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Kontaktní osoba" /> <textbox value="@bind(vm.dataBean.contactName)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Ulice" /> <textbox value="@bind(vm.dataBean.street)" width="320px"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Číslo domu" /> <textbox value="@bind(vm.dataBean.houseNumber)" width="80px"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Město" /> <textbox id="city" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.city)" width="320px"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="PSČ" /> <textbox value="@bind(vm.dataBean.zipCode)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Telefon" /> <textbox value="@bind(vm.dataBean.phone)"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="E-mail" /> <textbox id="email" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.email)" width="320px"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Web" /> <textbox id="web" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.web)" width="320px"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hlayout>
|
||||
<panel>
|
||||
<panelchildren>
|
||||
<vlayout>
|
||||
<panel>
|
||||
<panelchildren><label value="Poznámka"/> </panelchildren>
|
||||
</panel>
|
||||
<panel>
|
||||
<panelchildren><ckeditor height="65px" width="330px" toolbar="Basic" value="@bind(vm.dataBean.description)"/>
|
||||
</panelchildren>
|
||||
</panel>
|
||||
</vlayout>
|
||||
</panelchildren>
|
||||
</panel>
|
||||
</hlayout>
|
||||
<include src="/app/formButtons.zul"/>
|
||||
</window>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window id="editWin" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressForm')" closable="true" width="600px">
|
||||
<caption zclass="form-caption" label="${labels.SuppliersFormTitle}" />
|
||||
<grid width="580px">
|
||||
<columns>
|
||||
<column label="" hflex="min" />
|
||||
<column label="" hflex="min" />
|
||||
<column label="" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormCompany}" />
|
||||
<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))" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormIC}" />
|
||||
<textbox value="@bind(vm.dataBean.ic)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormDIC}" />
|
||||
<textbox value="@bind(vm.dataBean.dic)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormDepartment}" />
|
||||
<textbox value="@bind(vm.dataBean.department)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormContact}" />
|
||||
<textbox value="@bind(vm.dataBean.contactName)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormStreet}" />
|
||||
<textbox value="@bind(vm.dataBean.street)" width="320px" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormNo}" />
|
||||
<textbox value="@bind(vm.dataBean.houseNumber)" width="80px" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormCity}" />
|
||||
<textbox id="city" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.city)" width="320px" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormZIP}" />
|
||||
<textbox value="@bind(vm.dataBean.zipCode)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormPhone}" />
|
||||
<textbox value="@bind(vm.dataBean.phone)" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormEmail}" />
|
||||
<textbox id="email" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.email)" width="320px" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.SuppliersFormWWW}" />
|
||||
<textbox id="web" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.web)" width="320px" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hlayout>
|
||||
<panel>
|
||||
<panelchildren>
|
||||
<vlayout>
|
||||
<panel>
|
||||
<panelchildren>
|
||||
<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>
|
@ -1,120 +1,126 @@
|
||||
<?page title="Dodavatelé" contentType="text/html;charset=UTF-8"?>
|
||||
<?page title="${labels.AgendaSuppliers}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window title="Dodavatelé" border="normal"
|
||||
apply="org.zkoss.bind.BindComposer" height="570px"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressList')">
|
||||
|
||||
<include src="/app/toolbar.zul"/>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window border="normal" apply="org.zkoss.bind.BindComposer" height="570px" viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressList')">
|
||||
<caption zclass="form-caption" label="${labels.AgendaSuppliers}" />
|
||||
<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">
|
||||
<listheader label="Firma" sort="auto(company)" onSort="@command('onSort', column='company')" />
|
||||
<listheader label="IČ" width="100px"/>
|
||||
<listheader label="Kontaktní osoba"/>
|
||||
<listheader label="Ulice"/>
|
||||
<listheader label="Číslo domu" width="80px"/>
|
||||
<listheader label="Město" sort="auto(city)" onSort="@command('onSort', column='city')"/>
|
||||
</listhead>
|
||||
<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>
|
||||
|
||||
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<textbox value="@bind(vm.filterTemplate.company)" 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.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)">
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<textbox value="@bind(vm.filterTemplate.company)" 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.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>
|
||||
<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="${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>
|
@ -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>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window title="Uživatelé" border="normal" apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UsersList')" height="570px">
|
||||
|
||||
<include src="/app/toolbar.zul"/>
|
||||
|
||||
<hbox width="100%" height="500px">
|
||||
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px">
|
||||
<listhead>
|
||||
<listheader label="Login"/>
|
||||
<listheader label="Osobní číslo"/>
|
||||
<listheader label="Jméno"/>
|
||||
<listheader label="Příjmení"/>
|
||||
</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.username)" 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.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>
|
||||
|
||||
<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>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</template>
|
||||
</vbox>
|
||||
</panelchildren>
|
||||
|
||||
</panel>
|
||||
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UsersList')" height="570px">
|
||||
<caption zclass="form-caption" label="${labels.AgendaUsers}" />
|
||||
<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>
|
||||
|
||||
<auxhead sclass="category-center" visible="@load(vm.filter)">
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<textbox value="@bind(vm.filterTemplate.username)" 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.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>
|
||||
|
||||
<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>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</template>
|
||||
</vbox>
|
||||
</panelchildren>
|
||||
|
||||
</panel>
|
||||
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
</zk>
|
@ -1,10 +1,10 @@
|
||||
<?page title="toolbar" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
<toolbar>
|
||||
<toolbarbutton image="/img/add.png" tooltiptext="Nový" 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/delete.png" tooltiptext="Smazat" 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/print.png" tooltiptext="Filtr" id="btnPrint" onClick="@command('onPrint')" />
|
||||
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
|
||||
<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="${labels.ToolbarRecDelete}" id="btnDelete" onClick="@command('delete')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
|
||||
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
|
||||
<toolbarbutton image="/img/print.png" tooltiptext="${labels.ToolbarPrint}" id="btnPrint" onClick="@command('onPrint')" />
|
||||
</toolbar>
|
||||
</zk>
|
Loading…
Reference in New Issue