Changeset 1782


Ignore:
Timestamp:
Apr 20, 2011, 2:27:00 PM (6 years ago)
Author:
work@…
Message:
  • resolved #93, improved seperation of events / sampling events in events page of the wizard
Location:
trunk
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/application.properties

    r1767 r1782  
    11#Grails Metadata file
    2 #Fri Apr 08 16:42:58 CEST 2011
     2#Wed Apr 20 14:22:24 CEST 2011
    33app.build.display.info=0
    44app.build.svn.revision=1079
     
    1313plugins.db-util=0.4
    1414plugins.famfamfam=1.0.1
    15 plugins.gdt=0.0.33
     15plugins.gdt=0.0.37
    1616plugins.gdtimporter=0.2.6
    1717plugins.grom=0.2.2
  • trunk/grails-app/views/studyWizard/pages/_events.gsp

    r1558 r1782  
    1616%>
    1717<af:page>
    18         <g:if env="development">
    19                 <af:ajaxButtonElement description="Development feature (clear events)" name="clear" value="clear events" afterSuccess="onPage()">
    20                         This functionality is only available in development mode for debugging purposes and will not show in test and production environments
    21                 </af:ajaxButtonElement>
    22         </g:if>
    23 
    2418        <span class="info">
    2519                <span class="title">Define all events that occur in your study</span>
     
    2721        </span>
    2822
    29         <af:radioElement name="eventType" description="Type" elements="['event','sample']" value="${values?.eventType}">
    30                 Type of event
     23        <af:radioElement name="eventType" description="Choose the type of event" elements="[event:'treatment, challenge, etc.',sample:'sampling event']" class="eventradio" elementclass="label_radio" value="${values?.eventType}">
     24                The type of event can be either a sampling event (e.g. taking a sample) or anything that acts upon a subject (e.g. a treatment or a challenge)
    3125        </af:radioElement>
    32         <af:templateElement name="eventTemplate" elementId="eventTemplate" description="Event Template" value="${event?.template}" entity="${dbnp.studycapturing.Event}" addDummy="true" ajaxOnChange="switchTemplate" afterSuccess="onPage()" >
     26        <af:templateElement required="true" name="eventTemplate" elementId="eventTemplate" description="Event Template" value="${event?.template}" entity="${dbnp.studycapturing.Event}" addDummy="true" ajaxOnChange="switchTemplate" afterSuccess="onPage()" >
    3327                The template to use for this event
    3428        </af:templateElement>
    35         <af:templateElement name="sampleTemplate" elementId="sampleTemplate" description="Sampling Event Template" value="${event?.template}" entity="${dbnp.studycapturing.SamplingEvent}" addDummy="true" ajaxOnChange="switchTemplate" afterSuccess="onPage()" >
     29        <af:templateElement  required="true" name="sampleTemplate" elementId="sampleTemplate" description="Sampling Event Template" value="${event?.template}" entity="${dbnp.studycapturing.SamplingEvent}" addDummy="true" ajaxOnChange="switchTemplate" afterSuccess="onPage()" >
    3630                The template to use for this sampling event
    3731        </af:templateElement>
     
    7266                  return (event.keyCode != 13);
    7367                });
     68
     69                $('body').addClass('has-js');
     70                $('.label_check, .label_radio').click(function(){
     71                        setupLabel();
     72                });
     73                setupLabel();
    7474        });
     75
     76    function setupLabel() {
     77        if ($('.label_check input').length) {
     78            $('.label_check').each(function(){
     79                $(this).removeClass('c_on');
     80            });
     81            $('.label_check input:checked').each(function(){
     82                $(this).parent('label').addClass('c_on');
     83            });
     84        }
     85        if ($('.label_radio input').length) {
     86            $('.label_radio').each(function(){
     87                $(this).removeClass('r_on');
     88            });
     89            $('.label_radio input:checked').each(function(){
     90                $(this).parent('label').addClass('r_on');
     91            });
     92        }
     93    }
    7594        </script>
    7695
  • trunk/web-app/css/default.css

    r1772 r1782  
    470470        z-index: 0;
    471471}
     472
     473/** START :: radio elements wizard event page **/
     474.eventradio {
     475        background: #4f84b8 url(../images/inputboxes/box-grad.png) repeat-x 0 0;
     476        border-radius: 10px;
     477        -webkit-border-radius: 10px;
     478        -moz-border-radius: 10px;
     479        -khtml-border-radius: 10px;
     480        box-shadow: 0 5px 12px rgba(0,0,0,.4);
     481        -webkit-box-shadow: 0 5px 12px rgba(0,0,0,.4);
     482        -moz-box-shadow: 0 5px 12px rgba(0,0,0,.4);
     483        -khtml-box-shadow: 0 5px 12px rgba(0,0,0,.4);
     484        color: #fff;
     485        font-weight: bold;
     486
     487        height: 50px;
     488}
     489.eventradio .description {
     490        height: 50px;
     491        padding-left: 10px;
     492}
     493.eventradio .input {
     494        height: 50px;
     495        line-height: 50px;
     496        text-shadow: 0 0 1px #333333;
     497}
     498.label_check,
     499.label_radio { padding-left: 34px; padding-right: 40px; padding-top: 5px; }
     500.label_radio { background: url(../images/inputboxes/radio-off.png) no-repeat; }
     501.label_check { background: url(../images/inputboxes/check-off.png) no-repeat; }
     502label.c_on { background: url(../images/inputboxes/check-on.png) no-repeat; }
     503label.r_on { background: url(../images/inputboxes/radio-on.png) no-repeat; color: #fae04e; }
     504.label_check input,
     505.label_radio input { position: absolute; left: -9999px; }
     506/** END :: radio elements wizard event page **/
Note: See TracChangeset for help on using the changeset viewer.