Ignore:
Timestamp:
Jan 16, 2008, 1:12:10 PM (13 years ago)
Author:
mbayer
Message:

changed code so that users can either run the wizard or import data using the old style importer

Location:
branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp

    r539 r540  
    1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    2     pageEncoding="ISO-8859-1"%>
    3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     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
    423<html>
     24
    525<head>
    6 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    7 <title>Insert title here</title>
     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
    885</head>
     86
    987<body>
    1088
    11 configureImporter.jsp
     89
     90
     91
     92
     93<form name="hybridizations"action="<%= request.getContextPath()%>/common/plugin/index.jsp" 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:zipFile" value=""  id="zipFile">
     100<input type="hidden" name="parameter:useWizard" value="yes"  id="useWizard">
     101<input type="hidden" name="parameter:experimentId" value="<%=experimentId %>"  id="experimentId">
     102
     103<h1>Tab2MAGE Import Wizard -- Select Your Data File</h1>
     104
     105<p>
     106<!--  table with the input form -->
     107<table cellpadding="15">
     108
     109  <!-- file upload -->
     110  <tr>
     111    <td class="boldText">Zip file:</td>
     112
     113    <td class="input">
     114    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
     115      <tr class="noBorder" >
     116     
     117        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
     118       
     119        <td  style="vertical-align: middle;border-style: none;">
     120        <div class="buttons"
     121          onmouseover="this.className='buttons_hover';"
     122          onmouseout="this.className='buttons';"
     123          onclick="browseOnClick()">
     124        <div class="buttons_inner">
     125
     126        <table class="noBorder" cellspacing="0" cellpadding="0">
     127          <tr class="noBorder">
     128            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
     129            <td style="border-style: none;">Browse&hellip;</td>
     130          </tr>
     131        </table>
     132
     133        </div>
     134        </div>
     135        </td>
     136       
     137      </tr>
     138    </table>
     139    </td>
     140
     141    <td>Please select the zip file on your local disk that contains the data files for import.
     142   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).
     143   <p>
     144   The file must include a Tab2MAGE file relating to your raw data files and this must be named "tab2mage.txt".
     145   </td>
     146  </tr>
     147
     148</table>
     149
     150<p>
     151
     152  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
     153  <tr class="noBorder">
     154    <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>
     155    <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>
     156  </table>
     157
     158
     159</form>
    12160
    13161</body>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/submit.jsp

    r539 r540  
    1313
    1414<%
    15   final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    16   final String ID = sc.getId();
    17   final String requestId = request.getParameter("requestId");
     15  SessionControl sc = Base.getExistingSessionControl(pageContext, true);
     16  String ID = sc.getId();
     17  String requestId = request.getParameter("requestId");
    1818 
    1919
     
    3838
    3939
    40 <jsp:forward page="<%= request.getContextPath()%>/common/plugin/index.jsp">
     40<jsp:forward page="/common/plugin/index.jsp">
    4141
    42 <jsp:param name="ID" value="<%=ID%>" />
    43 <jsp:param name="cmd" value="SetParameters"/>
    44 <jsp:param name="requestId" value="<%=requestId%>" />
    45 
    46 <jsp:param name="parameter:fileList" value=""/>
    47 <jsp:param name="parameter:subjectList" value=""/>
    48 <jsp:param name="parameter:tissueList" value=""/>
    4942<jsp:param name="parameter:domain" value="<%=inputDataBean.getDomain()%>" />
    5043<jsp:param name="parameter:accession" value="<%=inputDataBean.getAccession()%>" />
     
    9588<jsp:param name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
    9689
     90<jsp:param name="parameter:fileList" value=""/>
     91<jsp:param name="parameter:subjectList" value=""/>
     92<jsp:param name="parameter:tissueList" value=""/>
     93
     94<jsp:param name="cmd" value="SetParameters"/>
    9795
    9896</jsp:forward>
Note: See TracChangeset for help on using the changeset viewer.