Ignore:
Timestamp:
Mar 8, 2010, 12:19:54 AM (9 years ago)
Author:
jahn
Message:

Functionality of dynamic protocol parameter selection improved. The java scripts lines still need to be cleaned and put into a seperate fiel to be included by a grails source tag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/eventDescription/showProtocolParameters.gsp

    r233 r241  
    66<% tableRowId=0 %>
    77<g:each in ="${list}" >
    8     <script type="text/javascript">
    9     addRow('showProtocolParameters',"${list.id}","${it.name}","${it.unit}","${it.type}","${it.reference}","${it.description}");
    10     </script>
     8
     9    <g:if test="it.type==dbnp.studycapturing.ProtocolParameterType.STRINGLIST" >
     10        <% def listEntries=it.listEntries.collect { it } %>
     11
     12        <script type="text/javascript">
     13            var tmpList = [];
     14            <% listEntries.each{ print "tmpList.push( escape('${it}') ); tmpList.push( '${it.id}' );" } %>
     15            addRow('showProtocolParameters',"${list.id[0]}","${it.name}","${it.unit}","${it.type}","${it.reference}","${it.description}", tmpList );
     16            delete tmpList;
     17        </script>
     18    </g:if>
     19    <g:else>
     20        <script type="text/javascript">
     21            addRow('showProtocolParameters',"${list.id[0]}","${it.name}","${it.unit}","${it.type}","${it.reference}","${it.description}", new Array() );
     22        </script>
     23    </g:else>
    1124</g:each>
Note: See TracChangeset for help on using the changeset viewer.