Přidán rámeček s fotkami (bxSlider) + vlastní značky (tagfile). 8. díl
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 09 Mar 2010 20:26:30 +0100
changeset 58e019dbc42723
parent 57 7162ed62c9ab
child 59 4330f48457bb
Přidán rámeček s fotkami (bxSlider) + vlastní značky (tagfile).
.hgignore
java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp
java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag
java/nekurak.net-web/web/WEB-INF/tags/nekurak/hlasovani.tag
java/nekurak.net-web/web/grafika/fotkaPodnikuVzorova.png
java/nekurak.net-web/web/grafika/fotkaPodnikuZadne.png
java/nekurak.net-web/web/grafika/fotkyPodnikuDalsi.png
java/nekurak.net-web/web/grafika/fotkyPodnikuPredchozi.png
java/nekurak.net-web/web/index.jsp
java/nekurak.net-web/web/js/fotkyPodniku.js
java/nekurak.net-web/web/js/jquery.bxSlider.js
java/nekurak.net-web/web/js/jquery.js
java/nekurak.net-web/web/styl.css
     1.1 --- a/.hgignore	Sun Mar 07 21:19:35 2010 +0100
     1.2 +++ b/.hgignore	Tue Mar 09 20:26:30 2010 +0100
     1.3 @@ -18,3 +18,4 @@
     1.4  java/nekurak.net-lib/build/*
     1.5  java/nekurak.net-lib/nbproject/private
     1.6  
     1.7 +java/nekurak.net-web/lib/*
     2.1 --- a/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp	Sun Mar 07 21:19:35 2010 +0100
     2.2 +++ b/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp	Tue Mar 09 20:26:30 2010 +0100
     2.3 @@ -3,26 +3,48 @@
     2.4  	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     2.5  	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     2.6  	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     2.7 +	  xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak"
     2.8  	  version="2.0">
     2.9  
    2.10      <jsp:useBean id="uvod" class="cz.frantovo.nekurak.web.Uvod" scope="request"/>
    2.11  
    2.12      <p><fmt:message key="uvod.naposledyPridanePodniky"/>:</p>
    2.13  
    2.14 +    <script type="text/javascript" src="js/fotkyPodniku.js"></script>
    2.15 +
    2.16      <c:forEach var="p" items="${uvod.podniky}">
    2.17  	<div class="podnik">
    2.18 -	    <h2><a href="?akce=detail&amp;amp;podnik=${p.id}"><c:out value="${p.nazev}"/></a></h2>
    2.19 -	    <p><c:out value="${p.popis}"/></p>
    2.20 -	    <p>
    2.21 -	    <fmt:message key="uvod.adresa"/>:<br/>
    2.22 -		<c:out value="${p.ulice}"/>&amp;#160;
    2.23 -		<c:out value="${p.cisloPopisne}"/><br/>
    2.24 -		<c:out value="${p.mesto}"/>
    2.25 -	    </p>
    2.26 -	    <c:if test="${p.url != null}">
    2.27 -		<p><a href="${fn:escapeXml(p.url)}"><fmt:message key="uvod.www"/></a></p>
    2.28 -	    </c:if>
    2.29 +	    <!-- Tři bloky vedle sebe -->
    2.30 +
    2.31 +	    <!-- Název a adresa podniku -->
    2.32 +	    <div class="adresa">
    2.33 +		<h2><a href="?akce=detail&amp;amp;podnik=${p.id}"><c:out value="${p.nazev}"/></a></h2>
    2.34 +		<p><c:out value="${p.popis}"/></p>
    2.35 +		<p>
    2.36 +		    <fmt:message key="uvod.adresa"/>:<br/>
    2.37 +		    <c:out value="${p.ulice}"/>&amp;#160;
    2.38 +		    <c:out value="${p.cisloPopisne}"/><br/>
    2.39 +		    <c:out value="${p.mesto}"/>
    2.40 +		</p>
    2.41 +		<c:if test="${p.url != null}">
    2.42 +		    <p><a href="${fn:escapeXml(p.url)}"><fmt:message key="uvod.www"/></a></p>
    2.43 +		</c:if>
    2.44 +	    </div>
    2.45 +
    2.46 +	    <!-- Hlasování a graf -->
    2.47 +	    <div class="hlasovani">
    2.48 +		<nk:hlasovani podnik="${p.id}"/>
    2.49 +	    </div>
    2.50 +
    2.51 +	    <!-- Fotky podniku -->
    2.52 +	    <div class="fotky">
    2.53 +		<nk:fotkyPodniku podnik="${p.id}"/>
    2.54 +	    </div>
    2.55 +
    2.56  	</div>
    2.57      </c:forEach>
    2.58  
    2.59 +    <!-- konec obtékaných bloků -->
    2.60 +    <div class="cistic"></div>
    2.61 +
    2.62  </jsp:root>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag	Tue Mar 09 20:26:30 2010 +0100
     3.3 @@ -0,0 +1,21 @@
     3.4 +<?xml version="1.0" encoding="UTF-8"?>
     3.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     3.6 +	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     3.7 +	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     3.8 +	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     3.9 +	  version="2.0">
    3.10 +
    3.11 +    <jsp:directive.attribute name="podnik" type="java.lang.Integer" required="true" description="ID podniku"/>
    3.12 +
    3.13 +    <div id="fotkyPodniku${podnik}">
    3.14 +	<p><img src="grafika/fotkaPodnikuVzorova.png" alt="demo"/></p>
    3.15 +	<p><img src="grafika/fotkaPodnikuVzorova.png" alt="demo"/></p>
    3.16 +	<p><img src="grafika/fotkaPodnikuVzorova.png" alt="demo"/></p>
    3.17 +	<p><img src="grafika/fotkaPodnikuZadne.png" alt="žádné další fotografie"/></p>
    3.18 +    </div>
    3.19 +
    3.20 +    <script type="text/javascript">
    3.21 +	fotkyPodniku.aktivuj(${podnik});
    3.22 +    </script>
    3.23 +
    3.24 +</jsp:root>
    3.25 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/hlasovani.tag	Tue Mar 09 20:26:30 2010 +0100
     4.3 @@ -0,0 +1,12 @@
     4.4 +<?xml version="1.0" encoding="UTF-8"?>
     4.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     4.6 +	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     4.7 +	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     4.8 +	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     4.9 +	  version="2.0">
    4.10 +
    4.11 +    <jsp:directive.attribute name="podnik" type="java.lang.Integer" required="true" description="ID podniku"/>
    4.12 +
    4.13 +    <p>TODO: tady bude graf a hlasování.</p>
    4.14 +
    4.15 +</jsp:root>
    4.16 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/java/nekurak.net-web/web/grafika/fotkaPodnikuVzorova.png	Tue Mar 09 20:26:30 2010 +0100
     5.3 @@ -0,0 +1,1 @@
     5.4 +../../lib/grafika/fotkaPodnikuVzorova.png
     5.5 \ No newline at end of file
     6.1 Binary file java/nekurak.net-web/web/grafika/fotkaPodnikuZadne.png has changed
     7.1 Binary file java/nekurak.net-web/web/grafika/fotkyPodnikuDalsi.png has changed
     8.1 Binary file java/nekurak.net-web/web/grafika/fotkyPodnikuPredchozi.png has changed
     9.1 --- a/java/nekurak.net-web/web/index.jsp	Sun Mar 07 21:19:35 2010 +0100
     9.2 +++ b/java/nekurak.net-web/web/index.jsp	Tue Mar 09 20:26:30 2010 +0100
     9.3 @@ -35,6 +35,8 @@
     9.4  	<head>
     9.5  	    <title><fmt:message key="nazev"/></title>
     9.6  	    <link href="styl.css" type="text/css" rel="StyleSheet"/>
     9.7 +	    <script type="text/javascript" src="js/jquery.js"></script>
     9.8 +	    <script type="text/javascript" src="js/jquery.bxSlider.js"></script>
     9.9  	    <link rel="alternate" type="application/atom+xml" title="podniky" href="atom/" />
    9.10  	</head>
    9.11  	<body>
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/java/nekurak.net-web/web/js/fotkyPodniku.js	Tue Mar 09 20:26:30 2010 +0100
    10.3 @@ -0,0 +1,12 @@
    10.4 +var fotkyPodniku = {};
    10.5 +
    10.6 +fotkyPodniku.aktivuj = function (id) {
    10.7 +    $("#fotkyPodniku" + id).bxSlider({
    10.8 +	mode: "slide",
    10.9 +	speed: 250,
   10.10 +	controls: true,
   10.11 +	next_text: "→",
   10.12 +	prev_text: "←",
   10.13 +	wrapper_class: "fotkyPodniku"
   10.14 +    });
   10.15 +};
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/java/nekurak.net-web/web/js/jquery.bxSlider.js	Tue Mar 09 20:26:30 2010 +0100
    11.3 @@ -0,0 +1,1 @@
    11.4 +../../lib/js/jquery.bxSlider.js
    11.5 \ No newline at end of file
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/java/nekurak.net-web/web/js/jquery.js	Tue Mar 09 20:26:30 2010 +0100
    12.3 @@ -0,0 +1,1 @@
    12.4 +../../lib/js/jquery-1.4.2.min.js
    12.5 \ No newline at end of file
    13.1 --- a/java/nekurak.net-web/web/styl.css	Sun Mar 07 21:19:35 2010 +0100
    13.2 +++ b/java/nekurak.net-web/web/styl.css	Tue Mar 09 20:26:30 2010 +0100
    13.3 @@ -145,3 +145,41 @@
    13.4  .registraceKontrolaUdaju {
    13.5      color: gray;
    13.6  }
    13.7 +
    13.8 +.podnik .adresa {
    13.9 +    float: left;
   13.10 +    width: 500px;
   13.11 +}
   13.12 +.podnik .hlasovani {
   13.13 +    float: left;
   13.14 +    width: 280px;
   13.15 +    height: 280px;
   13.16 +}
   13.17 +
   13.18 +.podnik .fotky {
   13.19 +    float: left;
   13.20 +    width: 200px;
   13.21 +    height: 280px;
   13.22 +}
   13.23 +
   13.24 +.podnik {
   13.25 +    clear: both;
   13.26 +}
   13.27 +
   13.28 +.cistic {
   13.29 +    clear: both;
   13.30 +}
   13.31 +
   13.32 +.slider_prev  {
   13.33 +    background-image: url('grafika/fotkyPodnikuPredchozi.png');
   13.34 +    width: 32px;
   13.35 +    height: 32px;
   13.36 +    text-indent: 1000px;
   13.37 +}
   13.38 +
   13.39 +.slider_next {
   13.40 +    background-image: url('grafika/fotkyPodnikuDalsi.png');
   13.41 +    width: 32px;
   13.42 +    height: 32px;
   13.43 +    text-indent: 1000px;
   13.44 +}