Přepracováno vertikální menu na horizontální.

closes #110
multitenant
František Přibyl 11 years ago
parent 7b6976f823
commit 568bed6f9b

@ -0,0 +1,51 @@
package info.bukova.isspst.ui;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Window;
public class MainMenu
{
private String contextPath;
private String moduleUrl;
@Init
public void init()
{
this.contextPath = Executions.getCurrent().getContextPath();
this.moduleUrl = Executions.getCurrent().getDesktop().getRequestPath();
}
public String getContextPath()
{
return this.contextPath;
}
public String getModuleUrl()
{
return this.moduleUrl;
}
@Command
public void passwd()
{
Window window = (Window) Executions.createComponents("/app/passwd.zul", null, null);
window.doModal();
}
@Command
public void numSeries()
{
Window window = (Window) Executions.createComponents("/settings/numberSeries.zul", null, null);
window.doModal();
}
@Command
public void globalSettings()
{
Window window = (Window) Executions.createComponents("/settings/globalSettings.zul", null, null);
window.doModal();
}
}

@ -1,72 +0,0 @@
package info.bukova.isspst.ui;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Window;
public class NavigationVM {
private String contextPath;
private String moduleUrl;
@Init
public void init() {
contextPath = Executions.getCurrent().getContextPath();
moduleUrl = Executions.getCurrent().getDesktop().getRequestPath();
}
@Command
public void passwd() {
Window window = (Window)Executions.createComponents("/app/passwd.zul", null, null);
window.doModal();
}
@Command
public void numSeries() {
Window window = (Window)Executions.createComponents("/settings/numberSeries.zul", null, null);
window.doModal();
}
@Command
public void globalSettings() {
Window window = (Window)Executions.createComponents("/settings/globalSettings.zul", null, null);
window.doModal();
}
public String getContextPath() {
return contextPath;
}
public String getModuleUrl() {
return moduleUrl;
}
public boolean isOrders() {
return moduleUrl.contains("orders");
}
public boolean isTrips() {
return moduleUrl.contains("trips");
}
public boolean isSettings() {
return moduleUrl.contains("settings");
}
public boolean isAdmin() {
return moduleUrl.contains("admin");
}
public boolean isUser() {
return moduleUrl.contains("passwd");
}
public boolean isLists() {
return moduleUrl.contains("lists");
}
public boolean isRequirements() {
return moduleUrl.contains("requirements");
}
}

@ -1,13 +1,6 @@
# Default file
AppName=Objednávkový systém SPŠ Třebíč
MenuRequirements=Požadavky
MenuOrders=Objednávky
MenuLists=Seznamy
MenuSettings=Nastavení
MenuAdministration=Administrace
MenuUser=Uživatel
AgendaActRequirements=Aktuální požadavky
AgendaRequirementsHistory=Ukončené požadavky
RequirementsFormTitle=Požadavek
@ -65,8 +58,6 @@ BuildingsGridColumnDescription=Popis
BuildingsGridRooms=Místnosti:
AgendaRooms=Místnosti
AgendaRights=Práva
RightsFormTitle=Práva
RightsGridRole=Role
@ -140,7 +131,6 @@ LimitFormTitle=Limit pro schválení
Limit=Limit:
OverLimit=Pouze nadlimitní
NumberSeriesFormTitle=Číselné řady
Number=Číslo:
Prefix=Prefix:
@ -156,8 +146,6 @@ EnableRequirements=Povolit zadávání požadavků
CentresForRequirements=Střediska, pro která lze vkládat požadavky
WorkgroupMembership=Členství v komisích
LogedInUser=Přihlášený uživatel:
InfoReview=Přehled
Info=Informace
ButtonStorno=Storno
ButtonSave=Uložit
@ -199,9 +187,25 @@ DbValidationError=Chyba validace
true=Ano
false=Ne
Information=Informace
Requirements=Požadavky
Orders=Objednávky
BussinessTrips=Služební cesty
Lists=Seznamy
Settings=Nastavení
Administration=Administrace
Permissions=Práva
NumberSeries=Číselné řady
User=Uživatel
ChangePassword=Změnit heslo
Logout=Odhlásit
DateFormat=dd. MM. yyyy
AddItem=Přidat položku...
AddItem=Přidat položku
RemoveItem=Smazat
Amount=Částka

@ -2,7 +2,7 @@
<zk>
<window border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.dashboard.DashBoardVM')">
<caption zclass="form-caption" label="${labels.Info}" />
<caption zclass="form-caption" label="${labels.Information}" />
<vbox>
<hbox>
<label value="${labels.LogedInUser}"/> <image src="/img/user-small.png"/> <label value="@load(vm.user)"/>

@ -0,0 +1,89 @@
<?page title="Main Menu" contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?taglib uri="/WEB-INF/security.tld" prefix="sec"?>
<zk xmlns:n="native">
<menubar
id="menubar"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.MainMenu')"
autodrop="true">
<menuitem
label="${labels.Information}"
href="/" />
<menuseparator />
<menuitem
label="${labels.Requirements}"
href="/requirements/actual" />
<!-- menuitem
label="${labels.Orders}"
href="/orders/actual" /-->
<menuitem
label="${labels.BussinessTrips}"
href="/trips/requirement" />
<menuseparator />
<menu label="${labels.Lists}">
<menupopup>
<menuitem
label="${labels.AgendaMaterial}"
href="/lists/material"
disabled="${not sec:isAllGranted('PERM_READ_MATERIAL')}" />
<menuitem
label="${labels.AgendaServices}"
href="/lists/service"
disabled="${not sec:isAllGranted('PERM_READ_SERVICES')}" />
<menuitem
label="${labels.AgendaSuppliers}"
href="/lists/addressbook"
disabled="${not sec:isAllGranted('PERM_READ_ADDRESSBOOK')}" />
<menuitem
label="${labels.AgendaBuildings}"
href="/lists/buildings"
disabled="${not sec:isAllGranted('PERM_READ_BUILDINGS')}" />
<menuitem
label="${labels.AgendaMUnits}"
href="/lists/munits"
disabled="${not sec:isAllGranted('PERM_READ_MUNITS')}" />
</menupopup>
</menu>
<menu label="${labels.Settings}">
<menupopup>
<menuitem
label="${labels.GlobalSettings}…"
onClick="@command('globalSettings')" />
<menuitem
label="${labels.AgendaWorkflow}"
href="/settings/workflow"
disabled="${not sec:isAllGranted('PERM_EDIT_WORKFLOW')}" />
<menuitem
label="${labels.NumberSeries}…"
onClick="@command('numSeries')" />
<menu label="${labels.Administration}">
<menupopup>
<menuitem
label="${labels.AgendaUsers}"
href="/admin/users"
disabled="${not sec:isAllGranted('PERM_READ_USERS')}" />
<menuitem
label="${labels.Permissions}"
href="/admin/permissions"
disabled="${not sec:isAllGranted('PERM_READ_PERMISSIONS')}" />
<menuitem
label="${labels.AgendaWorkgroups}"
href="/admin/workgroups"
disabled="${not sec:isAllGranted('PERM_READ_WORKGROUPS')}" />
</menupopup>
</menu>
</menupopup>
</menu>
<menu label="${labels.User}">
<menupopup>
<menuitem
label="${labels.ChangePassword}…"
onClick="@command('passwd')" />
<menuitem
label="${labels.Logout}"
href="/j_spring_security_logout" />
</menupopup>
</menu>
</menubar>
</zk>

@ -1,70 +0,0 @@
<?page title="menu" contentType="text/html;charset=UTF-8"?>
<zk xmlns:n="native">
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?taglib uri="/WEB-INF/security.tld" prefix="sec"?>
<tabbox mold="accordion" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.NavigationVM')">
<tabs>
<tab id="requirements" label="${labels.MenuRequirements}" selected="@load(vm.requirements)"/>
<tab id="orders" label="${labels.MenuOrders}" selected="@load(vm.orders)"/>
<tab id="trips" label="Služební cesty" selected="@load(vm.trips)"/>
<tab id="lists" label="${labels.MenuLists}" selected="@load(vm.lists)"/>
<tab id="settings" label="${labels.MenuSettings}" selected="@load(vm.settings)"/>
<tab id="admin" label="${labels.MenuAdministration}" selected="@load(vm.admin)"/>
<tab id="user" label="${labels.MenuUser}" selected="@load(vm.user)"/>
</tabs>
<tabpanels hflex="1">
<tabpanel>
<menubar orient="vertical">
<menuitem label="${labels.AgendaActRequirements}" href="/requirements/actual" />
<menuitem label="${labels.AgendaRequirementsHistory}" href="/requirements/history" />
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="${labels.AgendaMyOrders}" href="/orders/actual" />
<menuitem label="${labels.AgendaOrdersHistory}" href="/orders/history" />
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="Požadavky" href="/trips/requirement" />
<menuitem label="${labels.AgendaOrdersHistory}"/>
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="${labels.AgendaSuppliers}" href="/lists/addressbook" disabled="${not sec:isAllGranted('PERM_READ_ADDRESSBOOK')}"/>
<menuitem label="${labels.AgendaMaterial}" href="/lists/material" disabled="${not sec:isAllGranted('PERM_READ_MATERIAL')}"/>
<menuitem label="${labels.AgendaServices}" href="/lists/service" disabled="${not sec:isAllGranted('PERM_READ_SERVICES')}"/>
<menuitem label="${labels.AgendaMUnits}" href="/lists/munits" disabled="${not sec:isAllGranted('PERM_READ_MUNITS')}" width="120px"/>
<menuitem label="${labels.AgendaBuildings}" href="/lists/buildings" disabled="${not sec:isAllGranted('PERM_READ_BUILDINGS')}" />
<!-- <menuitem label="${labels.AgendaRooms}" href="/lists/rooms" disabled="${not sec:isAllGranted('PERM_READ_ROOMS')}" /> -->
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="${labels.AgendaWorkflow}" href="/settings/workflow" disabled="${not sec:isAllGranted('PERM_EDIT_WORKFLOW')}"/>
<menuitem label="Číselné řady" onClick="@command('numSeries')"/>
<menuitem label="Limity částek"/>
<menuitem label="${labels.GlobalSettings}" onClick="@command('globalSettings')"/>
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="${labels.AgendaUsers}" href="/admin/users" disabled="${not sec:isAllGranted('PERM_READ_USERS')}" width="120px"/>
<menuitem label="Práva" href="/admin/permissions" disabled="${not sec:isAllGranted('PERM_READ_PERMISSIONS')}"/>
<menuitem label="${labels.AgendaWorkgroups}" href="/admin/workgroups" disabled="${not sec:isAllGranted('PERM_READ_WORKGROUPS')}"/>
</menubar>
</tabpanel>
<tabpanel>
<menubar orient="vertical">
<menuitem label="Změnit heslo" width="120px" onClick="@command('passwd')"/>
<menuitem label="Odhlásit" href="/j_spring_security_logout"/>
</menubar>
</tabpanel>
</tabpanels>
</tabbox>
</zk>

@ -40,19 +40,17 @@
}
});
</script>
<div id="container">
<div id="header">
<u:include src="/app/header.zul" />
</div>
<div id="leftcolumn">
<u:button label="${labels.InfoReview}" href="/" width="100%"/>
<u:include src="/app/navigation.zul" />
<div id="mainMenu">
<u:include src="/app/mainMenu.zul" />
</div>
<div id="maincolumn">
<u:include src="${gridZul}" />
</div>
<div id="footer">Footer</div>
<div id="footer">Josef Rokos &amp; František Přibyl</div>
</div>
</html>

@ -17,29 +17,27 @@ html {
}
#leftcolumn {
width: 140px;
padding: 10px;
float: left;
}
#navbar {
border: 1px solid #ccc;
}
#maincolumn {
padding: 10px;
padding-bottom: 20px; /* Height of the footer */
margin: 0px 0px 0px 160px;
padding-top: 5px;
padding-bottom: 25px; /* Height of the footer */
margin: 0px 0px 0px 0px;
}
#footer {
width: 100%;
clear: both;
position: absolute;
bottom: 0;
width: 100%;
bottom: 5px;
height: 20px; /* Height of the footer */
border: 1px solid #ccc;
text-align: center;
vertical-align: center;
font-size: 10px;
color: gray;
}
.form-caption {
@ -49,24 +47,7 @@ html {
text-shadow: 2px 2px 2px #888888;
padding-left: 5px;
}
/*aaa*/
.form-caption-content {
float: left;
}
/*
a:link,a:visited {
font-size: 12px;
color: #0000A0;
background-color: #FFFFFF;
text-decoration: none;
target-new: none;
}
a:hover {
font-size: 12px;
color: #0000A0;
background-color: #a3d3f8;
text-decoration: none;
target-new: none;
}*/

@ -1,10 +1,9 @@
<?page title="NumberSeriesFormTitle" contentType="text/html;charset=UTF-8"?>
<?page title="NumberSeries" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="editWin" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.settings.NumberSeriesVM')" closable="true" width="400px"
binder="@init(queueName='numSeries')">
<caption zclass="form-caption" label="${labels.NumberSeriesFormTitle}" />
<!-- <combobox></combobox> -->
<caption zclass="form-caption" label="${labels.NumberSeries}" />
<grid model="@load(vm.numberSeriesList)">
<columns>
<column hflex="min"/>

Loading…
Cancel
Save