thomascube
2005-11-01 36df57ce32ebad9416d78e4f86a41e5f1707f4ad
program/js/app.js
@@ -1,4 +1,4 @@
/*
/*
 +-----------------------------------------------------------------------+
 | RoundCube Webmail Client Script                                       |
 |                                                                       |
@@ -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 @@
      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;
@@ -763,11 +782,15 @@
  this.switch_task = function(task)
    {
    if (this.task===task)
    if (this.task===task && task!='mail')
      return;
    var url = this.get_task_url(task);
    if (task=='mail')
      url += '&_mbox=INBOX';
    this.set_busy(true);
    location.href = this.get_task_url(task);
    location.href = url;
    };