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> <version>5.0.0</version>
</dependency> </dependency>
<dependency>
<groupId>ar.com.fdvs</groupId>
<artifactId>DynamicJasper-core-fonts</artifactId>
<version>1.0</version>
</dependency>
<!-- Test --> <!-- Test -->
<dependency> <dependency>
<groupId>junit</groupId> <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.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>

@ -2,19 +2,67 @@
AppName=Objednávkový systém SPŠ Třebíč AppName=Objednávkový systém SPŠ Třebíč
AgendaBuildings=Budovy AgendaBuildings=Budovy
BuildingsFormTitle=Budova
BuildingsFormCode=Kód BuildingsFormCode=Kód
BuildingsFormName=Název BuildingsFormName=Název
BuildingsFormDescription=Popis BuildingsFormDescription=Popis
BuildingsGridColumnCode=Kód BuildingsGridColumnCode=Kód
BuildingsGridColumnName=Název BuildingsGridColumnName=Název
BuildingsGridColumnDescription=Popis 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 ButtonStorno=Storno
ButtonSave=Uložit ButtonSave=Uložit
FormBuilding=Budova
HeaderText=Hlavička HeaderText=Hlavička
@ -22,6 +70,7 @@ ToolbarRecNew=Nový záznam
ToolbarRecEdit=Úprava aktuálního záznamu ToolbarRecEdit=Úprava aktuálního záznamu
ToolbarRecDelete=Odstranit aktuální záznam ToolbarRecDelete=Odstranit aktuální záznam
ToolbarRecFilter=Filtr záznamů ToolbarRecFilter=Filtr záznamů
ToolbarPrint=Tisk
ReportReport=Sestava ReportReport=Sestava
ReportSend=Odeslat ReportSend=Odeslat

@ -21,6 +21,7 @@
<language-config> <language-config>
<addon-uri>/WEB-INF/mapa-lang-addon.xml</addon-uri> <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/ckez-bind-lang-addon.xml</addon-uri>
<addon-uri>/WEB-INF/lang-addons/CzechSortListheader.xml</addon-uri>
</language-config> </language-config>
<desktop-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> <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"> <grid width="580px">
<columns> <columns>
<column label="" hflex="min" /> <column label="" hflex="min" />
@ -13,41 +11,53 @@
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="Firma" /> <textbox id="company" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.company)" instant="true" width="320px"/> <label value="${labels.SuppliersFormCompany}" />
<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))" /> <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>
<row> <row>
<label value="IČ" /> <textbox value="@bind(vm.dataBean.ic)"/> <label value="${labels.SuppliersFormIC}" />
<textbox value="@bind(vm.dataBean.ic)" />
</row> </row>
<row> <row>
<label value="DIČ" /> <textbox value="@bind(vm.dataBean.dic)"/> <label value="${labels.SuppliersFormDIC}" />
<textbox value="@bind(vm.dataBean.dic)" />
</row> </row>
<row> <row>
<label value="Oddělení" /> <textbox value="@bind(vm.dataBean.department)"/> <label value="${labels.SuppliersFormDepartment}" />
<textbox value="@bind(vm.dataBean.department)" />
</row> </row>
<row> <row>
<label value="Kontaktní osoba" /> <textbox value="@bind(vm.dataBean.contactName)"/> <label value="${labels.SuppliersFormContact}" />
<textbox value="@bind(vm.dataBean.contactName)" />
</row> </row>
<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>
<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>
<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>
<row> <row>
<label value="PSČ" /> <textbox value="@bind(vm.dataBean.zipCode)"/> <label value="${labels.SuppliersFormZIP}" />
<textbox value="@bind(vm.dataBean.zipCode)" />
</row> </row>
<row> <row>
<label value="Telefon" /> <textbox value="@bind(vm.dataBean.phone)"/> <label value="${labels.SuppliersFormPhone}" />
<textbox value="@bind(vm.dataBean.phone)" />
</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.SuppliersFormEmail}" />
<textbox id="email" constraint="@load(vm.constriant)" value="@bind(vm.dataBean.email)" width="320px" />
</row> </row>
<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> </row>
</rows> </rows>
</grid> </grid>
@ -56,10 +66,13 @@
<panelchildren> <panelchildren>
<vlayout> <vlayout>
<panel> <panel>
<panelchildren><label value="Poznámka"/> </panelchildren> <panelchildren>
<label value="${labels.SuppliersFormNote}" />
</panelchildren>
</panel> </panel>
<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> </panelchildren>
</panel> </panel>
</vlayout> </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> <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%"> <hbox width="100%">
<listbox id="dataGrid" model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" <listbox id="dataGrid" model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" onAfterRender="@command('afterRender')" selectedIndex="@load(vm.selIndex)" hflex="6" height="480px">
onAfterRender="@command('afterRender')" selectedIndex="@load(vm.selIndex)" hflex="6" height="480px"> <listhead vflex="true" menupopup="auto">
<listhead vflex="true"> <listheader label="${labels.SuppliersGridColumnCompany}" sort="auto(company)" />
<listheader label="Firma" sort="auto(company)" onSort="@command('onSort', column='company')" /> <listheader label="${labels.SuppliersGridColumnIC}" sort="auto(ic)" width="100px" />
<listheader label="IČ" width="100px"/> <listheader label="${labels.SuppliersGridColumnContact}" sort="auto(contactName)" />
<listheader label="Kontaktní osoba"/> <listheader label="${labels.SuppliersGridColumnStreet}" sort="auto(street)" />
<listheader label="Ulice"/> <listheader label="${labels.SuppliersGridColumnNo}" sort="auto(houseNumber)" width="80px" />
<listheader label="Číslo domu" width="80px"/> <listheader label="${labels.SuppliersGridColumnCity}" sort="auto(city)" />
<listheader label="Město" sort="auto(city)" onSort="@command('onSort', column='city')"/>
</listhead> </listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)"> <auxhead sclass="category-center" visible="@load(vm.filter)">
@ -95,26 +92,35 @@
</listbox> </listbox>
<div hflex="4"> <div hflex="4">
<label value="Detail:" sclass="bold"/> <label value="${labels.SuppliersGridColumnDetail}:" sclass="bold" />
<grid visible="@load(vm.dataBean ne null)" hflex="1"> <grid visible="@load(vm.dataBean ne null)" hflex="1">
<columns> <columns>
<column hflex="min" /> <column hflex="min" />
<column /> <column />
</columns> </columns>
<rows> <rows>
<row><label value="Oddělení"/><label value="@load(vm.dataBean.department)"/></row> <row>
<row><label value="Telefon"/><label value="@load(vm.dataBean.phone)"/></row> <label value="${labels.SuppliersGridColumnDepartment}" />
<row><label value="Email"/><label value="@load(vm.dataBean.email)"/></row> <label value="@load(vm.dataBean.department)" />
<row><label value="Web"/><label value="@load(vm.dataBean.web)"/></row> </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> </rows>
</grid> </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)" /> <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> </div>
</hbox> </hbox>
</window> </window>
</zk> </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"?> <?script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB6sVWLvFMvbK994Pa418XDhbDUZ6Xr4CQ&amp;sensor=false"?>
<zk> <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> <zk>
<zscript> <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> <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')"> 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;"/> <label value="@load(vm.dataBean.description)" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" width="530px"> <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> <zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?> <?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"> viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionsList')" height="570px">
<caption zclass="form-caption" label="${labels.AgendaRights}" />
<toolbar> <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> </toolbar>
<hbox width="100%"> <hbox width="100%">
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="300px"> <listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="300px">
<listhead> <listhead>
<listheader label="Role"/> <listheader label="${labels.RightsGridRole}"/>
</listhead> </listhead>
<template name="model"> <template name="model">
<listitem> <listitem>
@ -21,7 +21,7 @@
</listbox> </listbox>
<panel hflex="1" height="480px"> <panel hflex="1" height="480px">
<panelchildren style="overflow:auto;"> <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"> <vbox children="@load(vm.modules)" hflex="1">
<template name="children" var="module"> <template name="children" var="module">
<groupbox closable="false" mold="3d" hflex="1"> <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> <zk>
<zscript> <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> <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')"> viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UserForm')">
<caption zclass="form-caption" label="${labels.UsersFormTitle}" />
<grid width="440px"> <grid width="440px">
<columns> <columns>
<column hflex="min"></column> <column hflex="min"></column>
@ -10,15 +11,15 @@
<column></column> <column></column>
</columns> </columns>
<rows> <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="${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="Jméno"/><textbox value="@bind(vm.dataBean.firstName)"/></row> <row><label value="${labels.UsersFormFirstName}"/><textbox value="@bind(vm.dataBean.firstName)"/></row>
<row><label value="Příjmení"/><textbox value="@bind(vm.dataBean.lastName)"/></row> <row><label value="${labels.UsersFormSureName}"/><textbox value="@bind(vm.dataBean.lastName)"/></row>
<row><label value="Osobní číslo"/><textbox value="@bind(vm.dataBean.personalNumber)" width="90px"/></row> <row><label value="${labels.UsersFormPersonalID}"/><textbox value="@bind(vm.dataBean.personalNumber)" width="90px"/></row>
<row><label value="E-mail"/><textbox value="@bind(vm.dataBean.email)"/></row> <row><label value="${labels.UsersFormEmail}"/><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=""/><checkbox label="${labels.UsersFormSendNotify}" checked="@bind(vm.dataBean.notify)"/></row>
<row><label value="Heslo"/><textbox value="@bind(vm.password)" type="password" instant="true"/></row> <row><label value="${labels.UsersFormPassword}"/><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="${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="Aktivní" checked="@bind(vm.dataBean.enabled)"/></row> <row><label value=""/><checkbox label="${labels.UsersFormActive}" checked="@bind(vm.dataBean.enabled)"/></row>
</rows> </rows>
</grid> </grid>
<groupbox mold="3d"> <groupbox mold="3d">
@ -29,6 +30,6 @@
</template> </template>
</vbox> </vbox>
</groupbox> </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> </window>
</zk> </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> <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"> <hbox width="100%" height="500px">
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px"> <listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px">
<listhead> <listhead menupopup="auto">
<listheader label="Login"/> <listheader label="${labels.UsersGridColumnLogin}" sort="auto(username)" />
<listheader label="Osobní číslo"/> <listheader label="${labels.UsersGridColumnPersonalID}" sort="auto(personalNumber)" />
<listheader label="Jméno"/> <listheader label="${labels.UsersGridColumnFirstName}" sort="auto(firstName)" />
<listheader label="Příjmení"/> <listheader label="${labels.UsersGridColumnSureName}" sort="auto(lastName)" />
</listhead> </listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)"> <auxhead sclass="category-center" visible="@load(vm.filter)">

@ -3,7 +3,7 @@
<vlayout> <vlayout>
<div hflex="max" align="right"> <div hflex="max" align="right">
<button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="editWin.detach()" sclass="nicebutton" /> <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> </div>
</vlayout> </vlayout>
</zk> </zk>

@ -27,7 +27,7 @@
</tabpanel> </tabpanel>
<tabpanel> <tabpanel>
<menubar orient="vertical"> <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="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="Střediska" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}"/>
<menuitem label="${labels.AgendaBuildings}" href="/buildings" disabled="${not sec:isAllGranted('PERM_READ_BUILDINGS')}"/> <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"?> <?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>

@ -6,10 +6,10 @@
<include src="/app/toolbar.zul" /> <include src="/app/toolbar.zul" />
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)"> <listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
<listhead> <listhead menupopup="auto">
<listheader label="${labels.BuildingsGridColumnCode}" sort="auto(code)" onSort="@command('onSort', column='code')" width="10%" /> <listheader label="${labels.BuildingsGridColumnCode}" sort="auto(code)" width="10%" />
<listheader label="${labels.BuildingsGridColumnName}" sort="auto(name)" onSort="@command('onSort', column='name')" width="30%" /> <listheader label="${labels.BuildingsGridColumnName}" sort="auto(name)" width="30%" />
<listheader label="${labels.BuildingsGridColumnDescription}" sort="auto(description)" onSort="@command('onSort', column='description')" width="60%" /> <listheader label="${labels.BuildingsGridColumnDescription}" sort="auto(description)" width="60%" />
</listhead> </listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)"> <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> <zk>
<window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')"> <window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')">
<caption src="/img/building.png" zclass="form-caption" label="${labels.FormBuilding}" /> <caption src="/img/building.png" zclass="form-caption" label="${labels.BuildingsFormTitle}" />
<vlayout> <vlayout>
<grid hflex="min"> <grid hflex="min">
<columns> <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> <zk>
<zscript> <zscript>

Loading…
Cancel
Save