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 49aae3dd18acf8dc52fd759ad2237addfaf2f44e Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Dec 30 13:02:22 2014 +0100 fixes #6220: Ajouter automatiquement le suffixe du serveur en cours dans l'URL lors de la création d'une base --- .../main/webapp/WEB-INF/jsp/workingDb/manage.jsp | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) 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 ca1acea..ed17ac4 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 @@ -41,6 +41,34 @@ return false; } + function driverTypeChanged(driverTypeCombo) { +<s:if test="!confExists"> + + var url; + + <%-- add prefix in url --%> + if (driverTypeCombo.selectedIndex ==0) { + + <%-- Base H2 --%> + url ="jdbc:h2:file:dbPath/dbName"; + } else { + + <%-- Base PG --%> + url ="jdbc:postgresql://serverName/dbName"; + } + + $("#confUrl").val(url); + + </s:if> + } + + jQuery(document).ready(function () { + + driverTypeChanged($("#confDriverType")[0]); + + }); + + </script> <title><s:text name="echobase.title.workingDbConfiguration"/></title> @@ -83,11 +111,11 @@ </div> <br/> - <s:select key="conf.driverType" cssStyle="font-size: 140%" + <s:select key="conf.driverType" cssStyle="font-size: 140%" id="confDriverType" label="%{getText('echobase.label.driverType')}" requiredLabel="true" - list="driverTypes" disabled="%{confExists}"/> + list="driverTypes" disabled="%{confExists}" onchange="driverTypeChanged(this)" /> - <s:textfield key="conf.url" requiredLabel="true" size="80" + <s:textfield key="conf.url" requiredLabel="true" size="80" id="confUrl" readonly="%{confExists}" label="%{getText('echobase.label.workingDbConfiguration.url')}"/> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.