root/trunk/grails-app/views/assay/galaxyExport.gsp @ 2030

Revision 2030, 1.8 KB (checked in by robert@…, 3 years ago)

Added galaxy export functionality in assayController

Line 
1<%--
2  Created by IntelliJ IDEA.
3  User: siemensikkema
4  Date: Nov 30, 2010
5  Time: 4:07:28 PM
6--%>
7
8<%@ page import="dbnp.studycapturing.Study" contentType="text/html;charset=UTF-8" %>
9<html>
10  <head>
11    <meta name="layout" content="main" />
12    <title>Select an assay</title>
13    <script type="text/javascript">
14      function updateAssay(jsonData, selectID) {
15        var a = eval(jsonData);
16        var sel = $('#'+selectID).empty();
17
18        $('#submit').attr("disabled", a.length == 0);
19
20        $(a).each(function(i, el){
21          sel.append($("<option></option>").attr("value",el.id).text(el.name))
22        })
23      }
24
25      $(document).ready(function(){
26        // trigger change event to load assay based on currently selected study.
27        // After pressing 'Back', the browser may use last selected study.
28        $('#study').change()
29
30      })
31    </script>
32  </head>
33  <body>
34  <div style="color:red;">
35    ${flash.errorMessage}
36  </div>
37
38  <h1>Select the assay you want to export data from</h1>
39
40  With this exporter you can export (meta) data about samples from an assay to a file.
41  First, select a study from the first list and then select an assay from that study from the second list.<br />
42
43  <g:form name="assaySelect" action="sendToGalaxy">
44    <g:select optionKey="id" optionValue="title" name="studyId" from="${userStudies}" id="study"
45      onChange="${remoteFunction(controller:'study',action:'ajaxGetAssays',params:'\'id=\'+escape(this.value)',onComplete: 'updateAssay(XMLHttpRequest.responseText, \'assay\')')}"/>
46    <g:select optionKey="id" name="assayId" id="assay" from=""/>
47    <g:submitButton name="submit" value="Send to galaxy" id="submit"/>
48    <g:hiddenField name="GALAXY_URL" value="${galaxy_url}" />
49    <g:hiddenField name="tool_id" value="${tool_id}" />
50  </g:form>
51  </body>
52</html>
Note: See TracBrowser for help on using the browser.