Changeset 498


Ignore:
Timestamp:
May 31, 2010, 9:03:44 AM (7 years ago)
Author:
vinlud
Message:

Base form controls and UI

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/query/SimpleQueryController.groovy

    r496 r498  
    3434            }
    3535
    36         simpleQuery {
    37           render(view: "/simpleQuery/mainPage")
    38           onRender {
    39               println "Rendering simpleQuery interface"
    40           }
    41 
    42           on ("submit") {
    43                 println "Submitted query string"
    44               } .to 'results'
    45         }
    46 
    47         results {
    48           render(view: "simpleQuery/results")
    49           onRender {
    50               println "Rendering results"
    51           }
    52         }
    5336    }
    5437
     38    query {
     39      render(view: "simpleuery")
     40    }
    5541}
  • trunk/grails-app/views/simpleQuery/common/_query.gsp

    r496 r498  
    66  To change this template use File | Settings | File Templates.
    77--%>
    8 <div id="simpleQuery" class="simpleQuery">
     8<div id="simpleQuery" class="simplequery">
    99        <h1>Simple Query</h1>
    10         <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
    11         <g:hiddenField name="do" value="" />
    12         </g:form>
     10
     11   
     12
     13    <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
     14    <div class="content">
     15      <div class="element">
     16        <div class="description">Search term (e.g. 'paracetamol')</div>
     17        <div class="input"><g:textField name="term" value="" /></div>
     18      </div>
     19      <div class="element">
     20        <div class="description">Species (e.g. 'rattus norvegicus')</div>
     21        <div class="input"><g:select name="species" from="" value="${species}" noSelection="['':'--- select a species ---']"/></div>
     22      </div>
     23      <div class="element">
     24        <div class="description">Organ (e.g. 'liver')</div>
     25        <div class="input"><g:select name="organ" from="" value="${organ}" noSelection="['':'--- select organ/tissue ---']"/></div>
     26      </div>
     27    </div>
     28    <g:submitButton name="search" value="Search" />
     29
     30    <br><br>
     31 
     32
     33    <div id="accordion">
     34      <h3><a href="#">Clinical Data</a></h3>
     35      <div class="element">
     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 name="add_compound" value="Add compound" />
     41      </div>
     42
     43      <h3><a href="#">Transcriptomics</a></h3>
     44      <div class="element">
     45        <div class="description">List of Gene IDs or pathway IDs</div>
     46        <div class="input"><g:textField name="genepath" value="" /></div>
     47        <div class="description">Type of regulations</div>
     48        <div class="input"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
     49        <g:submitButton name="add_transciptome" value="Add transciptome" />
     50      </div>
     51     
     52      <h3><a href="#">Metabolomics</a></h3>
     53      <div>boe boe boe</div>
     54    </div>
     55
     56    </g:form>
     57
    1358</div>
  • trunk/web-app/css/simpleQuery.css

    r478 r498  
     1.simplequery .content {
     2    padding: 0px 10px 0px 10px;
     3    display: inline;
     4    border: 0px;
     5}
     6
     7.simplequery .element {
     8    display: block;
     9}
     10
     11.simplequery .element .description {
     12    margin: 10px;
     13    display: inline-block;
     14    font-size: 11px;
     15    width: 250px;
     16    word-wrap: break-word;
     17}
     18
     19.simplequery .element .input {
     20    display: inline;
     21    font-size: 11px;
     22    word-wrap: break-word;
     23}
     24
     25.simplequery .element .input input {
     26    vertical-align: top;
     27    border: 1px solid #CCC;
     28    margin: 2px 0;
     29    padding: 2px 4px;
     30}
  • trunk/web-app/js/simpleQuery.js

    r496 r498  
    1111 * $Date$
    1212 */
     13
     14  $(document).ready(function() {
     15    $("#accordion").accordion({collapsible: true,
     16    autoHeight: false,
     17    active: false});
     18  });
     19
Note: See TracChangeset for help on using the changeset viewer.