Changeset 256 for trunk/grails-app


Ignore:
Timestamp:
Jan 4, 2010, 8:16:51 AM (15 years ago)
Author:
gav
Message:

Add sorting of persons in group for assignedGroup.
Remove some unused javascript.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/AssignedGroupService.groovy

    r254 r256  
    5353
    5454        result.personGroup = result.assignedGroupInstance.personGroup
    55         result.personsInGroup = result.personGroup.persons
     55        result.personsInGroup = result.personGroup.persons.sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }
    5656
    5757        // Success.
     
    7777                return fail(code:"personGroup.not.found")
    7878
    79             result.personsInGroup = result.personGroup.persons
     79            result.personsInGroup = result.personGroup.persons.sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }
    8080
    8181            result.assignedGroupInstance = AssignedGroup.get(params.id)
     
    121121        result.assignedGroupInstance.properties = params
    122122
    123         result.personGroup = PersonGroup.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name)}[0] // Get the first result.
    124         result.personsInGroup = result.personGroup.persons
     123        result.personGroup = PersonGroup.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }[0] // Get the first result.
     124        result.personsInGroup = result.personGroup.persons.sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }
    125125
    126         // success
     126        // Success.
    127127        return result
    128128    }
     
    146146                return fail(code:"personGroup.not.found")
    147147
    148             result.personsInGroup = result.personGroup.persons
     148            result.personsInGroup = result.personGroup.persons.sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }
    149149
    150150            result.assignedGroupInstance = new AssignedGroup()
     
    183183            return fail(code:"default.not.found")
    184184
    185         result.personsInGroup = result.personGroup.persons
     185        result.personsInGroup = result.personGroup.persons.sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }
    186186
    187187        // Success.
  • trunk/grails-app/views/assignedGroupDetailed/create.gsp

    r254 r256  
    55        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    66        <meta name="layout" content="main" />
    7         <title>Create Assigned Group</title>
    8         <g:javascript src="overlayPane.js" />
     7        <title>Create AssignedGroup</title>
    98    </head>
    109    <body>
Note: See TracChangeset for help on using the changeset viewer.