diff --git a/src/main/java/info/bukova/isspst/dao/BuildingDao.java b/src/main/java/info/bukova/isspst/dao/BuildingDao.java new file mode 100644 index 00000000..85b20608 --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/BuildingDao.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.dao; + +import info.bukova.isspst.data.Building; + +public interface BuildingDao extends BaseDao { + +} \ No newline at end of file diff --git a/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java b/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java new file mode 100644 index 00000000..46a84cfe --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java @@ -0,0 +1,12 @@ +package info.bukova.isspst.dao.jpa; + +import info.bukova.isspst.dao.BuildingDao; +import info.bukova.isspst.data.Building; + +public class BuildingDaoJPA extends BaseDaoJPA implements BuildingDao { + + @Override + public String getEntityName() { + return "Building"; + } +} diff --git a/src/main/java/info/bukova/isspst/data/Building.java b/src/main/java/info/bukova/isspst/data/Building.java new file mode 100644 index 00000000..254cabfb --- /dev/null +++ b/src/main/java/info/bukova/isspst/data/Building.java @@ -0,0 +1,121 @@ +package info.bukova.isspst.data; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name="BUILDING") +public class Building implements DataModel { + + @Id + @Column(name="ID") + @GeneratedValue + private int id; + + @Column(name="CODE", unique=true) + private String code; + + @Column(name="NAME") + private String name; + + @Column(name="DESCRIPTION") + private String description; + + /** + * @return the id + */ + public int getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(int id) { + this.id = id; + } + + /** + * @return the code + */ + public String getCode() { + return code; + } + + /** + * @param code the code to set + */ + public void setCode(String code) { + this.code = code; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + @Override + public void setCreated(Date created) { + // TODO Auto-generated method stub + + } + + @Override + public Date getCreated() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setModified(Date modified) { + // TODO Auto-generated method stub + + } + + @Override + public Date getModified() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isValid() { + // TODO Auto-generated method stub + return false; + } + + @Override + public void setValid(boolean valid) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/info/bukova/isspst/services/BuildingService.java b/src/main/java/info/bukova/isspst/services/BuildingService.java new file mode 100644 index 00000000..919c30d3 --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/BuildingService.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.services; + +import info.bukova.isspst.data.Building; + +public interface BuildingService extends Service { + +} diff --git a/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java b/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java new file mode 100644 index 00000000..57abc7fe --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.services; + +import info.bukova.isspst.data.Building; + +public class BuildingServiceImpl extends AbstractService implements BuildingService{ + +} diff --git a/src/main/java/info/bukova/isspst/ui/BuildingForm.java b/src/main/java/info/bukova/isspst/ui/BuildingForm.java new file mode 100644 index 00000000..8f2d0907 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/BuildingForm.java @@ -0,0 +1,14 @@ +package info.bukova.isspst.ui; + +import info.bukova.isspst.data.Building; + +import org.zkoss.bind.annotation.Init; + +public class BuildingForm extends FormViewModel { + + @Init(superclass = true) + public void init() { + + } + +} diff --git a/src/main/java/info/bukova/isspst/ui/BuildingList.java b/src/main/java/info/bukova/isspst/ui/BuildingList.java new file mode 100644 index 00000000..94ffe808 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/BuildingList.java @@ -0,0 +1,21 @@ +package info.bukova.isspst.ui; + +import info.bukova.isspst.data.Building; +import info.bukova.isspst.services.BuildingService; + +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class BuildingList extends ListViewModel { + + @WireVariable + private BuildingService buildingService; + + @Init + public void init() { + service = buildingService; + dataClass = Building.class; + formZul = "buildingForm.zul"; + } + +} diff --git a/src/main/resources/hibernate.cfg.xml b/src/main/resources/hibernate.cfg.xml index 76d3d2d2..848e7cb8 100644 --- a/src/main/resources/hibernate.cfg.xml +++ b/src/main/resources/hibernate.cfg.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index 39249fd2..2e95a6b7 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -89,12 +89,12 @@ - + - + diff --git a/src/main/webapp/WEB-INF/zk-label.properties b/src/main/webapp/WEB-INF/zk-label.properties new file mode 100644 index 00000000..a072d70c --- /dev/null +++ b/src/main/webapp/WEB-INF/zk-label.properties @@ -0,0 +1,21 @@ +# Default file +AgendaBuildings=Budovy + +BuildingsFormCode=Kód +BuildingsFormCodeConstr=Zadejte kód budovy... +BuildingsFormName=Název +BuildingsFormDescription=Popis + +BuildingsGridColumnCode=Kód +BuildingsGridColumnName=Název +BuildingsGridColumnDescription=Popis + +ButtonStorno=Storno +ButtonSave=Uložit + +FormBuilding=Budova + +ToolbarRecNew=Nový záznam +ToolbarRecEdit=Úprava aktuálního záznamu +ToolbarRecDelete=Odstranit aktuální záznam +ToolbarRecFilter=Filtr záznamů diff --git a/src/main/webapp/app/navigation.zul b/src/main/webapp/app/navigation.zul index 33b140ac..bf76c9fe 100644 --- a/src/main/webapp/app/navigation.zul +++ b/src/main/webapp/app/navigation.zul @@ -29,7 +29,7 @@ - + diff --git a/src/main/webapp/app/page.css b/src/main/webapp/app/page.css index 9996d2b4..2e9c8328 100644 --- a/src/main/webapp/app/page.css +++ b/src/main/webapp/app/page.css @@ -1,10 +1,15 @@ -body { +/*body { font-family: sans-serif; +}*/ + +#container { + min-height:100%; + position:relative; } #header{ width: auto; - height:70px; + height:40px; border: 1px solid #ccc; padding:10px; } @@ -23,15 +28,30 @@ body { #maincolumn{ padding:10px; + padding-bottom:20px; /* Height of the footer */ margin: 0px 0px 0px 160px; - border: 1px solid #ccc; } #footer{ clear:both; - width:auto; + position:absolute; + bottom:0; + width:100%; + height:20px; /* Height of the footer */ + border: 1px solid #ccc; } + +.form-caption { + --1overflow:hidden; + font-weight: bold; + font-size: 20px; +} +/*aaa*/ +.form-caption-content { + float:left; +} + /* a:link,a:visited { font-size: 12px; diff --git a/src/main/webapp/buildings/building.zul b/src/main/webapp/buildings/building.zul new file mode 100644 index 00000000..e34c7d24 --- /dev/null +++ b/src/main/webapp/buildings/building.zul @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/buildings/buildingForm.zul b/src/main/webapp/buildings/buildingForm.zul new file mode 100644 index 00000000..45fd5834 --- /dev/null +++ b/src/main/webapp/buildings/buildingForm.zul @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + ${labels.BuildingsFormCode} : + + + + + + ${labels.BuildingsFormName} : + + + + + + ${labels.BuildingsFormDescription} : + + + + + + + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/buildings/index.zul b/src/main/webapp/buildings/index.zul new file mode 100644 index 00000000..d0cb3c94 --- /dev/null +++ b/src/main/webapp/buildings/index.zul @@ -0,0 +1,10 @@ + + + + + String gridZul = "building.zul"; + + + + + \ No newline at end of file diff --git a/src/main/webapp/img/building.png b/src/main/webapp/img/building.png new file mode 100644 index 00000000..95b75a95 Binary files /dev/null and b/src/main/webapp/img/building.png differ