Changeset 486 for trunk


Ignore:
Timestamp:
Apr 13, 2010, 12:38:51 PM (15 years ago)
Author:
gav
Message:

Remember user's sort in task search view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r483 r486  
    7474                isFilterApplied = FilterUtils.isFilterApplied(params)
    7575            }
     76        }
     77
     78        // Remember sort if supplied, otherwise try to restore.
     79        if(params.sort && params.order) {
     80             session.taskSearchSort = params.sort
     81             session.taskSearchOrder = params.order
     82        }
     83        else if(session.taskSearchSort && session.taskSearchOrder) {
     84            params.sort = session.taskSearchSort
     85            params.order = session.taskSearchOrder
    7686        }
    7787
Note: See TracChangeset for help on using the changeset viewer.