Mercurial > dive4elements > gnv-client
changeset 17:d7e5a929fc34
Some Stylingimprovements done
gnv/trunk@100 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Wed, 16 Sep 2009 14:55:54 +0000 |
parents | 4ef6e4e9ef15 |
children | 87002cbd194c |
files | gnv/Changelog gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl gnv/src/main/webapp/WEB-INF/jsp/index.jsp |
diffstat | 4 files changed, 40 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/Changelog Wed Sep 16 14:02:29 2009 +0000 +++ b/gnv/Changelog Wed Sep 16 14:55:54 2009 +0000 @@ -1,3 +1,12 @@ +2009-09-16 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java (execute) Edited: + UI also Rendered when Chart is already visualized. + * src/main/webapp/WEB-INF/jsp/index.jsp: + Some Stylingfixes done. + * src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: + Legend-Element for SelectEntries Integrated + 2009-09-16 Tim Englich <tim.englich@intevation.de> * src/main/webapp/WEB-INF/jsp/mainlayout.jsp Edited,
--- a/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Wed Sep 16 14:02:29 2009 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Wed Sep 16 14:55:54 2009 +0000 @@ -74,6 +74,9 @@ String ui = transformer.transform(artifactDescription.getCurrentUI(), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); request.setAttribute("ui", ui); + + request.setAttribute("furthertargets", (ad.getReachableStates() != null && !ad.getReachableStates().isEmpty())); + }else{ adc.doFeed(sm.getSelectedArtifactFactory(), sm.getCurrentArtifact(), ips); @@ -81,8 +84,15 @@ String target = "chart"; String src = "<img src='out.do?mimetype="+mimeType+"&target="+target+"&uid="+System.currentTimeMillis()+"' alt='Chart'>"; - request.setAttribute("ui", src); + request.setAttribute("diagramm", src); + ArtifactDescription artifactDescription = adc.getCurrentStepDescription(sm.getSelectedArtifactFactory(), sm.getCurrentArtifact()); + + XSLTransformer transformer = new XSLTransformer(); + String ui = transformer.transform(artifactDescription.getCurrentUI(), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); + + request.setAttribute("ui", ui); + request.setAttribute("furthertargets",false); } return super.execute(mapping, form, request, response);
--- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Wed Sep 16 14:02:29 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Wed Sep 16 14:55:54 2009 +0000 @@ -11,11 +11,13 @@ </xsl:template> <xsl:template match="*[local-name() = 'select']"> <xsl:variable name="selectName" select="@ref"/> - <select name="{$selectName}" multiple="multiple" size="6"> <xsl:apply-templates/></select> + <legend><xsl:value-of select="@ref"/></legend> + <select name="{$selectName}" multiple="multiple" size="6"> <xsl:apply-templates/></select> Â Â </xsl:template> <xsl:template match="*[local-name() = 'select1']"> <xsl:variable name="selectName" select="@ref"/> - <select name="{$selectName}"> <xsl:apply-templates/></select> + <legend><xsl:value-of select="@ref"/></legend> + <select name="{$selectName}"> <xsl:apply-templates/></select> Â Â </xsl:template> <xsl:template match="*[local-name() = 'item']"> <xsl:variable name="optionValue" select="*[local-name() = 'value']"/>
--- a/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Wed Sep 16 14:02:29 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Wed Sep 16 14:55:54 2009 +0000 @@ -5,18 +5,26 @@ <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> <%@page import="java.util.Iterator"%> <%Object ui = request.getAttribute("ui"); + boolean furthertargets = true; + + Object furthertargetsObject = request.getAttribute("furthertargets"); + if (furthertargetsObject != null){ + furthertargets = ((Boolean)furthertargetsObject).booleanValue(); + } + Object diagramm = request.getAttribute("diagramm"); String action = (ui == null ? "selectArtifactFactory.do" : "next.do"); %> <div id="basefilter"> <form id="fisSelectionForm" action="<%=action%>" method="post"> <fieldset> - + <% SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); Collection<ArtifactObject> artifactFactories = sm.getArtifactFactories(); if (artifactFactories != null && ui == null){ %> + <legend>FIS</legend> <select name="artifactFactory"> <% Iterator<ArtifactObject> it = artifactFactories.iterator(); @@ -37,7 +45,12 @@ <%=ui != null ? ui.toString() : "" %> - <input type="submit" value="Auswählen" /> + <input type="submit" value="<%=furthertargets ? "Auswählen" : "Zeichen"%>" /> </fieldset> </form> -</div> \ No newline at end of file +</div> +<%if (diagramm != null){ %> +<div id="diagram"> + <%=diagramm.toString()%> +</div> +<%}%> \ No newline at end of file