- simplified messagelist sort action code

release-0.6
alecpl 16 years ago
parent 9f3579b1f8
commit 23387ef853

@ -596,17 +596,12 @@ function rcube_webmail()
case 'sort': case 'sort':
// get the type of sorting var sort_order, sort_col = props;
var a_sort = props.split('_');
var sort_col = a_sort[0];
var sort_order = a_sort[1] ? a_sort[1].toUpperCase() : 'ASC';
if (this.env.sort_col==sort_col) { if (this.env.sort_col==sort_col)
sort_order = this.env.sort_order=='ASC' ? 'DESC' : 'ASC'; sort_order = this.env.sort_order=='ASC' ? 'DESC' : 'ASC';
else
if (this.env.sort_order==sort_order) sort_order = 'ASC';
break;
}
// set table header class // set table header class
$('#rcm'+this.env.sort_col).removeClass('sorted'+(this.env.sort_order.toUpperCase())); $('#rcm'+this.env.sort_col).removeClass('sorted'+(this.env.sort_order.toUpperCase()));

Loading…
Cancel
Save