Changeset 4796 for trunk/expressoMail1_2/js/local_messages.js
- Timestamp:
- 07/19/11 09:40:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/local_messages.js
r4793 r4796 8 8 this.store = null; 9 9 this.filterSerch = ""; 10 this.sortType = ""; 10 11 } 11 12 … … 118 119 119 120 } 120 121 121 122 local_messages.prototype.installGears = function (){ 122 123 temp = confirm(get_lang("To use local messages you have to install google gears. Would you like to install it now?")); … … 926 927 } 927 928 929 local_messages.prototype.setSortType = function (sortType){ 930 this.sortType = sortType; 931 } 932 933 local_messages.prototype.getSortType = function (){ 934 if (this.sortType == "") 935 { 936 return 'SORTDATE'; 937 } 938 return this.sortType; 939 } 940 928 941 local_messages.prototype.search = function(folders,sFilter) { 929 942 this.init_local_messages(); … … 1003 1016 } 1004 1017 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 1005 1038 var rs = this.dbGears.execute(sql); 1006 1039 var retorno = [];
Note: See TracChangeset
for help on using the changeset viewer.