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 #83
multitenant
František Přibyl 11 years ago
parent 0f9d1baf94
commit 1c19625ffb

@ -303,6 +303,12 @@
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>ar.com.fdvs</groupId>
<artifactId>DynamicJasper-core-fonts</artifactId>
<version>1.0</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>

@ -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>

@ -2,19 +2,67 @@
AppName=Objednávkový systém SPŠ Třebíč
AgendaBuildings=Budovy
BuildingsFormTitle=Budova
BuildingsFormCode=Kód
BuildingsFormName=Název
BuildingsFormDescription=Popis
BuildingsGridColumnCode=Kód
BuildingsGridColumnName=Název
BuildingsGridColumnDescription=Popis
AgendaRights=Práva
RightsFormTitle=Práva
RightsGridRole=Role
RightsGridModules=Práva modulů
AgendaSuppliers=Dodavatelé
SuppliersFormTitle=Dodavatel
SuppliersFormCompany=Název firmy
SuppliersFormFindInARES=Hledat v ARESu
SuppliersFormIC=
SuppliersFormDIC=DIČ
SuppliersFormDepartment=Oddělení
SuppliersFormContact=Kontaktní osoba
SuppliersFormStreet=Ulice
SuppliersFormNo=Číslo domu
SuppliersFormCity=Město
SuppliersFormZIP=PSČ
SuppliersFormPhone=Telefon
SuppliersFormEmail=E-mail
SuppliersFormWWW=Web
SuppliersFormNote=Poznámka
SuppliersGridColumnCompany=Firma
SuppliersGridColumnIC=
SuppliersGridColumnContact=Kontaktní osoba
SuppliersGridColumnStreet=Ulice
SuppliersGridColumnNo=Číslo domu
SuppliersGridColumnCity=Město
SuppliersGridColumnDetail=Detail
SuppliersGridColumnDepartment=Oddělení
SuppliersGridColumnPhone=Telefon
SuppliersGridColumnEmail=E-mail
SuppliersGridColumnWWW=Web
SuppliersGridColumnNote=Poznámka
AgendaUsers=Uživatelé
UsersFormTitle=Uživatel
UsersFormLogin=Login
UsersFormPersonalID=Osobní číslo
UsersFormFirstName=Jméno
UsersFormSureName=Příjmení
UsersFormEmail=E-mail
UsersFormSendNotify=Zasílat upozornění
UsersFormPassword=Heslo
UsersFormRepeatPassword=Znovu heslo
UsersFormActive=Aktivní
UsersGridColumnLogin=Login
UsersGridColumnPersonalID=Osobní číslo
UsersGridColumnFirstName=Jméno
UsersGridColumnSureName=Příjmení
ButtonStorno=Storno
ButtonSave=Uložit
FormBuilding=Budova
HeaderText=Hlavička
@ -22,6 +70,7 @@ ToolbarRecNew=Nový záznam
ToolbarRecEdit=Úprava aktuálního záznamu
ToolbarRecDelete=Odstranit aktuální záznam
ToolbarRecFilter=Filtr záznamů
ToolbarPrint=Tisk
ReportReport=Sestava
ReportSend=Odeslat

@ -21,6 +21,7 @@
<language-config>
<addon-uri>/WEB-INF/mapa-lang-addon.xml</addon-uri>
<addon-uri>/WEB-INF/ckez-bind-lang-addon.xml</addon-uri>
<addon-uri>/WEB-INF/lang-addons/CzechSortListheader.xml</addon-uri>
</language-config>
<desktop-config>

@ -1,10 +1,8 @@
<?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">
<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" />
@ -13,41 +11,53 @@
</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) &amp;&amp; (empty vm.dataBean.company))" />
<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) &amp;&amp; (empty vm.dataBean.company))" />
</row>
<row>
<label value="IČ" /> <textbox value="@bind(vm.dataBean.ic)"/>
<label value="${labels.SuppliersFormIC}" />
<textbox value="@bind(vm.dataBean.ic)" />
</row>
<row>
<label value="DIČ" /> <textbox value="@bind(vm.dataBean.dic)"/>
<label value="${labels.SuppliersFormDIC}" />
<textbox value="@bind(vm.dataBean.dic)" />
</row>
<row>
<label value="Oddělení" /> <textbox value="@bind(vm.dataBean.department)"/>
<label value="${labels.SuppliersFormDepartment}" />
<textbox value="@bind(vm.dataBean.department)" />
</row>
<row>
<label value="Kontaktní osoba" /> <textbox value="@bind(vm.dataBean.contactName)"/>
<label value="${labels.SuppliersFormContact}" />
<textbox value="@bind(vm.dataBean.contactName)" />
</row>
<row>
<label value="Ulice" /> <textbox value="@bind(vm.dataBean.street)" width="320px"/>
<label value="${labels.SuppliersFormStreet}" />
<textbox value="@bind(vm.dataBean.street)" width="320px" />
</row>
<row>
<label value="Číslo domu" /> <textbox value="@bind(vm.dataBean.houseNumber)" width="80px"/>
<label value="${labels.SuppliersFormNo}" />
<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"/>
<label value="${labels.SuppliersFormCity}" />
<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)"/>
<label value="${labels.SuppliersFormZIP}" />
<textbox value="@bind(vm.dataBean.zipCode)" />
</row>
<row>
<label value="Telefon" /> <textbox value="@bind(vm.dataBean.phone)"/>
<label value="${labels.SuppliersFormPhone}" />
<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"/>
<label value="${labels.SuppliersFormEmail}" />
<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"/>
<label value="${labels.SuppliersFormWWW}" />
<textbox id="web" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.web)" width="320px" />
</row>
</rows>
</grid>
@ -56,10 +66,13 @@
<panelchildren>
<vlayout>
<panel>
<panelchildren><label value="Poznámka"/> </panelchildren>
<panelchildren>
<label value="${labels.SuppliersFormNote}" />
</panelchildren>
</panel>
<panel>
<panelchildren><ckeditor height="65px" width="330px" toolbar="Basic" value="@bind(vm.dataBean.description)"/>
<panelchildren>
<ckeditor height="65px" width="100%" toolbar="Basic" value="@bind(vm.dataBean.description)" />
</panelchildren>
</panel>
</vlayout>

@ -1,22 +1,19 @@
<?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')">
<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')"/>
<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)">
@ -95,26 +92,35 @@
</listbox>
<div hflex="4">
<label value="Detail:" sclass="bold"/>
<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="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>
<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="Poznámka:" visible="@load(not empty vm.dataBean.description)" sclass="bold"/>
<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="360px" height="180px" visible="@load(vm.dataBean ne null)"/>
<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,4 +1,4 @@
<?page title="Dodavatelé" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.AgendaSuppliers}" contentType="text/html;charset=UTF-8"?>
<?script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB6sVWLvFMvbK994Pa418XDhbDUZ6Xr4CQ&amp;sensor=false"?>
<zk>

@ -1,4 +1,4 @@
<?page title="Uživatelé" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.AgendaRights}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>

@ -1,8 +1,8 @@
<?page title="Uživatel" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.RightsFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="editWin" title="Uživatel" border="normal" closable="true" width="550px" apply="org.zkoss.bind.BindComposer"
<window id="editWin" border="normal" closable="true" width="550px" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionForm')">
<caption zclass="form-caption" label="${labels.AgendaRights}" />
<label value="@load(vm.dataBean.description)" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" width="530px">

@ -1,17 +1,17 @@
<?page title="Práva" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.AgendaRights}" contentType="text/html;charset=UTF-8"?>
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window title="Práva" border="normal" apply="org.zkoss.bind.BindComposer"
<window border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionsList')" height="570px">
<caption zclass="form-caption" label="${labels.AgendaRights}" />
<toolbar>
<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')"/>
</toolbar>
<hbox width="100%">
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="300px">
<listhead>
<listheader label="Role"/>
<listheader label="${labels.RightsGridRole}"/>
</listhead>
<template name="model">
<listitem>
@ -21,7 +21,7 @@
</listbox>
<panel hflex="1" height="480px">
<panelchildren style="overflow:auto;">
<label value="Práva modulů:" style="font-weight: bold;"/>
<label value="${labels.RightsGridModules}:" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" hflex="1">
<template name="children" var="module">
<groupbox closable="false" mold="3d" hflex="1">

@ -1,4 +1,4 @@
<?page title="Uživatelé" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.AgendaUsers}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>

@ -1,8 +1,9 @@
<?page title="Uživatel" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.UsersFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="editWin" title="Uživatel" border="normal" closable="true" width="450px" apply="org.zkoss.bind.BindComposer"
<window id="editWin" border="normal" closable="true" width="450px" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UserForm')">
<caption zclass="form-caption" label="${labels.UsersFormTitle}" />
<grid width="440px">
<columns>
<column hflex="min"></column>
@ -10,15 +11,15 @@
<column></column>
</columns>
<rows>
<row><label value="Login"/><textbox value="@bind(vm.dataBean.username)" instant="true" disabled="@load(vm.edit)" onChange="@command('checkLogin')"/><label value="Login je obsazený" sclass="error" visible="@load(not vm.loginFree)"/></row>
<row><label value="Jméno"/><textbox value="@bind(vm.dataBean.firstName)"/></row>
<row><label value="Příjmení"/><textbox value="@bind(vm.dataBean.lastName)"/></row>
<row><label value="Osobní číslo"/><textbox value="@bind(vm.dataBean.personalNumber)" width="90px"/></row>
<row><label value="E-mail"/><textbox value="@bind(vm.dataBean.email)"/></row>
<row><label value=""/><checkbox label="Zasílat upozornění" checked="@bind(vm.dataBean.notify)"/></row>
<row><label value="Heslo"/><textbox value="@bind(vm.password)" type="password" instant="true"/></row>
<row><label value="Znova heslo"/><textbox value="@bind(vm.retPasswd)" type="password" instant="true"/><label value="Hesla nesouhlasí" sclass="error" visible="@load(not vm.pwMatches)"/></row>
<row><label value=""/><checkbox label="Aktivní" checked="@bind(vm.dataBean.enabled)"/></row>
<row><label value="${labels.UsersFormLogin}"/><textbox value="@bind(vm.dataBean.username)" instant="true" disabled="@load(vm.edit)" onChange="@command('checkLogin')"/><label value="Login je obsazený" sclass="error" visible="@load(not vm.loginFree)"/></row>
<row><label value="${labels.UsersFormFirstName}"/><textbox value="@bind(vm.dataBean.firstName)"/></row>
<row><label value="${labels.UsersFormSureName}"/><textbox value="@bind(vm.dataBean.lastName)"/></row>
<row><label value="${labels.UsersFormPersonalID}"/><textbox value="@bind(vm.dataBean.personalNumber)" width="90px"/></row>
<row><label value="${labels.UsersFormEmail}"/><textbox value="@bind(vm.dataBean.email)"/></row>
<row><label value=""/><checkbox label="${labels.UsersFormSendNotify}" checked="@bind(vm.dataBean.notify)"/></row>
<row><label value="${labels.UsersFormPassword}"/><textbox value="@bind(vm.password)" type="password" instant="true"/></row>
<row><label value="${labels.UsersFormRepeatPassword}"/><textbox value="@bind(vm.retPasswd)" type="password" instant="true"/><label value="Hesla nesouhlasí" sclass="error" visible="@load(not vm.pwMatches)"/></row>
<row><label value=""/><checkbox label="${labels.UsersFormActive}" checked="@bind(vm.dataBean.enabled)"/></row>
</rows>
</grid>
<groupbox mold="3d">
@ -29,6 +30,6 @@
</template>
</vbox>
</groupbox>
<button image="/img/save.png" label="Uložit" onClick="@command('save', window=editWin) @global-command('refresh')" disabled="@load(not vm.canSave)" sclass="nicebutton" /><button image="~./zul/img/misc/drag-disallow.png" label="Zavřít" onClick="editWin.detach()" sclass="nicebutton"/>
<include src="/app/formButtons.zul" />
</window>
</zk>

@ -1,18 +1,17 @@
<?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">
<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>
<listheader label="Login"/>
<listheader label="Osobní číslo"/>
<listheader label="Jméno"/>
<listheader label="Příjmení"/>
<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)">

@ -3,7 +3,7 @@
<vlayout>
<div hflex="max" align="right">
<button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="editWin.detach()" sclass="nicebutton" />
<button image="/img/save.png" label="${labels.ButtonSave}" onClick="@command('save', window=editWin) @global-command('refresh')" sclass="nicebutton" />
<button image="/img/save.png" label="${labels.ButtonSave}" onClick="@command('save', window=editWin) @global-command('refresh')" disabled="@load(not vm.canSave)" sclass="nicebutton" />
</div>
</vlayout>
</zk>

@ -27,7 +27,7 @@
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="Uživatelé" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}" width="120px"/>
<menuitem label="${labels.AgendaUsers}" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}" width="120px"/>
<menuitem label="Práva" href="/admin/permissions" disabled="${not sec:isAllGranted('ROLE_ADMIN')}"/>
<menuitem label="Střediska" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}"/>
<menuitem label="${labels.AgendaBuildings}" href="/buildings" disabled="${not sec:isAllGranted('PERM_READ_BUILDINGS')}"/>

@ -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>

@ -6,10 +6,10 @@
<include src="/app/toolbar.zul" />
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
<listhead>
<listheader label="${labels.BuildingsGridColumnCode}" sort="auto(code)" onSort="@command('onSort', column='code')" width="10%" />
<listheader label="${labels.BuildingsGridColumnName}" sort="auto(name)" onSort="@command('onSort', column='name')" width="30%" />
<listheader label="${labels.BuildingsGridColumnDescription}" sort="auto(description)" onSort="@command('onSort', column='description')" width="60%" />
<listhead menupopup="auto">
<listheader label="${labels.BuildingsGridColumnCode}" sort="auto(code)" width="10%" />
<listheader label="${labels.BuildingsGridColumnName}" sort="auto(name)" width="30%" />
<listheader label="${labels.BuildingsGridColumnDescription}" sort="auto(description)" width="60%" />
</listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)">

@ -1,7 +1,7 @@
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.BuildingsFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk>
<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.BuildingsFormTitle}" />
<vlayout>
<grid hflex="min">
<columns>

@ -1,4 +1,4 @@
<?page title="${labels.agenda.buildings}" contentType="text/html;charset=UTF-8"?>
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>

Loading…
Cancel
Save