# HG changeset patch # User František Kučera # Date 1294514307 -3600 # Node ID bf21a4abea9b9d277c1be3d852647a56d5d8d7dd # Parent c84a3e3c8a464f0647eb6cf71528b9168d7b759a Kategorie podniků (hospoda, bar, kavárna atd.) - datový model (tabulky kategorie a podnik_kategorie) - entity a mapování - zobrazování formou štítků ve výpisu podniků diff -r c84a3e3c8a46 -r bf21a4abea9b html/index.html --- a/html/index.html Sun Aug 15 22:47:33 2010 +0200 +++ b/html/index.html Sat Jan 08 20:18:27 2011 +0100 @@ -58,8 +58,18 @@ -

111

Adresa:
  - 0

x

x

Adresa:
x  +

+

111

+

+

Adresa:
 0

+ + +
+ +

x

x

Adresa:
x  1
x

www stránka

fsda

fsd

Adresa:
fsd  1
fsad

www stránka

Test

Pokus

Adresa:
Ulice  123
Mesto

www stránka

diff -r c84a3e3c8a46 -r bf21a4abea9b html/styl.css --- a/html/styl.css Sun Aug 15 22:47:33 2010 +0200 +++ b/html/styl.css Sat Jan 08 20:18:27 2011 +0100 @@ -1,3 +1,91 @@ +ul.stitky { + margin: 0; + padding: 0 0 32px 0; + + list-style: none; +} + +ul.stitky li, ul.stitky a { + float: left; + height: 20px; + line-height: 20px; + position: relative; + font-size: 11px; +} + +ul.stitky a { + margin-left: 20px; + padding: 0 10px 0 12px; + background: silver; + color: #666; + text-decoration: none; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} + +ul.stitky a:before { + content: ""; + float: left; + position: absolute; + top: 0; + left: -10px; + width: 0; + height: 0; + border-color: transparent silver transparent transparent; + border-style: solid; + border-width: 10px 10px 10px 0; +} + +ul.stitky a:after { + content: ""; + position: absolute; + top: 9px; + left: 0; + float: left; + width: 4px; + height: 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + background: #fff; + -moz-box-shadow: -1px -1px 2px grey; + -webkit-box-shadow: -1px -1px 2px grey; + box-shadow: -1px -1px 2px #004977; +} + +ul.stitky a:hover{ + background: #555; + color: #ccc; +} + +ul.stitky a:hover:before{ + border-color:transparent #555 transparent transparent; +} + + + + + + + + + + + + + + + + + + + + + .chybovaHlaska { background-image: url('grafika/dialog-error.png'); background-repeat: no-repeat; diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-ear/nbproject/project.properties --- a/java/nekurak.net-ear/nbproject/project.properties Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-ear/nbproject/project.properties Sat Jan 08 20:18:27 2011 +0100 @@ -12,7 +12,7 @@ j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args} j2ee.deploy.on.save=false j2ee.platform=1.6 -j2ee.platform.classpath= +j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-ejb/nbproject/project.properties --- a/java/nekurak.net-ejb/nbproject/project.properties Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-ejb/nbproject/project.properties Sat Jan 08 20:18:27 2011 +0100 @@ -24,7 +24,7 @@ includes=** j2ee.deploy.on.save=false j2ee.platform=1.6 -j2ee.platform.classpath= +j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-ejb/src/conf/Kategorie.hbm.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-ejb/src/conf/Kategorie.hbm.xml Sat Jan 08 20:18:27 2011 +0100 @@ -0,0 +1,14 @@ + + + + + + + kategorie_seq + + + + + + \ No newline at end of file diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-ejb/src/conf/Podnik.hbm.xml --- a/java/nekurak.net-ejb/src/conf/Podnik.hbm.xml Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-ejb/src/conf/Podnik.hbm.xml Sat Jan 08 20:18:27 2011 +0100 @@ -25,6 +25,10 @@ + + + + diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-lib/nbproject/build-impl.xml --- a/java/nekurak.net-lib/nbproject/build-impl.xml Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-lib/nbproject/build-impl.xml Sat Jan 08 20:18:27 2011 +0100 @@ -291,15 +291,18 @@ Must set javac.includes - + + + - + + diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-lib/nbproject/genfiles.properties --- a/java/nekurak.net-lib/nbproject/genfiles.properties Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-lib/nbproject/genfiles.properties Sat Jan 08 20:18:27 2011 +0100 @@ -4,5 +4,5 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=11ce77af -nbproject/build-impl.xml.script.CRC32=40960ef1 -nbproject/build-impl.xml.stylesheet.CRC32=f33e10ff@1.38.2.45 +nbproject/build-impl.xml.script.CRC32=827b6ce9 +nbproject/build-impl.xml.stylesheet.CRC32=229523de@1.38.3.45 diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Kategorie.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Kategorie.java Sat Jan 08 20:18:27 2011 +0100 @@ -0,0 +1,38 @@ +package cz.frantovo.nekurak.dto; + +/** + * Kategorie, do které podnik patří. + * Např. hospoda, bar, restaurace nebo cukrárna. + * Podnik může patřit do více kategorií (měl by patřit alespoň do jedné). + * @author fiki + */ +public class Kategorie { + + private int id; + private String nazev; + private String popis; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getNazev() { + return nazev; + } + + public void setNazev(String název) { + this.nazev = název; + } + + public String getPopis() { + return popis; + } + + public void setPopis(String popis) { + this.popis = popis; + } +} diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java Sat Jan 08 20:18:27 2011 +0100 @@ -24,6 +24,7 @@ private String spravce; private List fotky = new ArrayList(); private Set komentare = new HashSet(); + private Set kategorie = new HashSet(); private Double sirka; private Double delka; @@ -138,4 +139,12 @@ public void setKomentare(Set komentare) { this.komentare = komentare; } + + public Set getKategorie() { + return kategorie; + } + + public void setKategorie(Set kategorie) { + this.kategorie = kategorie; + } } diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java Sat Jan 08 20:18:27 2011 +0100 @@ -1,6 +1,5 @@ package cz.frantovo.nekurak.web; -import cz.frantovo.nekurak.dto.Podnik; import cz.frantovo.nekurak.servlet.Fotky; import cz.frantovo.nekurak.util.Komentare; import cz.frantovo.nekurak.vyjimky.KomentarovaVyjimka; @@ -19,10 +18,6 @@ return SERVLET + "/" + prostredek + "/" + id + "." + Fotky.PRIPONA; } - public static boolean maFotky(Podnik p) { - return !p.getFotky().isEmpty(); - } - /** * @param komentar komentář včetně kořenové značky, XML jako text * @return true, pokud vyhovuje XML schématu diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp --- a/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp Sat Jan 08 20:18:27 2011 +0100 @@ -4,6 +4,7 @@ xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak" + xmlns:nkfn="/WEB-INF/nekurakFunkce" version="2.0"> @@ -31,6 +32,19 @@

+ + + + +
diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld --- a/java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld Sat Jan 08 20:18:27 2011 +0100 @@ -11,12 +11,6 @@ java.lang.String fotka(int, boolean) - maFotky - Zda podnik má přiřazené nějaké fotky - cz.frantovo.nekurak.web.FunkceEL - boolean maFotky(cz.frantovo.nekurak.dto.Podnik) - - zkontrolujKomentar Provede validaci komentáře oproti XML schématu cz.frantovo.nekurak.web.FunkceEL diff -r c84a3e3c8a46 -r bf21a4abea9b java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag --- a/java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag Sun Aug 15 22:47:33 2010 +0200 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag Sat Jan 08 20:18:27 2011 +0100 @@ -19,7 +19,7 @@

žádné další fotografie

- +