Changeset 1140

Show
Ignore:
Timestamp:
15-11-10 20:25:49 (3 years ago)
Author:
t.w.abma@…
Message:

- added ability to add new ontologies in the "missing properties" step

Location:
trunk/grails-app
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy

    r1126 r1140  
    144144 
    145145    /** 
    146      * Method to save the missing properties 
     146     * Method to save the missing properties. 
     147     * 
    147148     * @param entity entity class we are using (dbnp.studycapturing.Subject etc.) 
    148149     */ 
    149150 
    150151    def saveMissingProperties = { 
    151  
     152         
    152153        session.importer_importeddata.each { table -> 
    153154            table.each { entity -> 
     
    158159        } 
    159160 
    160         render(view:"step3", model:[datamatrix:session.importer_importeddata])   
     161        // a new ontology term was added, so stay at the current step otherwise go to the next step 
     162        if (params.updatefield) render(view:"step3_simple", model:[datamatrix:session.importer_importeddata]) 
     163            else render(view:"step3", model:[datamatrix:session.importer_importeddata]) 
    161164    } 
    162165 
     
    340343        render templates as JSON 
    341344    } 
     345 
     346    def refresh = { 
     347       // params 
     348    } 
    342349} 
  • trunk/grails-app/views/importer/common/_missingproperties.gsp

    r1137 r1140  
    2020<script type="text/javascript" src="${resource(dir: 'js', file: 'importer.js')}"></script> 
    2121 
    22  
    2322<g:if env="production"> 
    2423<script type="text/javascript" src="${resource(dir: 'js', file: 'SelectAddMore.min.js')}"></script> 
     
    3938        onClose : function(scope) { 
    4039            //refreshWebFlow();? 
     40             //location.reload(); 
     41             updatefield = '<input type = "hidden" name="updatefield" value="true" / >'; 
     42             $('#missingpropertiesform').append(updatefield); 
     43 
     44             $('#missingpropertiesform').submit(); 
    4145 
    4246        } 
     
    4852 
    4953<div class="wizard" id="wizard"> 
    50 <g:form name="missingpropertiesform" action="saveMissingProperties"> 
     54<g:form name="missingpropertiesform" id="missingpropertiesform" action="saveMissingProperties"> 
    5155    <div class="table"> 
    5256        <g:set var="showHeader" value="${true}"/>