summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-04-27 09:15:56 +0000
committeralecpl <alec@alec.pl>2009-04-27 09:15:56 +0000
commit23387ef8534035a7495224f003009bfef77846a5 (patch)
tree1c9b132978031f8e1e8084da2417860dca29a8fe /program/js
parent9f3579b1f8f02eb3f1d506657b36e425954013b4 (diff)
- simplified messagelist sort action code
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 6080fba31..443c0f370 100644
--- a/program/js/app.js
+++ b/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()));