Changeset 372
- Timestamp:
- Apr 22, 2010, 3:45:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r369 r372 9 9 plugins.jquery=1.4.1.1 10 10 plugins.mail=0.9 11 #plugins.nadd-neutralizer=0.111 plugins.nadd-neutralizer=0.1 12 12 plugins.nimble=0.3-SNAPSHOT 13 13 plugins.searchable=0.5.5 -
trunk/grails-app/controllers/dbnp/studycapturing/TemplateEditorController.groovy
r359 r372 14 14 */ 15 15 package dbnp.studycapturing 16 import dbnp.data.* 17 import dbnp.studycapturing.* 16 18 17 19 class TemplateEditorController { … … 20 22 */ 21 23 def index = { 22 // got a template get parameter? 23 def template = (params.template) ? params.template : null 24 // got a entity get parameter? 25 def entity = null 26 if (params.entity) { 27 // decode entity get parameter 28 entity = new String(params.entity.toString().decodeBase64()) 29 } 24 30 25 // enterthe flow!26 redirect(action: 'pages', params:[" template":template])31 // got with the flow! 32 redirect(action: 'pages', params:["entity":entity]) 27 33 } 28 34 … … 33 39 // start the flow 34 40 onStart { 35 println "start template editor flow" 41 println params 42 if (params.entity) { 43 //def name = params.entity 44 //def name = "java.lang.Integer" 45 //println name.class 46 //def S = new dbnp.studycapturing.Study() 36 47 37 if (params.template) { 38 flow.template = template 48 //def name = "dbnp.studycapturing.Study" as Class 49 //println name.newInstance() 50 println Class.forName(new GString("dbnp.studycapturing.Study")) 51 //flow.entity = (name as Class).newInstance() 52 //flow.templates = Template.findAllByEntity(flow.entity) 53 } else { 54 // all templates for all entities; note that normally 55 // this shouldn't happen as this flow is designed to 56 // launch in a jquery dialog, passing an encoded entity 57 flow.templates = Template.findAll() 39 58 } 59 flow.templates = Template.findAll() 40 60 } 41 61 42 62 // main template editor page 43 63 templates { 44 render(view: "/templateEditor/templates" , collection:[templates: Template.findAll()])64 render(view: "/templateEditor/templates") 45 65 onRender { 46 66 println "render templates" 47 println Template.findAll()48 67 } 49 68 on("next").to "start" -
trunk/grails-app/controllers/dbnp/studycapturing/TermEditorController.groovy
r359 r372 53 53 } 54 54 55 // main te mplateeditor page56 te mplates {55 // main term editor page 56 terms { 57 57 render(view: "/termEditor/terms") 58 58 onRender { -
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r367 r372 563 563 def templateSelect = {attrs -> 564 564 def entity = attrs.remove('entity') 565 566 // add the entity class name to the element as 567 // a base64 encoded string. 568 // TODO: encrypt this, instead of using base64! 569 // As this class is instantiated elsewhere 570 // this is a security hazard! 571 // @see TemplateEditorController 572 attrs['entity'] = entity.toString().replaceAll(/^class /,'').bytes.encodeBase64() 565 573 566 574 // fetch templates -
trunk/grails-app/views/layouts/dialog.gsp
r359 r372 5 5 <head> 6 6 <title><g:layoutTitle default="Grails"/></title> 7 <link rel="stylesheet" href="${resource(dir: 'css', file: 'dialog.css')}"/> 7 8 <g:javascript library="jquery"/> 8 9 <script src="${createLinkTo(dir: 'js', file: 'jquery-ui-1.8rc3.custom.min.js')}" type="text/javascript"></script> -
trunk/grails-app/views/templateEditor/templates.gsp
r359 r372 1 <% 2 /** 3 * Template Editor overview template 4 * 5 * @author Jeroen Wesbeek 6 * @since 20100422 7 * @package wizard 8 * @see dbnp.studycapturing.TemplateEditorController 9 * 10 * Revision information: 11 * $Rev$ 12 * $Author$ 13 * $Date$ 14 */ 15 %> 1 16 <%@ page contentType="text/html;charset=UTF-8" %> 2 17 <html> … … 6 21 </head> 7 22 <body> 8 hoi 23 templates for entity: ${entity}<br/> 24 25 <g:if test="${templates}"> 26 <g:each in="${templates}"> 27 ${it}<br/> 28 </g:each> 29 </g:if> 9 30 10 <g:each in="${templates}">11 ${it}<br/>12 </g:each>13 14 31 </body> 15 32 </html> -
trunk/grails-app/views/termEditor/terms.gsp
r359 r372 1 <% 2 /** 3 * Term Editor overview template 4 * 5 * @author Jeroen Wesbeek 6 * @since 20100422 7 * @package wizard 8 * @see dbnp.studycapturing.TermEditorController 9 * 10 * Revision information: 11 * $Rev$ 12 * $Author$ 13 * $Date$ 14 */ 15 %> 1 16 <%@ page contentType="text/html;charset=UTF-8" %> 2 17 <html> 3 18 <head> 4 <meta name="layout" content="dialog"/> 5 <title>my bla</title> 19 <meta name="layout" content="dialog"/><g:if env="production"></g:if> 20 <script type="text/javascript" src="${resource(dir: 'js', file: 'ontology-chooser.min.js')}"></script> 21 </g:if><g:else> 22 <script type="text/javascript" src="${resource(dir: 'js', file: 'ontology-chooser.js')}"></script> 23 </g:else> 6 24 </head> 7 25 <body> -
trunk/web-app/js/SelectAddMore.js
r371 r372 104 104 height : height, 105 105 modal : true, 106 buttons : { 107 Ok : function() { $(this).dialog('close'); } 108 }, 106 109 close : function() { 107 110 onClose(this); -
trunk/web-app/js/wizard.js
r367 r372 63 63 rel : 'template', 64 64 url : '/gscf/templateEditor', 65 vars : 'entity', 65 66 label : 'add / modify..', 66 67 class : 'modify',
Note: See TracChangeset
for help on using the changeset viewer.