1 | <!-- Projet Ether - $Id: liste_jeux.jsp,v 1.42 2004/07/07 14:05:20 pn Exp $ --> |
---|
2 | <html> |
---|
3 | <META HTTP-EQUIV="Cache-Control" content="no-cache"> |
---|
4 | <META HTTP-EQUIV="Pragma" content="no-cache"> |
---|
5 | <META HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT"> |
---|
6 | <%@ page import="fr.alcatel.ether.app.search.ListElement" %> |
---|
7 | <%@ page import="fr.alcatel.ether.bean.OrderableBean" %> |
---|
8 | <%@ page import="fr.alcatel.ether.bean.ListBean" %> |
---|
9 | <%@ page import="fr.alcatel.ether.tools.*" %> |
---|
10 | <%@ page import="fr.alcatel.ether.app.common.*" %> |
---|
11 | <%@ page import="org.apache.ecs.html.*" %> |
---|
12 | <%@ page import="java.text.MessageFormat" %> |
---|
13 | <%@ page import="fr.alcatel.ether.app.service.OrderedServices" %> |
---|
14 | <%@ page import="fr.alcatel.ether.app.service.Service" %> |
---|
15 | <%@ page import="fr.alcatel.ether.app.data.Theme" %> |
---|
16 | <%@ page import="java.util.ArrayList" %> |
---|
17 | <%@ page import="java.util.Iterator" %> |
---|
18 | <%@ page import="java.util.Locale" %> |
---|
19 | |
---|
20 | <jsp:useBean scope="request" id="searchDataSetTable" class = "fr.alcatel.ether.bean.ListBean"> |
---|
21 | </jsp:useBean> |
---|
22 | |
---|
23 | <head> |
---|
24 | <% |
---|
25 | Config.getConfig(); |
---|
26 | String langue = request.getParameter("langue"); |
---|
27 | if (langue==null) |
---|
28 | { |
---|
29 | langue=Config.langue; |
---|
30 | } |
---|
31 | Locale loc=Locale.ENGLISH; |
---|
32 | if (langue.equals("FRENCH")) loc = Locale.FRENCH; |
---|
33 | MultiLanguage ml = MultiLanguage.instance(loc); |
---|
34 | JSPUtils.setSessionParameter(request, "langue", loc); |
---|
35 | %> |
---|
36 | <title><%= ml.get("RechercheJeux.titre")%></title> |
---|
37 | <script language="JavaScript"> |
---|
38 | var posX = 0 ; |
---|
39 | var posY = 0 ; |
---|
40 | function ajout() |
---|
41 | { |
---|
42 | document.first.action = '/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Config.SEARCH_DATASET_ADDTO_SHOPPINGLIST %>'; |
---|
43 | document.first.target="_self"; |
---|
44 | document.first.submit(); |
---|
45 | } |
---|
46 | function develop(index) |
---|
47 | { |
---|
48 | document.first.action = '/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Config.SEARCH_DATASET_ELEMENT_SELECTED %>&<%= Config.INDEX %>=' + index + '&posX=' + posX + '&posY=' + posY ; |
---|
49 | document.first.target="_self"; |
---|
50 | document.first.submit(); |
---|
51 | } |
---|
52 | |
---|
53 | var agt=navigator.userAgent.toLowerCase(); |
---|
54 | var is_major = parseInt(navigator.appVersion); |
---|
55 | var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); |
---|
56 | var is_ie3 = (is_ie && (is_major < 4)); |
---|
57 | var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) ); |
---|
58 | var is_ie5up = (is_ie && !is_ie3 && !is_ie4); |
---|
59 | |
---|
60 | function stockxy(evt) |
---|
61 | { |
---|
62 | posY = evt.clientY + document.body.scrollTop - 60 ; |
---|
63 | posX = evt.clientX; |
---|
64 | } |
---|
65 | |
---|
66 | function scrollposition() |
---|
67 | { |
---|
68 | <% |
---|
69 | |
---|
70 | if (request.getParameter("posY") != null) |
---|
71 | { |
---|
72 | out.println("self.scrollTo(1," + request.getParameter("posY") + ");"); |
---|
73 | } |
---|
74 | else |
---|
75 | { |
---|
76 | out.println("self.scrollTo(0,0);"); |
---|
77 | } |
---|
78 | %> |
---|
79 | } |
---|
80 | |
---|
81 | function selectService(index1,index2) |
---|
82 | { |
---|
83 | newWindow = window.open('/etherP/servlet/ServiceSelectionServletL?<%= Config.ACTION %>=<%= Config.SERVICE_DISPLAY_SERVICES_DATASET%>&<%= Constants.INDEX %>=' + index1 + '&<%= Constants.SECOND_INDEX %>=' + index2,'selectService','scrollbars=yes,resizable=yes,width=720,height=450'); |
---|
84 | newWindow.focus(); |
---|
85 | } |
---|
86 | |
---|
87 | function download(index1,index2) |
---|
88 | { |
---|
89 | newWindow = window.open('/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Config.SEARCH_DATASET_CHOOSE_TRANSFER %>&<%= Constants.INDEX %>=' + index1 + '&<%= Constants.SECOND_INDEX %>=' + index2,'transfer','width=400,height=400,scrollbars=1,resizable=1'); |
---|
90 | newWindow.focus(); |
---|
91 | } |
---|
92 | |
---|
93 | function info(url) |
---|
94 | { |
---|
95 | newWindow = window.open(url,'experimentInfo','<%=Config.winInfo %>'); |
---|
96 | newWindow.focus(); |
---|
97 | } |
---|
98 | function help(url) |
---|
99 | { |
---|
100 | newWindow = window.open(url,'Help','<%=Config.winParam %>'); |
---|
101 | newWindow.focus(); |
---|
102 | } |
---|
103 | function content() |
---|
104 | { |
---|
105 | newWindow = window.open('/etherP/servlet/ShoppingListServletL?<%= Config.ACTION %>=<%= Config.SHOPPINGLIST_INIT_SHOPPING%>&<%= Config.SHOPPINGLIST_CLOSE %>=true','contentShopping','scrollbars=yes,resizable=yes,width=950,height=550'); |
---|
106 | newWindow.focus(); |
---|
107 | } |
---|
108 | function toutreplier() |
---|
109 | { |
---|
110 | document.first.action = '/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Config.SEARCH_DATASET_REPLIER %>'; |
---|
111 | document.first.target="_self"; |
---|
112 | document.first.submit(); |
---|
113 | } |
---|
114 | function toutdeplier() |
---|
115 | { |
---|
116 | document.first.action = '/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Config.SEARCH_DATASET_DEPLIER %>'; |
---|
117 | document.first.target="_self"; |
---|
118 | document.first.submit(); |
---|
119 | } |
---|
120 | |
---|
121 | function selectImageDataset(index) |
---|
122 | { |
---|
123 | self.window.location='/etherP/servlet/SearchDataSetServletL?<%= Config.ACTION %>=<%= Constants.SEARCH_DATASET_IMG_INIT %>&<%= Constants.INDEX %>=' + index + '&posX=' + posX + '&posY=' + posY ; |
---|
124 | } |
---|
125 | |
---|
126 | function arbo() |
---|
127 | { |
---|
128 | if ( parent.up.location.href == "http://ether.ipsl.jussieu.fr/topi_fr.html" ) |
---|
129 | { |
---|
130 | parent.up.document.arb.arbi.src="/images/ipsl/arb_list.gif"; |
---|
131 | } |
---|
132 | } |
---|
133 | |
---|
134 | </script> |
---|
135 | <link rel="stylesheet" href="/etherP/ether.css"></head> |
---|
136 | <STYLE TYPE="text/css"> |
---|
137 | #acces {position: absolute; left:745; top:395; visibility: visible; color: #ce040a} |
---|
138 | #ether {position: absolute; left:620; top:110; visibility: visible } |
---|
139 | #info_a {position: absolute; left:20; top:65; visibility: visible } |
---|
140 | #top {position: absolute; left:8; top:0; visibility: visible } |
---|
141 | a.menu_1 {color:#2b557d;text-decoration:none; font-family: Arial, Helvetica,sans-serif; font-size:11pt; } |
---|
142 | a.menu_2 {color:#2b557d;text-decoration:none; font-family: Arial, Helvetica,sans-serif; font-size:9pt; } |
---|
143 | a.ether{color:transparent;text-decoration:none;} |
---|
144 | </STYLE> |
---|
145 | <body link="#000099" vlink="#000099" alink="#000099" onLoad="arbo();"> |
---|
146 | <div id=top> |
---|
147 | <%Config.getConfig();%> |
---|
148 | <form method="POST" name="first"> |
---|
149 | <INPUT TYPE="hidden" name="titi" value="toto" > |
---|
150 | <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" > |
---|
151 | <tr> |
---|
152 | <td colspan="5" height=38> |
---|
153 | <% |
---|
154 | String titleJeu = ""; |
---|
155 | if ( session.getAttribute(Constants.DATASET_THEME) != null ) |
---|
156 | { |
---|
157 | titleJeu = ml.get("RechercheJeuxTheme.titre") + ((Theme) session.getAttribute(Constants.DATASET_THEME)).getDescription() ; |
---|
158 | } |
---|
159 | else |
---|
160 | { |
---|
161 | titleJeu = ml.get("RechercheJeuxListe.titre"); |
---|
162 | } |
---|
163 | %> |
---|
164 | <h1><%= titleJeu %></h1></td> |
---|
165 | </tr> |
---|
166 | <tr valign="baseline"> |
---|
167 | <td> |
---|
168 | <INPUT TYPE="checkbox" NAME="<%= Constants.DEVELOP_ALL %>" <% if (request.getParameter(Constants.DEVELOP_ALL) != null ) out.println(" checked "); %> VALUE="toto"> |
---|
169 | <span class="lien"><%= ml.get("RechercheJeux.developAll")%></span> |
---|
170 | </td> |
---|
171 | <td> |
---|
172 | <span class="lien"><a href="javascript:toutdeplier()" class="aHaut"><%= ml.get("RechercheJeux.toutDeplier")%></a></span> |
---|
173 | </td> |
---|
174 | <td> |
---|
175 | <span class="lien"><a href="javascript:toutreplier()" class="aHaut"><%= ml.get("RechercheJeux.toutReplier")%></a></span> |
---|
176 | </td> |
---|
177 | <td> </td> |
---|
178 | <td> </td> |
---|
179 | |
---|
180 | </tr> |
---|
181 | </table> |
---|
182 | <span class="petit" ><b><%= Config.tag_image_ligne %></b> |
---|
183 | <br><br> |
---|
184 | <% |
---|
185 | boolean accessTheme = (session.getAttribute(Constants.DATASET_THEME) != null ); |
---|
186 | ListBean bean = searchDataSetTable ; |
---|
187 | EtherHTMLTable table = new EtherHTMLTable(bean.getTableLines(),10); |
---|
188 | table.setAlign( "center" ); |
---|
189 | table.setWidth( "100%" ); |
---|
190 | table.setBorder( "1" ); |
---|
191 | table.setCellPadding("2"); |
---|
192 | int iFormat = 4; |
---|
193 | int iExperiment = -1; |
---|
194 | int iParameter = -1; |
---|
195 | int iSubParameter = -1; |
---|
196 | int iVersion = 3; |
---|
197 | int iCeosLevel = 2; |
---|
198 | int iFirstDate = 0; |
---|
199 | int iLastDate = 1; |
---|
200 | |
---|
201 | String[] tS = new String[10]; |
---|
202 | String bs = "RechercheJeux."; |
---|
203 | if ( iFormat != -1 ) tS[iFormat + 1] = ml.get(bs + "Format"); |
---|
204 | if ( iExperiment != -1 ) tS[iExperiment + 1] = ml.get(bs + "Experience"); |
---|
205 | if ( iVersion != -1) tS[iVersion + 1] = ml.get(bs + "Version"); |
---|
206 | if ( iCeosLevel != -1 ) tS[iCeosLevel + 1] = ml.get(bs + "CeosLevel"); |
---|
207 | if ( iFirstDate != -1 ) tS[iFirstDate + 1] = ml.get(bs + "DateDeb"); |
---|
208 | if ( iLastDate != -1 ) tS[iLastDate + 1] = ml.get(bs + "DateFin"); |
---|
209 | |
---|
210 | int tbl = 5; |
---|
211 | tS[0] = " "; |
---|
212 | tS[tbl + 1] = " "; |
---|
213 | tS[tbl + 2] = ml.get(bs + "Info"); |
---|
214 | tS[tbl + 3] = ml.get(bs + "NbFiles"); |
---|
215 | tS[tbl + 4] = ml.get(bs + "Size"); |
---|
216 | table.setTitles(tS); |
---|
217 | |
---|
218 | ListElement current ;int i ;int iLigne = 0 ; |
---|
219 | int nbElements = bean.size();int iO = 0; |
---|
220 | OrderedServices links = (OrderedServices) session.getAttribute(Config.ORDERED_SERVICES); |
---|
221 | %> |
---|
222 | |
---|
223 | <% |
---|
224 | double NO_D = Constants.NO_DOUBLE; |
---|
225 | String sp = " "; |
---|
226 | |
---|
227 | for (i = 0 ; i < nbElements ; i++ ) |
---|
228 | { |
---|
229 | current = (ListElement) bean.elementAt(i); |
---|
230 | if ( current.isShowed() ) |
---|
231 | { |
---|
232 | if ( current.isExpanded() ) |
---|
233 | table.setCellContent(iLigne,0,bean.getIndentation(current.getLevel()) + "<a href=\"javascript:develop(" + i + ");\" onClick=\"stockxy(event)\" >" + Config.getIcone( Config.icone_dossier_ouvert, "icone_dossier_ouvert", ml) + "</a>" + current.getValue()); |
---|
234 | else |
---|
235 | table.setCellContent(iLigne,0,bean.getIndentation(current.getLevel()) + "<a href=\"javascript:develop(" + i + ");\" onClick=\"stockxy(event)\" >" + Config.getIcone( Config.icone_dossier_ferme, "icone_dossier_ferme", ml) + "</a>" + current.getValue()); |
---|
236 | |
---|
237 | if ( current.isExperiment() && (current.getExperimentUrl() != null) && ( ! current.getExperimentUrl().equals(""))) |
---|
238 | table.setCellContent( iLigne,tbl+ 2,"<a href=\"javascript:info('" + current.getExperimentUrl() + "');\" >" + Config.getIcone( Config.icone_info, "icone_info", ml) + "</a>" ); |
---|
239 | else |
---|
240 | table.setCellContent( iLigne,tbl+ 2,sp ); |
---|
241 | |
---|
242 | iLigne++ ; |
---|
243 | if ( current.isLeaf() && current.isExpanded()) |
---|
244 | { |
---|
245 | OrderableBean listO = (OrderableBean) current.getLeaf(); |
---|
246 | for (iO = 0 ; iO < listO.size() ;iO++ ) |
---|
247 | { |
---|
248 | if ( listO.isAccessible(iO) ) |
---|
249 | { |
---|
250 | table.setCellContent(iLigne,0, bean.getIndentation(current.getLevel()+1) + Config.getIcone( Config.icone_jeu_de_donnees, "icone_jeu_de_donnees" , ml) ); |
---|
251 | } |
---|
252 | else |
---|
253 | { |
---|
254 | table.setCellContent(iLigne,0,bean.getIndentation(current.getLevel()+1) + Config.getIcone( Config.icone_jeu_de_donnees_interdit, "icone_jeu_de_donnees_interdit", ml) ); |
---|
255 | } |
---|
256 | if ( iFormat != -1 ) |
---|
257 | { |
---|
258 | if (( listO.getFormat(iO) != null)&& (listO.getFormat(iO) != "" ) ) |
---|
259 | table.setCellContent( iLigne, iFormat + 1,listO.getFormat(iO)); |
---|
260 | else |
---|
261 | table.setCellContent( iLigne, iFormat + 1,sp); |
---|
262 | } |
---|
263 | if ( iExperiment != -1 ) |
---|
264 | table.setCellContent( iLigne, iExperiment + 1,listO.getExperimentName(iO) ); |
---|
265 | |
---|
266 | if ( iParameter != -1 ) |
---|
267 | { |
---|
268 | if (( listO.getParameter(iO) != null ) && ( listO.getParameter(iO) != "" )) |
---|
269 | table.setCellContent( iLigne, iParameter + 1,listO.getParameter(iO) ); |
---|
270 | else |
---|
271 | table.setCellContent( iLigne, iParameter + 1,sp); |
---|
272 | } |
---|
273 | if ( iSubParameter != -1 ) |
---|
274 | { |
---|
275 | if (( listO.getSubParameter(iO) != null ) && ( listO.getSubParameter(iO) != "" )) |
---|
276 | table.setCellContent( iLigne, iSubParameter + 1,listO.getSubParameter(iO) ); |
---|
277 | else |
---|
278 | table.setCellContent( iLigne, iSubParameter + 1,sp); |
---|
279 | } |
---|
280 | if ( iVersion != -1) |
---|
281 | { |
---|
282 | if ( (listO.getDataSetVersion(iO) != null ) && (listO.getDataSetVersion(iO) != "")) |
---|
283 | table.setCellContent( iLigne, iVersion + 1,listO.getDataSetVersion(iO) ); |
---|
284 | else |
---|
285 | table.setCellContent( iLigne, iVersion + 1,sp); |
---|
286 | } |
---|
287 | if ( iCeosLevel != -1 ) |
---|
288 | { |
---|
289 | if ( (listO.getCeosLevel(iO) != null ) && (listO.getCeosLevel(iO) != "")) |
---|
290 | table.setCellContent( iLigne, iCeosLevel + 1,listO.getCeosLevel(iO) ); |
---|
291 | else |
---|
292 | table.setCellContent( iLigne, iCeosLevel + 1,sp); |
---|
293 | } |
---|
294 | if ( iFirstDate != -1 ) |
---|
295 | { |
---|
296 | if ( (listO.getFirstObservationUTCDate(iO) != null) && (!listO.getFirstObservationUTCDate(iO).equals(""))) |
---|
297 | table.setCellContent( iLigne, iFirstDate + 1,listO.getFirstObservationUTCDate(iO) ); |
---|
298 | else |
---|
299 | table.setCellContent( iLigne, iFirstDate + 1,sp); |
---|
300 | } |
---|
301 | if ( iLastDate != -1 ) |
---|
302 | { |
---|
303 | if (( listO.getLastObservationUTCDate(iO) != null ) && (!listO.getLastObservationUTCDate(iO).equals("") )) |
---|
304 | table.setCellContent( iLigne, iLastDate + 1,listO.getLastObservationUTCDate(iO) ); |
---|
305 | else |
---|
306 | table.setCellContent( iLigne, iLastDate + 1,sp); |
---|
307 | } |
---|
308 | if ((listO.getCeosSublevel(iO) != null ) && listO.getCeosSublevel(iO).equals(Constants.BROWSE)) |
---|
309 | table.setCellContent( iLigne,tbl+ 1,"<a href=\"javascript:selectImageDataset("+ listO.getId(iO) + ");\" onClick=\"stockxy(event)\" >" + Config.getIcone("icone_image_dataset", ml) + "</a>" ); |
---|
310 | else |
---|
311 | table.setCellContent( iLigne,tbl+ 1,sp ); |
---|
312 | |
---|
313 | Object[] arguments = { new Double(listO.getSize(iO) / (1024.0*1024.0))}; |
---|
314 | table.setCellContent( iLigne,tbl+ 3,Integer.toString(listO.getNbFiles(iO)) ); |
---|
315 | table.setCellContent( iLigne, tbl+ 4, MessageFormat.format("{0,number,#.###}",arguments)); |
---|
316 | iLigne++ ; |
---|
317 | }// fin for |
---|
318 | }// fin current.isLeaf() |
---|
319 | }// fin if showed |
---|
320 | } // fin for |
---|
321 | out.println( table.generate() ); |
---|
322 | %> |
---|
323 | <INPUT TYPE="hidden" name="hidden" value="hidden"> |
---|
324 | </form> |
---|
325 | <span class="petit"> <b><%= Config.tag_image_ligne %></b></span> |
---|
326 | <script>scrollposition()</script> |
---|
327 | </div> |
---|
328 | </body> |
---|
329 | </html> |
---|