Ignore:
Timestamp:
May 29, 2012, 4:24:52 PM (10 years ago)
Author:
work@…
Message:
  • improved initial study compare page gives visual feedback
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/dbnp/generic/AjaxService.groovy

    r2160 r2237  
    5151                def uniqueEventTemplateNames = (params.containsKey('uniqueEventTemplateNames[]')) ? getAsArray(params['uniqueEventTemplateNames[]']) : []
    5252                def uniqueSamplingEventTemplateNames = (params.containsKey('uniqueSamplingEventTemplateNames[]')) ? getAsArray(params['uniqueSamplingEventTemplateNames[]']) : []
     53        def modules = (params.containsKey('modules[]')) ? getAsArray(params['modules[]']) : []
    5354
    5455                // iterate through readable studies for this user
     
    6364                        // 3. if any samplingEventTemplateNames were selected, see if this study contains any of these
    6465                        matched = (matched && (!uniqueSamplingEventTemplateNames.size() || study.samplingEvents.find{uniqueSamplingEventTemplateNames.contains(it.template.id)})) ? true : false;
     66            // 4. if any modules were selected, see if this study contains any of these
     67            matched = (matched && (!modules.size() || study.assays.find{modules.contains(it.module.id)})) ? true : false;
    6568
    6669                        // if criteria are met, add this study to the matchedStudies array
Note: See TracChangeset for help on using the changeset viewer.