Author: tchemit Date: 2014-04-02 14:33:40 +0200 (Wed, 02 Apr 2014) New Revision: 1802 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1802 Log: fix endpoints fix configuration filtering fix some bad el add I18nAble contract on ObsProgram Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java trunk/wao-web/pom.xml trunk/wao-web/src/main/resources/struts.xml trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp trunk/wao-web/src/main/webapp/enpoints-js.jsp Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ObsProgram.java 2014-04-02 12:33:40 UTC (rev 1802) @@ -22,7 +22,7 @@ import static org.nuiton.i18n.I18n.n; -public enum ObsProgram { +public enum ObsProgram implements I18nAble{ OBSMER("M", n("ObsProgram.OBSMER")), OBSVENTE("V", n("ObsProgram.OBSVENTE")), @@ -62,6 +62,7 @@ return OBSDEB == this; } + @Override public String getI18nKey() { return i18nKey; } Modified: trunk/wao-web/pom.xml =================================================================== --- trunk/wao-web/pom.xml 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/pom.xml 2014-04-02 12:33:40 UTC (rev 1802) @@ -162,8 +162,7 @@ <build> <finalName>wao-${project.version}</finalName> - <!--FIXME--> - <!--resources> + <resources> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> @@ -178,7 +177,7 @@ <include>struts.xml</include> </includes> </resource> - </resources--> + </resources> <pluginManagement> <plugins> <plugin> Modified: trunk/wao-web/src/main/resources/struts.xml =================================================================== --- trunk/wao-web/src/main/resources/struts.xml 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/src/main/resources/struts.xml 2014-04-02 12:33:40 UTC (rev 1802) @@ -29,7 +29,8 @@ <!-- Help debugging --> <constant name="struts.devMode" value="${devMode}"/> <constant name="struts.ognl.logMissingProperties" value="${devMode}"/> - <constant name="struts.el.throwExceptionOnFailure" value="${devMode}"/> + <!-- FIXME --> + <constant name="struts.el.throwExceptionOnFailure" value="false"/> <constant name="struts.i18n.reload" value="${devMode}"/> <constant name="struts.custom.i18n.resources" value="resources"/> <constant name="struts.configuration.xml.reload" value="${devMode}"/> @@ -38,7 +39,6 @@ <!-- Performance tuning --> <!-- see http://struts.apache.org/2.2.3/docs/performance-tuning.html --> <constant name="struts.freemarker.templatesCache" value="true"/> - <constant name="struts.convention.package.locators.basePackage" value="fr.ifremer.wao.web.action"/> <!-- FIXME bleny 06/12/2013 définir à true ouvre une faille de sécurité, voir http://struts.apache.org/release/2.3.x/docs/s2-019.html si on laisse la valeur par défaut, @@ -53,6 +53,8 @@ on se retrouve dans le résumé (!execute)) --> <constant name="struts.mapper.action.prefix.enabled" value="true"/> + <!-- Convention plugin --> + <constant name="struts.convention.package.locators.basePackage" value="fr.ifremer.wao.web.action"/> <constant name="struts.convention.default.parent.package" value="waoPackage"/> <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider"/> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp 2014-04-02 12:33:40 UTC (rev 1802) @@ -32,7 +32,7 @@ $(document).ready(function () { - var boatsFilterController = new FilterController(WAO.BOATS_FILTER_VALUES_JSON_URL, $('#boats-filters-form')); + var boatsFilterController = new FilterController(WAO.OBSMER_BOATS_FILTER_VALUES_JSON_URL, $('#boats-filters-form')); boatsFilterController.init(); }); Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-04-02 12:33:40 UTC (rev 1802) @@ -32,7 +32,7 @@ $(document).ready(function () { - var sampleRowsFilterController = new FilterController(WAO.SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form')); + var sampleRowsFilterController = new FilterController(WAO.OBSMER_SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form')); sampleRowsFilterController.init(); $('#switch-estimated-real').click(function () { @@ -125,7 +125,6 @@ list="filterValues.fishingGearDcfs" listKey="value" listValue="label" - value="%getText(#value)" multiple="true" dataBinding="fishingGearDcfs" /> @@ -249,7 +248,7 @@ <!-- Months columns --> <s:iterator value="samplingPlan.months" var="month"> - <th class="effort <s:if test="isCurrentMonth(#month)"> now</s:if>"> + <th class="effort <s:if test="%{isCurrentMonth(#month)}"> now</s:if>"> <s:property value="%{formatMonth(#month)}"/> </th> </s:iterator> Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-04-02 12:33:40 UTC (rev 1802) @@ -36,6 +36,7 @@ <script type="text/javascript" src="<s:url value="/bootstrap-2.3.1/bootstrap-tooltip.js" />"></script> <script type="text/javascript" src="<s:url value="/bootstrap-2.3.1/bootstrap-popover.js" />"></script> <script type="text/javascript" src="<s:url value="/wao.js" />"></script> + <script type="text/javascript" src="<s:url value='/enpoints-js.jsp'/>"></script> <link rel="stylesheet" type="text/css" href="<s:url value="/select2-3.4.5/select2.css" />" /> <link rel="stylesheet" type="text/css" href="<s:url value="/select2-3.4.5/select2-bootstrap.css" />" /> <link rel="stylesheet" type="text/css" href="<s:url value="/wao.css" />" media="all" /> @@ -48,7 +49,9 @@ <div class="navbar"> <div class="navbar-inner"> - <a class="brand" href="#">Wao <s:property value="getText(obsProgram)" /></a> + <a class="brand" href="#">Wao <s:text name="%{obsProgram.getI18nKey()}"/></a> + + <%--<a class="brand" href="#">Wao <s:property value="%{getText(#obsProgram.getI18nKey())}" /></a>--%> <ul class="nav"> <li> <s:url namespace="/%{obsProgram.name().toLowerCase()}" action="news" id="newsUrl" /> @@ -118,7 +121,11 @@ <s:param name="companyId" value="authenticatedWaoUser.waoUser.company.topiaId" /> </s:url> <s:a href="%{companyUsersUrl}"> - <i class="icon-user"></i> <s:property value="t('wao.ui.page.waoUsers.titleForCompany', authenticatedWaoUser.waoUser.company.name)" /> + <i class="icon-user"></i> + <%--<s:property value="t('wao.ui.page.waoUsers.titleForCompany', authenticatedWaoUser.waoUser.company.name)" />--%> + <s:text name="wao.ui.page.waoUsers.titleForCompany"> + <s:param value="authenticatedWaoUser.waoUser.company.name"/> + </s:text> </s:a> </li> </s:if> Modified: trunk/wao-web/src/main/webapp/enpoints-js.jsp =================================================================== --- trunk/wao-web/src/main/webapp/enpoints-js.jsp 2014-04-02 10:10:28 UTC (rev 1801) +++ trunk/wao-web/src/main/webapp/enpoints-js.jsp 2014-04-02 12:33:40 UTC (rev 1802) @@ -6,8 +6,8 @@ $(document).ready(function () { - WAO.SAMPLE_ROWS_FILTER_VALUES_JSON_URL = '<s:url action="sample-rows-filter-values-json"/>'; - WAO.BOATS_FILTER_VALUES_JSON_URL = '<s:url action="boats-filter-values-json"/>'; + WAO.OBSMER_SAMPLE_ROWS_FILTER_VALUES_JSON_URL = '<s:url namespace="/obsmer" action="sample-rows-filter-values-json"/>'; + WAO.OBSMER_BOATS_FILTER_VALUES_JSON_URL = '<s:url namespace="/obsmer" action="boats-filter-values-json"/>'; });
participants (1)
-
tchemit@users.forge.codelutin.com