Ignore:
Timestamp:
07/19/11 09:40:53 (13 years ago)
Author:
roberto.santosjunior
Message:

Ticket #1820 - Erro ordenação de msg pesquisa rápida- Arquivamento Local.4650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/local_messages.js

    r4793 r4796  
    88    this.store = null; 
    99    this.filterSerch = ""; 
     10    this.sortType = ""; 
    1011} 
    1112 
     
    118119 
    119120} 
    120          
     121 
    121122local_messages.prototype.installGears = function (){ 
    122123    temp = confirm(get_lang("To use local messages you have to install google gears. Would you like to install it now?")); 
     
    926927} 
    927928 
     929local_messages.prototype.setSortType = function (sortType){ 
     930    this.sortType = sortType; 
     931} 
     932 
     933local_messages.prototype.getSortType = function (){ 
     934    if (this.sortType == "") 
     935    { 
     936        return 'SORTDATE'; 
     937    } 
     938    return this.sortType; 
     939} 
     940 
    928941local_messages.prototype.search = function(folders,sFilter) { 
    929942    this.init_local_messages(); 
     
    10031016    } 
    10041017    sql += ")"; 
     1018 
     1019    // Sort 
     1020    if (this.getSortType().match('^SORTDATE.*')){ 
     1021        sql += " order by mail.timestamp"; 
     1022    } 
     1023    else if (this.getSortType().match('^SORTWHO.*')){ 
     1024        sql += " order by mail.ffrom"; 
     1025    } 
     1026    else if (this.getSortType().match('^SORTSUBJECT.*')){ 
     1027        sql += " order by mail.subject"; 
     1028    } 
     1029    else if (this.getSortType().match('^SORTSIZE.*')){ 
     1030        sql += " order by mail.size"; 
     1031    } 
     1032    else if (this.getSortType().match('^SORTBOX.*')){ 
     1033        sql += " order by folder.folder"; 
     1034    } 
     1035 
     1036    sql += this.getSortType().match('^.*_REVERSE$') ? ' asc' : ' desc'; 
     1037 
    10051038    var rs = this.dbGears.execute(sql); 
    10061039    var retorno = []; 
Note: See TracChangeset for help on using the changeset viewer.