source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp @ 544

Last change on this file since 544 was 544, checked in by mbayer, 13 years ago

submission with existing tab2mage file implemented

File size: 10.1 KB
Line 
1<%@ page import="net.sf.basedb.core.*"%>
2<%@ page import="net.sf.basedb.clients.web.*"%>
3<%@ page import="net.sf.basedb.util.*"%>
4<%@ page import="java.util.*"%>
5
6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
7<!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name -->
8<jsp:setProperty name="inputDataBean" property="*" />
9
10<%
11final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
12final String ID = sc.getId();
13final String requestId = request.getParameter("requestId");
14
15
16  //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
17  ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
18  int experimentId = cc.getId();
19
20 %>
21
22
23<html>
24
25<head>
26
27<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
28<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
29<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
30
31<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
32
33<script language="JavaScript" type="text/javascript">
34  //submits form
35  function submit()
36  {
37    document.hybridizations.submit();
38  }
39    function getRoot()
40    {
41      return '/base/';
42    }
43    function getScale()
44    {
45      return 1.0;
46    }
47    function doImport()
48    {
49      var frm = document.forms['hybridizations'];
50      if (Main.trimString(frm.path.value) == '')
51      {
52        alert("You must select a file to import from");
53        frm.path.focus();
54      }
55      else
56      {
57        frm.submit();
58      }
59    }
60    function browseOnClick()
61    {
62      var frm = document.forms['hybridizations'];
63      var url = '<%= request.getContextPath()%>/filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+file+to+import&callback=setFileCallback';
64      url += '&filter:INT:location=1';
65      Main.openPopup(url, 'SelectFile', 1000, 700);
66    }
67    function setFileCallback(fileId, path)
68    {
69      var frm = document.forms['hybridizations'];
70      frm.file_id.value = fileId;
71      frm.path.value = path;
72      document.getElementById('zipFile').value = path;
73      }
74    function recentFileOnChange()
75    {
76      var frm = document.forms['hybridizations'];
77      var selected = frm.recentFile[frm.recentFile.selectedIndex];
78      setFileCallback(selected.value, selected.text);
79      frm.recentFile.selectedIndex = 0;
80    }
81
82   
83    </script>
84
85</head>
86
87<body>
88
89
90
91
92
93<form name="hybridizations"action="<%= request.getContextPath()%>/common/plugin/index.jsp?ID=<%=ID%>" method="post">
94<input type="hidden" name="ID" value="<%=ID%>"> 
95<input type="hidden" name="cmd" value="SetParameters"> 
96<input type="hidden"name="requestId" value="<%=requestId%>"> 
97
98<input type="hidden" name="file_id" value="">
99<input type="hidden" name="parameter:path" value=""  id="zipFile">
100<input type="hidden" name="parameter:experimentId" value="<%=experimentId %>"  id="experimentId">
101
102
103<input type="hidden"name="parameter:domain" value="<%=inputDataBean.getDomain()%>" />
104<input type="hidden"name="parameter:accession" value="<%=inputDataBean.getAccession()%>" />
105<input type="hidden"name="parameter:qualityControl" value="<%=inputDataBean.getQualityControl()%>" />
106<input type="hidden"name="parameter:experimentalDesign" value="<%=inputDataBean.getExperimentalDesign()%>" />
107<input type="hidden"name="parameter:experimentName" value="<%=inputDataBean.getExperimentName()%>" />
108<input type="hidden"name="parameter:description" value="<%=inputDataBean.getDescription()%>" />
109<input type="hidden"name="parameter:releaseDate" value="<%=inputDataBean.getReleaseDate()%>" />
110<input type="hidden"name="parameter:submissionDate" value="<%=inputDataBean.getSubmissionDate()%>" />
111<input type="hidden"name="parameter:submitter" value="<%=inputDataBean.getSubmitter()%>" />
112<input type="hidden"name="parameter:organization" value="<%=inputDataBean.getOrganization()%>" />
113<input type="hidden"name="parameter:publicationTitle" value="<%=inputDataBean.getPublicationTitle()%>" />
114<input type="hidden"name="parameter:authors" value="<%=inputDataBean.getAuthors()%>" />
115<input type="hidden"name="parameter:journal" value="<%=inputDataBean.getJournal()%>" />
116<input type="hidden"name="parameter:volume" value="<%=inputDataBean.getVolume()%>" />
117<input type="hidden"name="parameter:issue" value="<%=inputDataBean.getIssue()%>" />
118<input type="hidden"name="parameter:pages" value="<%=inputDataBean.getPages()%>" />
119<input type="hidden"name="parameter:year" value="<%=inputDataBean.getYear()%>" />
120<input type="hidden"name="parameter:pubmedId" value="<%=inputDataBean.getPubmedId()%>" />
121<input type="hidden"name="parameter:experimentId" value="<%=inputDataBean.getExperimentId()%>" />
122<input type="hidden"name="parameter:treatmentProtocol" value="<%=inputDataBean.getTreatmentProtocol()%>" />
123<input type="hidden"name="parameter:extractionProtocol" value="<%=inputDataBean.getExtractionProtocol()%>" />
124<input type="hidden"name="parameter:labelingProtocol" value="<%=inputDataBean.getLabelingProtocol()%>" />
125<input type="hidden"name="parameter:hybridizationProtocol" value="<%=inputDataBean.getHybridizationProtocol()%>" />
126<input type="hidden"name="parameter:scanningProtocol" value="<%=inputDataBean.getScanningProtocol()%>" />
127<input type="hidden"name="parameter:treatmentProtocolParams" value="<%=inputDataBean.getTreatmentProtocolParams()%>" />
128<input type="hidden"name="parameter:extractionProtocolParams" value="<%=inputDataBean.getExtractionProtocolParams()%>" />
129<input type="hidden"name="parameter:labelingProtocolParams" value="<%=inputDataBean.getLabelingProtocolParams()%>" />
130<input type="hidden"name="parameter:hybridizationProtocolParams" value="<%=inputDataBean.getHybridizationProtocolParams()%>" />
131<input type="hidden"name="parameter:scanningProtocolParams" value="<%=inputDataBean.getScanningProtocolParams()%>" />
132<input type="hidden"name="parameter:platform" value="<%=inputDataBean.getPlatform()%>" />
133<input type="hidden"name="parameter:organism" value="<%=inputDataBean.getOrganism()%>" />
134<input type="hidden"name="parameter:numDesigns" value="<%=inputDataBean.getNumDesigns()%>" />
135<input type="hidden"name="parameter:dyeSwap" value="<%=inputDataBean.getDyeSwap()%>" />
136<input type="hidden"name="parameter:refSample" value="<%=inputDataBean.getRefSample()%>" />
137<input type="hidden"name="parameter:numTreatmentGroups" value="<%=inputDataBean.getNumTreatmentGroups()%>" />
138<input type="hidden"name="parameter:expFactors" value="<%=inputDataBean.getExpFactors()%>" />
139<input type="hidden"name="parameter:numReplicates" value="<%=inputDataBean.getNumReplicates()%>" />
140<input type="hidden"name="parameter:tissues" value="<%=inputDataBean.getTissues()%>" />
141<input type="hidden"name="parameter:pooling" value="<%=inputDataBean.getPooling()%>" />
142<input type="hidden"name="parameter:subjectNames" value="<%=inputDataBean.getSubjectNames()%>" />
143<input type="hidden"name="parameter:fileList" value="<%=inputDataBean.getFileList()%>" />
144<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
145<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
146<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
147<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
148<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
149<input type="hidden"name="parameter:fileList" value=""/>
150<input type="hidden"name="parameter:subjectList" value=""/>
151<input type="hidden"name="parameter:tissueList" value=""/>
152
153
154
155<h1>Tab2MAGE Import Wizard -- Select Your Data File</h1>
156
157<p>
158<!--  table with the input form -->
159<table cellpadding="15">
160
161  <!-- file upload -->
162  <tr>
163    <td class="boldText">File:</td>
164
165    <td class="input">
166    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
167      <tr class="noBorder" >
168     
169        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
170       
171        <td  style="vertical-align: middle;border-style: none;">
172        <div class="buttons"
173          onmouseover="this.className='buttons_hover';"
174          onmouseout="this.className='buttons';"
175          onclick="browseOnClick()">
176        <div class="buttons_inner">
177
178        <table class="noBorder" cellspacing="0" cellpadding="0">
179          <tr class="noBorder">
180            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
181            <td style="border-style: none;">Browse&hellip;</td>
182          </tr>
183        </table>
184
185        </div>
186        </div>
187        </td>
188       
189      </tr>
190    </table>
191    </td>
192
193    <td>Please select the zip file on your local disk that contains the data files for import.
194   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).
195   <p>
196   The file must include a Tab2MAGE file relating to your raw data files and this must be named "tab2mage.txt".
197   </td>
198  </tr>
199
200</table>
201
202<p>
203
204  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
205  <tr class="noBorder">
206    <td id="next" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Submit</td></tr></table></div></div></td>
207    <td id="close" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td><td style="border-style: none;">Cancel</td></tr></table></div></div></td>  </tr>
208  </table>
209
210
211</form>
212
213</body>
214</html>
Note: See TracBrowser for help on using the repository browser.