-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
-<%@ page import="org.splat.dal.bo.som.Study"%>
-<%@ page import="org.splat.som.ApplicationRights"%>
-<%@ page import="org.splat.simer.ApplicationSettings"%>
-<%@ page import="java.util.ResourceBundle"%>
-<%@ page import="java.util.Calendar"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@
- taglib prefix="s" uri="/struts-tags"
-%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<%@taglib prefix="s" uri="/struts-tags"%>
<!-- Initialization of the context
=============================================================================================================================
-->
-<% String action = request.getParameter("action");
-
- ApplicationRights rights = (ApplicationRights)session.getAttribute("user.rights");
- ResourceBundle locale = ResourceBundle.getBundle("som", ApplicationSettings.getCurrentLocale());
- String format = locale.getString("date.format");
- SimpleDateFormat tostring = new SimpleDateFormat(format);
- String result = "uptodate";
- boolean connected = false;
-
- if (rights.getUser() != null) connected = true;
- if (session.getAttribute("search.result") == null) result = "obsolete";
-%>
-<s:set var="todo"><%=action%></s:set>
-<s:set var="user"><%=connected%></s:set>
-<s:set var="format"><%=format%></s:set>
-<s:set var="today"><%=tostring.format(java.util.Calendar.getInstance().getTime())%></s:set>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title><s:text name="name.module"/></title>
- <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
- <script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
- </head>
-
- <body onLoad="initialize('<%=result%>')">
-<!-- Menu-bar
- =============================================================================================================================
- -->
- <jsp:include page="/jsp/menubar.jsp" />
- <div id=top-spacer></div>
-
-<!-- Search menu
- =============================================================================================================================
- -->
- <div id=left-pane>
- <jsp:include page="/jsp/toolbar.jsp">
- <jsp:param name="tools" value="none" />
- </jsp:include>
- <div id=top-spacer></div>
- <jsp:include page="/jsp/menuitem.jsp">
- <jsp:param name="menu" value="open" />
- </jsp:include>
- </div>
-
- <div id=main-pane>
+<script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
+
+<script>
+$(document).ready(function () {
+ initialize('<s:property value="resultState"/>');
+ // Apply jQueryUI datepicker to appropriate input fields
+ $(".dateinput").datepicker({
+ dateFormat: "<s:text name="%{format}"/>".replace("yyyy","yy")
+ });
+});
+</script>
<!-- Search criteria section
=============================================================================================================================
-->
- <div id=article-box>
- <div id=section><s:text name="title.criteria"/></div>
+ <div id="article-box">
+ <div id="section"><s:text name="title.criteria"/></div>
<div id="article-body">
<form name="search" action="refresh-study" method="post">
- <input type=hidden name="contextIndex" />
+ <input type="hidden" name="contextIndex" />
<s:set var="match1" value="criteriaMatch"/>
<s:set var="match2" value="contextMatch"/>
<s:set var="him" value="author"/>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr height=20>
- <td width=40%>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr height="20">
+ <td width="40%">
<b><s:text name="field.among"/></b>
<s:if test="%{#match1 == 'all'}">
- <input type=radio name="criteriaMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="criteriaMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="criteriaMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="criteriaMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
</s:if><s:else>
- <input type=radio name="criteriaMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="criteriaMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="criteriaMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="criteriaMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
</s:else>
</td>
- <td width=60%>|
+ <td width="60%">|
<b><s:text name="field.context"/></b>
<s:if test="%{#match2 == 'all'}">
- <input type=radio name="contextMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="contextMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="contextMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="contextMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
</s:if><s:else>
- <input type=radio name="contextMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="contextMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="contextMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="contextMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
</s:else>
</td>
</tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=2></td></tr>
+ <tr height="1" bgcolor="#AAAAAA"><td colspan="2"></td></tr>
</table>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr valign=top>
- <td width=40%>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr valign="top">
+ <td width="40%">
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
- <td colspan=2><s:text name="criterion.study"/> </td>
- <td colspan=3 align=center>
- <select name="state" style="width: <s:text name="size.search.select"/>" onChange="setState()">
+ <td colspan="2"><s:text name="criterion.study"/> </td>
+ <td colspan="3" align="center">
+ <select name="state" style="width: <s:text name="size.search.select"/>" onChange="changeFilter()">
<s:if test="state == 'ANY'"> <option value="ANY" selected><s:text name="criterion.any" /></option></s:if>
<s:else> <option value="ANY" ><s:text name="criterion.any" /></option></s:else>
- <s:if test="#user">
+ <s:if test="connectedUser != null">
<s:if test="state == 'inWORK'"> <option value="inWORK" selected><s:text name="criterion.inwork" /></option></s:if>
<s:else> <option value="inWORK" ><s:text name="criterion.inwork" /></option></s:else>
<s:if test="state == 'inDRAFT'"> <option value="inDRAFT" selected><s:text name="criterion.indraft" /></option></s:if>
</td>
</tr>
<tr>
- <td colspan=5 align=left>
- <s:if test="visibility == 'PRIVATE'">
- <input type=radio name="visibility" value="PRIVATE" checked onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" onClick="changeFilter()"><s:text name="field.either"/>
- </s:if>
- <s:elseif test="visibility == 'PUBLIC'">
- <input type=radio name="visibility" value="PRIVATE" onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" checked onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" onClick="changeFilter()"><s:text name="field.either"/>
- </s:elseif>
- <s:elseif test="visibility == 'onlypublic'">
- <input type=radio name="visibility" value="PRIVATE" disabled onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="onlypublic" checked onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" disabled onClick="changeFilter()"><s:text name="field.either"/>
- </s:elseif>
- <s:else>
- <input type=radio name="visibility" value="PRIVATE" onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" checked onClick="changeFilter()"><s:text name="field.either"/>
- </s:else>
- </td>
- </tr>
- <tr>
- <td colspan=2><s:text name="criterion.author"/> </td>
- <td colspan=3 align=center>
+ <td colspan="2"><s:text name="criterion.author"/> </td>
+ <td colspan="3" align="center">
<select name="author" style="width: <s:text name="size.search.select"/>" onChange="changeFilter()">
<option value="0"><s:text name="criterion.anybody" /></option>
<s:iterator value="candidates">
<tr>
<s:set var="tipdate">
<s:text name="help.search.date">
- <s:param><s:text name="%{#format}"/></s:param>
- <s:param><s:text name="%{#today}"/></s:param>
+ <s:param><s:text name="%{format}"/></s:param>
+ <s:param><s:text name="%{today}"/></s:param>
</s:text>
</s:set>
<td><s:text name="field.credate"/> </td>
<td><s:text name="field.after"/> </td>
- <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
+ <td><input class="dateinput" onChange="changeFilter()" type="text" name=after size="7" onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
<td><s:text name="field.before"/> </td>
- <td><input type=text name=before size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
+ <td><input class="dateinput" onChange="changeFilter()" type="text" name=before size="7" onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
</tr><tr>
<td><s:text name="field.lasdate"/> </td>
<td><s:text name="field.after"/> </td>
- <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
+ <td><input class="dateinput" onChange="changeFilter()" type="text" name=after size="7" onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
<td><s:text name="field.before"/> </td>
- <td><input type=text name="before" size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
+ <td><input class="dateinput" onChange="changeFilter()" type="text" name="before" size="7" onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
</tr>
</table>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
<td><s:text name="field.contain"/>: </td>
- <td><input type=text name=words style="width: <s:text name="size.search.input"/>" value="<s:property value="%{words}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.title"/>" /></td>
+ <td><input type="text" name=words style="width: <s:text name="size.search.input"/>" value="<s:property value="%{words}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.title"/>" /></td>
</tr><tr>
<td><s:text name="field.reference"/>: </td>
- <td><input type=text name="reference" style="width: <s:text name="size.search.input"/>" value="<s:property value="%{reference}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.refid"/>" /></td>
+ <td><input type="text" name="reference" style="width: <s:text name="size.search.input"/>" value="<s:property value="%{reference}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.refid"/>" /></td>
</tr>
</table>
</td>
- <td width=60%>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <td width="60%">
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<s:iterator value="simulationContexts">
<tr>
- <td><input type=checkbox checked onClick="removeContext('<s:property value="index"/>')"> </td>
+ <td><input type="checkbox" checked onClick="removeContext('<s:property value="index"/>')"> </td>
<td>
<s:if test="%{type.isApproved()}"><s:text name="type.context.%{type.name}"/>: </s:if>
<s:else><s:property value="%{type.name}"/>: </s:else>
</tr>
</s:iterator>
- <s:if test="%{#todo == 'setContext'}">
+ <s:if test="%{actionType == 'setContext'}">
<tr>
<td>
<img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" onClick="cancel()" />
</s:if>
</table>
- <s:if test="%{#todo != 'setContext'}">
+ <s:if test="%{actionType != 'setContext'}">
<select name="contextType" onChange="submit()">
<option value="-1"><s:text name="menu.addcontext"/></option>
<s:iterator value="contextTypeOptions">
</tr>
</table>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
- <td width=40%></td>
- <td width=60% align=left><input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/></td>
+ <td width="40%"></td>
+ <td width="60%" align="left"><input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/></td>
</tr>
</table>
<!-- Result list
=============================================================================================================================
-->
- <div id=resulist>
- <div id=article-box>
- <div id=section><s:text name="title.result"/></div>
- <div id=article-body class=text>
+ <div id="resulist">
+ <div id="article-box">
+ <div id="section"><s:text name="title.result"/></div>
+ <div id="article-body" class="text">
<s:if test="result.size > 0">
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr height=20 valign=bottom>
- <td width=20></td>
- <td width=80><s:text name="label.reference"/></td>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr height="20" valign="bottom">
+ <td width="20"></td>
+ <td width="80"><s:text name="label.reference"/></td>
<td><s:text name="label.title"/><img src="<s:url value="/skin/icon.sortup.png"/>" border="none"/></td>
- <td width=150><s:text name="label.manager"/></td>
+ <td width="150"><s:text name="label.manager"/></td>
</tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=4></td></tr>
+ <tr height="1" bgcolor="#AAAAAA"><td colspan="4"></td></tr>
<s:iterator value="result">
<tr>
<td><img src="<s:url value="/skin/icon.%{progressState}.png"/>" width=12 height=12 border="none" title=""/></td>
</div>
</div>
</div>
-
- </div>
-
- </body>
-</html>
\ No newline at end of file