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

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

number of issues fixed in UI

File size: 10.2 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:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
150
151<input type="hidden"name="parameter:fileList" value=""/>
152<input type="hidden"name="parameter:subjectList" value=""/>
153<input type="hidden"name="parameter:tissueList" value=""/>
154<input type="hidden"name="parameter:combinationList" value=""/>
155
156
157
158<h1>Tab2MAGE Import Wizard -- Select Your Data File</h1>
159
160<p>
161<!--  table with the input form -->
162<table cellpadding="15">
163
164  <!-- file upload -->
165  <tr>
166    <td class="boldText">File:</td>
167
168    <td class="input">
169    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
170      <tr class="noBorder" >
171     
172        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
173       
174        <td  style="vertical-align: middle;border-style: none;">
175        <div class="buttons"
176          onmouseover="this.className='buttons_hover';"
177          onmouseout="this.className='buttons';"
178          onclick="browseOnClick()">
179        <div class="buttons_inner">
180
181        <table class="noBorder" cellspacing="0" cellpadding="0">
182          <tr class="noBorder">
183            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
184            <td style="border-style: none;">Browse&hellip;</td>
185          </tr>
186        </table>
187
188        </div>
189        </div>
190        </td>
191       
192      </tr>
193    </table>
194    </td>
195
196    <td>Please select the zip file on your local disk that contains the data files for import.
197   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).
198   <p>
199   The file must include a Tab2MAGE file relating to your raw data files and this must be named "tab2mage.txt".
200   </td>
201  </tr>
202
203</table>
204
205<p>
206
207  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
208  <tr class="noBorder">
209    <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>
210    <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>
211  </table>
212
213
214</form>
215
216</body>
217</html>
Note: See TracBrowser for help on using the repository browser.