- Timestamp:
- Apr 23, 2010, 4:16:44 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r374 r377 10 10 plugins.jquery=1.4.1.1 11 11 plugins.mail=0.9 12 #plugins.nadd-neutralizer=0.112 plugins.nadd-neutralizer=0.1 13 13 plugins.nimble=0.3-SNAPSHOT 14 14 plugins.searchable=0.5.5 -
trunk/grails-app/controllers/dbnp/studycapturing/TemplateEditorController.groovy
r376 r377 77 77 // fetch all templates to this entity 78 78 flow.templates = Template.findAllByEntity(entity) 79 80 // find all template fields for this particular entity 81 // for now, all 82 // TODO: limit for this entity only 83 flow.allTemplateFields = TemplateField.findAll().sort{ it.name } 79 84 } 80 85 } catch (Exception e) { } … … 102 107 render(view: "templates") 103 108 onRender { 104 println "render templates" 109 // template parameter given? 110 if (params.template) { 111 // yes, find template by name 112 flow.template = Template.findByName(params.template) 113 flow.templateFields = flow.allTemplateFields 114 115 flow.template.fields.each() { 116 println it 117 flow.templateFields.remove(it) 118 119 } 120 println "count: "+flow.template.fields.size() 121 122 println "---" 123 flow.allTemplateFields.each() { 124 println it 125 } 126 println "count: "+flow.allTemplateFields.size() 127 println "---" 128 129 println flow.allTemplateFields.class 130 println flow.template.fields.class 131 println "---" 132 } 105 133 } 106 134 on("next").to "start" -
trunk/grails-app/views/templateEditor/pages/templates.gsp
r376 r377 18 18 <head> 19 19 <meta name="layout" content="dialog"/> 20 <title> my bla</title>20 <title>template editor</title> 21 21 </head> 22 22 <body> 23 templates for entity: ${entity}<br/>24 23 25 <g:if test="${templates}"> 26 <ul> 27 <g:each in="${templates}"> 28 <li>${it}</li> 29 </g:each> 24 <script type="text/javascript"> 25 $(function() { 26 $("#sortable").sortable({ 27 placeholder: 'ui-state-highlight' 28 }); 29 $("#sortable").disableSelection(); 30 }); 31 </script> 32 33 <g:form action="pages" name="wizardForm" id="wizardForm"> 34 <wizard:templateSelect name="template" description="Template" value="${template}" entity="${dbnp.studycapturing.Study}" addDummy="true" onChange="this.form.submit();" /> 35 </g:form> 36 37 <g:if test="${template}"> 38 <ul id="sortable"> 39 <g:render template="elements/all" collection="${template.fields}" /> 30 40 </ul> 31 41 </g:if> 42 43 add a new field: 44 <g:select from="${templateFields}" /> 32 45 33 46 </body> -
trunk/web-app/css/dialog.css
r373 r377 1 1 body { 2 2 margin: 0; padding: 0; 3 font: 1 0px normalArial, Helvetica, sans-serif;3 font: 12px normal Verdana, Arial, Helvetica, sans-serif; 4 4 } 5 6 #sortable { list-style-type: none; margin: 0; padding: 0; width: 200px; } 7 #sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1em; } 8 html>body #sortable li { height: 1.5em; line-height: 1.2em; } 9 .ui-state-highlight { height: 1.5em; line-height: 1.2em; }
Note: See TracChangeset
for help on using the changeset viewer.