Ignore:
Timestamp:
Nov 1, 2010, 4:49:52 PM (12 years ago)
Author:
robert@…
Message:

Fixed the random order of templates in the study pages (#135) and created a remote logout call (#158).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r976 r1036  
    758758                // If one or more entities does not have a template, the resulting
    759759                // set contains null. That is not what is meant.
    760                 return set.findAll { it != null };
     760                set = set.findAll { it != null };
     761
     762                // Sort the list so we always have the same order
     763                set = set.sort{ a, b ->
     764                        a == null || b == null || a.equals(b) ? 0 :
     765                        a.name < b.name ? -1 :
     766                        a.name > b.name ?  1 :
     767                        a.id < b.id ? -1 : 1
     768                }
     769
     770                return set
    761771        }
    762772
Note: See TracChangeset for help on using the changeset viewer.