Mercurial > dive4elements > gnv-client
changeset 695:883b366e3b15
Replaced buttons for saving/loading projects with links.
gnv/trunk@926 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 13 Apr 2010 17:22:49 +0000 |
parents | 271ec4d11a9f |
children | ae1e616ecf94 |
files | gnv/ChangeLog gnv/src/main/webapp/WEB-INF/jsp/index.jsp gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp gnv/src/main/webapp/styles/default.css |
diffstat | 5 files changed, 55 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/ChangeLog Tue Apr 13 16:44:30 2010 +0000 +++ b/gnv/ChangeLog Tue Apr 13 17:22:49 2010 +0000 @@ -1,3 +1,14 @@ +2010-04-13 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + * src/main/webapp/styles/default.css: Adapted style of links. + + * src/main/webapp/WEB-INF/jsp/index.jsp: Replaced input buttons for + loading/saving projects with links. + + * src/main/webapp/WEB-INF/jsp/wmslayout.jsp, + src/main/webapp/WEB-INF/jsp/mainlayout.jsp: Added javascript function to + toggle the visibility of the file upload button/chooser. + 2010-04-13 Ingo Weinzierl <ingo.weinzierl@intevation.de> * src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: Fixed a display
--- a/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Tue Apr 13 16:44:30 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Tue Apr 13 17:22:49 2010 +0000 @@ -42,18 +42,20 @@ <%-- div container for project loading/saving and error messages related to this --%> <div id="project"> - <table> + <table width="100%"> <tr> - <td> - <form id="storeProject" action="<%=response.encodeURL("store.do")%>" method="post"> - <input type="submit" name="storeProject" value="<bean:message key="gnviewer.project.save"/>"/> - </form> + <td style="float: left; width: 225px;"> + <a href="<%=response.encodeURL("store.do")%>"><bean:message key="gnviewer.project.save"/></a> + | + <a href="#" onclick="toggle('projectload');"><bean:message key="gnviewer.project.load"/></a> </td> - <td> - <form id="loadProject" action="<%=response.encodeURL("load.do")%>" method="post" enctype="multipart/form-data"> - <input type="submit" name="loadProject" value="<bean:message key="gnviewer.project.load"/>"/> - <input type="file" name="document" accept="application/xml"/> - </form> + <td style="float: left; width: 400px;"> + <div id="projectload"> + <form id="loadProject" action="<%=response.encodeURL("load.do")%>" method="post" enctype="multipart/form-data"> + <input type="submit" name="loadProject" value="<bean:message key="gnviewer.project.load.button"/>"/> + <input type="file" name="document" accept="application/xml"/> + </form> + </div> </td> </tr> </table>
--- a/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp Tue Apr 13 16:44:30 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp Tue Apr 13 17:22:49 2010 +0000 @@ -50,6 +50,18 @@ ele.checked = false; } } + + function toggle(element) { + var ele = document.getElementById(element); + console.log("Element: " + ele.style.visibility); + var vis = ele.style.visibility; + if (vis != "visible") { + ele.style.visibility = "visible"; + } + else { + ele.style.visibility = "hidden"; + } + } </script> </head>
--- a/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Tue Apr 13 16:44:30 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Tue Apr 13 17:22:49 2010 +0000 @@ -49,6 +49,18 @@ map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); <%}%> } + + function toggle(element) { + var ele = document.getElementById(element); + console.log("Element: " + ele.style.visibility); + var vis = ele.style.visibility; + if (vis != "visible") { + ele.style.visibility = "visible"; + } + else { + ele.style.visibility = "hidden"; + } + } </script> </head>
--- a/gnv/src/main/webapp/styles/default.css Tue Apr 13 16:44:30 2010 +0000 +++ b/gnv/src/main/webapp/styles/default.css Tue Apr 13 17:22:49 2010 +0000 @@ -36,8 +36,8 @@ } a { - color: #00416B; - text-decoration: none; + color: #FF6600; + text-decoration: underline; } legend { @@ -309,6 +309,12 @@ background-color: #e9e8f0; } +#projectload { + float: left; + padding-left: 5px; + visibility: hidden; +} + .devide { width: 100%; height: 2px;