root/trunk/grails-app/views/assay/assayExport/selectAssay.gsp @ 2095

Revision 2095, 1.6 KB (checked in by s.h.sikkema@…, 2 years ago)

- Merged assay export and galaxy assay fetch code - now possible to select fetched data in galaxy
- removed unused assay methods and gsps generated by grails
- getUser now returns displayName instead of username in case of shibboleth users

  • Property svn:keywords set to Rev Author Date
Line 
1<%@ page import="dbnp.studycapturing.Study" contentType="text/html;charset=UTF-8" %>
2<html>
3<head>
4        <g:if test="${GALAXY_URL}">
5                <meta name="layout" content="galaxy"/>
6        </g:if>
7        <g:else>
8                <meta name="layout" content="main"/>
9        </g:else>
10
11        <title>Select an assay</title>
12        <script type="text/javascript">
13                function updateAssay(jsonData, selectID) {
14                        var a = eval(jsonData);
15                        var sel = $('#' + selectID).empty();
16
17                        $('#submit').attr("disabled", a.length == 0);
18
19                        $(a).each(function(i, el) {
20                                sel.append($("<option></option>").attr("value", el.id).text(el.name))
21                        })
22                }
23
24                $(document).ready(function() {
25                        // trigger change event to load assay based on currently selected study.
26                        // After pressing 'Back', the browser may use last selected study.
27                        $('#study').change()
28
29                })
30        </script>
31</head>
32
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
40With this exporter you can export (meta) data about samples from an assay to a file.
41First, 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="assayExport">
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="Submit" id="submit"/>
48</g:form>
49</body>
50</html>
Note: See TracBrowser for help on using the browser.