diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-04-27 09:15:56 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-04-27 09:15:56 +0000 |
| commit | 07ed460cc54ff891fc0add0bb9dfb55c8b646161 (patch) | |
| tree | 89ada5646a30a5557026b8be51f3777525fc5e74 /roundcubemail/program | |
| parent | e3901fd7e571d2af9c5f1c54be0a113c990766bc (diff) | |
- simplified messagelist sort action code
git-svn-id: https://svn.roundcube.net/trunk@2434 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/js/app.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 6080fba31..443c0f370 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -596,17 +596,12 @@ function rcube_webmail() case 'sort': - // get the type of sorting - var a_sort = props.split('_'); - var sort_col = a_sort[0]; - var sort_order = a_sort[1] ? a_sort[1].toUpperCase() : 'ASC'; + var sort_order, sort_col = props; - if (this.env.sort_col==sort_col) { + if (this.env.sort_col==sort_col) sort_order = this.env.sort_order=='ASC' ? 'DESC' : 'ASC'; - - if (this.env.sort_order==sort_order) - break; - } + else + sort_order = 'ASC'; // set table header class $('#rcm'+this.env.sort_col).removeClass('sorted'+(this.env.sort_order.toUpperCase())); |
