summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2005-10-26 22:12:36 +0000
committerthomascube <thomas@roundcube.net>2005-10-26 22:12:36 +0000
commitb076a460e5418ae8f0db0b4b392d91853fd2a21b (patch)
tree2528fa73bddf1fe04f35192d611d2dd1f91d0671 /program/js
parentfa3addfc5d03046cd173fde7e7875bad2badc6da (diff)
Finished message sorting and fixed some skin issues
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 7179898d8..f56a7d866 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6,7 +6,7 @@
| Copyright (C) 2005, RoundCube Dev, - Switzerland |
| Licensed under the GNU GPL |
| |
- | Modified: 2005/10/21 (roundcube) |
+ | Modified: 2005/10/26 (roundcube) |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
@@ -445,6 +445,25 @@ 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].toUpperCase();
+ var header;
+
+ if (this.env.sort_col==sort_col && this.env.sort_order==sort_order)
+ break;
+
+ // set table header class
+ if (header = document.getElementById('rcmHead'+this.env.sort_col))
+ this.set_classname(header, 'sorted'+(this.env.sort_order.toUpperCase()), false);
+ if (header = document.getElementById('rcmHead'+sort_col))
+ this.set_classname(header, 'sorted'+sort_order, true);
+
+ // save new sort properties
+ this.env.sort_col = sort_col;
+ this.env.sort_order = sort_order;
+
+ // reload message list
this.list_mailbox('', '', props);
break;