Changeset 570
- Timestamp:
- Jun 16, 2010, 3:09:42 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/simpleQuery/common/_query.gsp
r555 r570 26 26 </div> 27 27 <g:submitButton name="search" value="Search" /> <g:if test="${term}"><g:submitButton name="reset" value="Clear" /></g:if> 28 </g:form>29 28 30 29 <br><br> … … 33 32 <h3><a href="#">Simple Assays</a></h3> 34 33 <div class="element"> 35 <g:form action="pages" name="addCompound" id="addCompound"> 36 <div class="description">Compound (e.g. 'glucose')</div> 37 <div class="input"><g:textField name="compound" value="" /></div> 38 <div class="description">Value</div> 39 <div class="input"><g:textField name="compound_value" value="" /></div> 40 <g:submitButton id="addCompound" name="addCompound" value="Add compound" /> 41 </g:form> 34 <div id="compoundGroup"> 35 <div id="compoundRow1"> 36 <div class="description">Compound (e.g. 'glucose')</div> 37 <div class="input"><g:textField name="compound" value="" id="compound1" /></div> 38 <div class="description">Value</div> 39 <div class="input"><g:textField name="compound_value" value="" id="compoundValue1" /></div> 40 </div> 41 </div> 42 <div id="addCompound">Add compound</div> 42 43 </div> 43 44 … … 45 46 46 47 <div class="element"> 47 <g:form action="pages" name="addTransciptome" id="addTransciptome"> 48 <div class="description">List of Gene IDs or pathway IDs</div> 49 <div class="input"><g:textField name="genepath" value="" /></div> 50 <div class="description">Type of regulations</div> 51 <div class="input"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div> 52 <g:submitButton id="addTransciptome" name="addTransciptome" value="Add transciptome" /> 53 </g:form> 48 <div id="transcriptomeGroup"> 49 <div id="transcriptomeRow1"> 50 <div class="description">List of Gene IDs or pathway IDs</div> 51 <div class="input"><g:textField name="genepath" value="" /></div> 52 <div class="description">Type of regulations</div> 53 <div class="input"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div> 54 </div> 55 </div> 56 <div id="addTranscriptome">Add transciptome</div> 54 57 </div> 55 58 </div> 59 </g:form> 56 60 57 61 <br><br> -
trunk/web-app/js/simpleQuery.js
r547 r570 13 13 14 14 $(document).ready(function() { 15 16 var compoundCounter = 2; 17 var transcriptomeCounter = 2; 18 15 19 $("#accordion").accordion({collapsible: true, 16 20 autoHeight: false, 17 21 active: false}); 18 22 19 $('#addCompound').submit(function() { 20 alert('Handler for adding compound called'); 23 $('#addCompound').click(function() { 24 var compoundGroup = document.getElementById('compoundGroup'); 25 26 var newCompoundDiv = document.createElement('div'); 27 newCompoundDiv.setAttribute('id', 'compoundRow' + compoundCounter); 28 29 newCompoundDiv.innerHTML = '<div class="description">Compound</div> <div class="input"><input type="text" name="compound" value=""></div> <div class="description">Value</div> <div class="input"><input id="compoundValue' + compoundCounter + '" type="text"></div>'; 30 31 compoundGroup.appendChild(newCompoundDiv); 32 33 compoundCounter++; 34 // alert('Handler for adding compound called: ' + compoundCounter); 21 35 return true; 22 36 }); 23 37 24 $('#addTransciptome').submit(function() { 25 alert('Handler for adding transcriptome called'); 26 return true; 27 }); 38 $('#addTranscriptome').click(function() { 39 var transcriptomeGroup = document.getElementById('transcriptomeGroup'); 40 var newTranscriptomeDiv = document.createElement('div'); 41 42 newTranscriptomeDiv.setAttribute('id', 'transcriptomeRow' + transcriptomeCounter); 43 44 var newTranscriptomeRowDiv1 = document.createElement('div'); 45 newTranscriptomeRowDiv1.setAttribute('class', 'description'); 46 newTranscriptomeRowDiv1.innerHTML = "Gene/pathway"; 47 newTranscriptomeDiv.appendChild(newTranscriptomeRowDiv1); 48 49 var newTranscriptomeRowDiv2 = document.createElement('div'); 50 newTranscriptomeRowDiv2.setAttribute('class', 'input'); 51 newTranscriptomeRowDiv2.innerHTML = '<input type="text" name="genepath" value="">'; 52 newTranscriptomeDiv.appendChild(newTranscriptomeRowDiv2); 53 54 var newTranscriptomeRowDiv3 = document.createElement('div'); 55 newTranscriptomeRowDiv3.setAttribute('class', 'description'); 56 newTranscriptomeRowDiv3.innerHTML = "Type of regulations"; 57 newTranscriptomeDiv.appendChild(newTranscriptomeRowDiv3); 58 59 var newTranscriptomeRowDiv4 = document.createElement('div'); 60 newTranscriptomeRowDiv4.setAttribute('class', 'input'); 61 var newSelectBox = document.getElementById('regulation'); 62 newTranscriptomeRowDiv4 = newSelectBox.cloneNode(true); 63 newTranscriptomeRowDiv4.setAttribute('id', 'regulation' + transcriptomeCounter); 64 newTranscriptomeDiv.appendChild(newTranscriptomeRowDiv4); 65 66 transcriptomeGroup.appendChild(newTranscriptomeDiv); 67 68 transcriptomeCounter++; 69 // alert('Handler for adding transcriptome called: ' + transcriptomeCounter); 70 return true; 71 }); 72 28 73 }); 74
Note: See TracChangeset
for help on using the changeset viewer.