This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository echobase. See http://git.codelutin.com/echobase.git commit 6932ab7ce0efdb54736e793e0651a1f02abdec95 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Dec 30 13:14:06 2014 +0100 fixes #6220 (ne pas modifier l'url en cas de clone) --- .../echobase/ui/actions/workingDb/Create.java | 8 +++++++ .../main/webapp/WEB-INF/jsp/workingDb/manage.jsp | 28 ++++++++++++---------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/Create.java b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/Create.java index 89b590d..3b5abfd 100644 --- a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/Create.java +++ b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/Create.java @@ -48,8 +48,16 @@ public class Create extends AbstractWorkingDbAction { return INPUT; } + protected boolean clone; + + public boolean isClone() { + return clone; + } + public String cloneConf() throws Exception { + clone = true; + getConf().setTopiaId(null); // new workingDbConfiguration in progress diff --git a/echobase-ui/src/main/webapp/WEB-INF/jsp/workingDb/manage.jsp b/echobase-ui/src/main/webapp/WEB-INF/jsp/workingDb/manage.jsp index ed17ac4..265bf45 100644 --- a/echobase-ui/src/main/webapp/WEB-INF/jsp/workingDb/manage.jsp +++ b/echobase-ui/src/main/webapp/WEB-INF/jsp/workingDb/manage.jsp @@ -42,22 +42,26 @@ } function driverTypeChanged(driverTypeCombo) { -<s:if test="!confExists"> +<s:if test="newConf and !clone"> - var url; + if (driverTypeCombo) { - <%-- add prefix in url --%> - if (driverTypeCombo.selectedIndex ==0) { + var url; - <%-- Base H2 --%> - url ="jdbc:h2:file:dbPath/dbName"; - } else { + <%-- add prefix in url --%> + if (driverTypeCombo.selectedIndex ==0) { - <%-- Base PG --%> - url ="jdbc:postgresql://serverName/dbName"; - } + <%-- Base H2 --%> + url ="jdbc:h2:file:dbPath/dbName"; + } else { + + <%-- Base PG --%> + url ="jdbc:postgresql://serverName/dbName"; + } - $("#confUrl").val(url); + $("#confUrl").val(url); + + } </s:if> } @@ -113,7 +117,7 @@ <s:select key="conf.driverType" cssStyle="font-size: 140%" id="confDriverType" label="%{getText('echobase.label.driverType')}" requiredLabel="true" - list="driverTypes" disabled="%{confExists}" onchange="driverTypeChanged(this)" /> + list="driverTypes" disabled="%{confExists or clone}" onchange="driverTypeChanged(this)" /> <s:textfield key="conf.url" requiredLabel="true" size="80" id="confUrl" readonly="%{confExists}" -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.