From 568bed6f9b7735f2e573bea6524d0324354ec405 Mon Sep 17 00:00:00 2001 From: Franta Pribyl Date: Wed, 16 Jul 2014 20:50:31 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99epracov=C3=A1no=20vertik=C3=A1ln=C3=AD?= =?UTF-8?q?=20menu=20na=20horizont=C3=A1ln=C3=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #110 --- .../java/info/bukova/isspst/ui/MainMenu.java | 51 +++++++++++ .../info/bukova/isspst/ui/NavigationVM.java | 72 --------------- .../WEB-INF/locales/zk-label.properties | 30 ++++--- src/main/webapp/app/info.zul | 2 +- src/main/webapp/app/mainMenu.zul | 89 +++++++++++++++++++ src/main/webapp/app/navigation.zul | 70 --------------- src/main/webapp/app/template.zhtml | 10 +-- src/main/webapp/css/page.css | 39 +++----- src/main/webapp/settings/numberSeries.zul | 5 +- 9 files changed, 174 insertions(+), 194 deletions(-) create mode 100644 src/main/java/info/bukova/isspst/ui/MainMenu.java delete mode 100644 src/main/java/info/bukova/isspst/ui/NavigationVM.java create mode 100644 src/main/webapp/app/mainMenu.zul delete mode 100644 src/main/webapp/app/navigation.zul diff --git a/src/main/java/info/bukova/isspst/ui/MainMenu.java b/src/main/java/info/bukova/isspst/ui/MainMenu.java new file mode 100644 index 00000000..5b710e25 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/MainMenu.java @@ -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(); + } +} diff --git a/src/main/java/info/bukova/isspst/ui/NavigationVM.java b/src/main/java/info/bukova/isspst/ui/NavigationVM.java deleted file mode 100644 index ccd34470..00000000 --- a/src/main/java/info/bukova/isspst/ui/NavigationVM.java +++ /dev/null @@ -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"); - } -} diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index df04bff0..4471fddd 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -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 diff --git a/src/main/webapp/app/info.zul b/src/main/webapp/app/info.zul index fadb7156..5be89c4e 100644 --- a/src/main/webapp/app/info.zul +++ b/src/main/webapp/app/info.zul @@ -2,7 +2,7 @@ - +