Changeset 150 for trunk/grails-app/views
- Timestamp:
- Jan 29, 2010, 6:08:49 PM (12 years ago)
- Location:
- trunk/grails-app/views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/common/_eventDescriptionTableRows.gsp
r118 r150 1 2 1 <!-- Rows for a two column table --> 3 4 5 6 7 <tr class="prop">8 <td valign="top" class="name">9 <label for="protocol"><g:message code="eventDescription.protocol.label" default="Protocol" /></label>10 </td>11 <td valign="top" class="value ${hasErrors(bean: description, field: 'protocol', 'errors')}">12 <g:select name="protocol.id" id="protocol" from="${dbnp.studycapturing.Protocol.list()}" optionKey="id" optionValue="${{it.id}}" value="${description?.protocol?.id}" onchange="${remoteFunction(action:'showMyProtocol', controller:'eventDescription', id:description.id, update:'preview', onComplete:'Effect.Appear(preview)', params:'\'protocol=\' + this.value' )}" />13 </td>14 </tr>15 16 2 17 3 <tr class="prop"> … … 23 9 </td> 24 10 </tr> 25 26 27 11 28 12 … … 37 21 38 22 39 <!-- changes here on select --> 23 <!-- select --> 24 25 <tr class="prop"> 26 27 <td valign="top" class="name" width=200 > 28 <label for="protocol"><g:message code="eventDescription.protocol.label" default="Protocol" /></label> 29 </td> 30 <td valign="top" class="value ${hasErrors(bean: description, field: 'protocol', 'errors')}"> 31 <g:select name="protocol.id" id="protocol" from="${dbnp.studycapturing.Protocol.list()}" optionKey="id" optionValue="${{it.name}}" value="${{it?.id}}" onchange="${remoteFunction(action:'showMyProtocol', controller:'eventDescription', update:'preview', onComplete:'Effect.Appear(preview)', params:'\'protocolid=\' + this.value', id:params['id'])}" /> 32 </td> 33 </tr> 34 35 36 <!-- this part changes dynamiccally on select --> 37 40 38 <tbody id="preview"> 41 <g:each in="${description.protocol.values}"> 39 <% def list = [] %> 40 <g:each in="${description.protocol.parameters}" > <% list.add( it )%> </g:each> 41 <% list.sort{ a,b -> a.name <=> b.name }%> 42 43 <g:each in="${list}"> 42 44 43 45 <tr class="prop"> 44 <td valign="top" class="name" >45 <label for="p rotocolInstance"><g:message code="${it.protocolParameter.name}" /></label>46 <td valign="top" class="name" width=200> 47 <label for="parameter"><g:message code="${it.name}" /></label> 46 48 </td> 47 49 48 50 <td valign="top" class="name"> 49 <g:textField name="protocol Instance.${it.id}" value="${it.value}" />51 <g:textField name="protocolParameter.${it.id}" value="${eventInstance.parameterStringValues[it.name]}" /> 50 52 </td> 53 </tr> 51 54 52 </tr>53 55 </g:each> 54 56 </tbody> -
trunk/grails-app/views/event/edit.gsp
r119 r150 1 <html> 1 2 2 3 <html>4 3 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <meta name="layout" content="main" /> 7 <g:set var="entityName" value="${message(code: 'event.label', default: 'Event')}" /> 8 <title><g:message code="default.create.label" args="[entityName]" /></title> 9 <g:render template="../common/jquerysetup"/> 10 <g:render template="../common/jqueryuisetup"/> 11 <g:render template="../common/jquerytmsetup"/> 4 <meta name="layout" content="main" /> 5 <g:set var="entityName" value="${message(code: 'event.label', default: 'Event')}" /> 6 <g:setProvider library="jquery"/> 7 <script src="${createLinkTo(dir: 'js', file: 'timepicker-0.2.1.js')}" type="text/javascript"></script> 12 8 </head> 13 9 14 10 15 16 11 <body> 17 18 <div class="nav">19 <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>20 <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>21 </div>22 12 23 13 … … 27 17 28 18 <g:if test="${flash.message}"> 29 <div class="message">${flash.message}</div>19 <div class="message">${flash.message}</div> 30 20 </g:if> 31 21 <g:hasErrors bean="${eventInstance}"> 32 22 <div class="errors"> <g:renderErrors bean="${eventInstance}" as="list" /> </div> 33 23 </g:hasErrors> 34 24 … … 47 37 </td> 48 38 <td valign="top" class="value" > 49 <g:select id="subject" name="subject.id" from="${dbnp.studycapturing.Subject.list()}" optionKey="id" optionValue="name" value="${eventInstance?.subject?.id}" onchange="displayVals()"/>39 <g:select id="subject" name="subject.id" from="${dbnp.studycapturing.Subject.list()}" optionKey="id" optionValue="name" value="${eventInstance?.subject?.id}" /> 50 40 </td> 51 41 </tr> … … 85 75 </tr> 86 76 87 88 89 <g:render template="../common/eventDescriptionTableRows" model="${[description:description]}"/> 77 <g:render template="../common/eventDescriptionTableRows" model="${[description:description, event:event]}"/> 90 78 91 79 92 80 </tbody> 81 82 83 84 <tbody id="samplePartial"> </tbody> 85 86 87 93 88 </table> 94 89 </div> -
trunk/grails-app/views/eventDescription/showMyProtocolEmpty.gsp
r120 r150 1 <g:each in="${protocol.parameters}"> 1 <% def list = [] %> 2 <g:each in="${protocolInstance.parameters}" > <% list.add( it )%> </g:each> 3 <% list.sort{ a,b -> a.name <=> b.name }%> 4 5 <g:each in="${list}"> 2 6 3 7 <tr class="prop"> 4 8 <td valign="top" class="name" width=200 > 9 <label for="protocol"><g:message code="${it.name}" /></label> 10 </td> 5 11 <td valign="top" class="name"> 6 < label for="startTime"><g:message code="${it.name}" /></label>12 <g:textField name="protocolParameter.${it.id}" value="" /> 7 13 </td> 8 9 <td valign="top" class="name">10 <g:textField id="protocolParameterValue.${it.id}" value="${""}" />11 </td>12 13 14 </tr> 14 15 15 16 16 </g:each> -
trunk/grails-app/views/eventDescription/showMyProtocolFilled.gsp
r120 r150 1 <g:each in="${protocolInstance.values}"> 1 <% def list = [] %> 2 <g:each in="${protocolInstance.parameters}" > <% list.add( it )%> </g:each> 3 <% list.sort{ a,b -> a.name <=> b.name }%> 2 4 3 <tr class="prop"> 5 <g:each in ="${list}" > 6 <tr class="prop"> 4 7 5 <td valign="top" class="name">6 <label for="protocolInstance"><g:message code="${it.protocolParameter.name}" /></label>7 </td>8 <td valign="top" class="name" width=200> 9 <label for="protocolInstance"><g:message code="${it.name}" /></label> 10 </td> 8 11 9 <td valign="top" class="name"> 10 <g:textField name="protocolInstance.${it.id}" value="${it.value}" /> 11 </td> 12 13 </tr> 14 15 12 <td valign="top" class="name"> 13 <g:textField name="protocolParameter.${it.id}" value="${parameterStringValues[it.name]}" /> 14 </td> 15 </tr> 16 16 </g:each>
Note: See TracChangeset
for help on using the changeset viewer.