Ignore:
Timestamp:
10/20/09 15:24:08 (15 years ago)
Author:
eduardoalex
Message:

Ticket #656 - funcionalidade de arquivamento programado no expressoMail

File:
1 edited

Legend:

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

    r1477 r1518  
    3131                if(this.store==null) 
    3232                        this.store = this.localServer.createStore('test-store');                         
    33                 this.dbGears.open('database-test'); 
     33                 
     34                var db_in_other_use = true; 
     35                while (db_in_other_use) { 
     36                        try { 
     37                                this.dbGears.open('database-test'); 
     38                                db_in_other_use = false; 
     39                        }  
     40                        catch (ex) { 
     41                                db_in_other_use=true; 
     42                        } 
     43                } 
     44                 
     45                /*var db_is_opened = true; 
     46                while (db_is_opened) { 
     47                        try { 
     48                                this.dbGears.open('database-test'); 
     49                                db_is_opened = true; 
     50                        }  
     51                        catch (ex) { 
     52                                db_is_opened=false; 
     53                        } 
     54                }*/ 
     55                 
     56//              this.dbGears.open('database-test'); 
    3457                this.dbGears.execute('create table if not exists folder (folder text,uid_usuario int,unique(folder,uid_usuario))'); 
    3558                this.dbGears.execute('create table if not exists mail' + 
     
    3861                this.dbGears.execute('create table if not exists anexo' + 
    3962                ' (id_mail int,nome_anexo text,url text,pid int)'); 
     63                this.dbGears.execute('create table if not exists folders_sync' + 
     64                ' (id_folder text,folder_name text,uid_usuario int)'); 
     65                this.dbGears.execute('create table if not exists msgs_to_remove (id_msg int,folder text,uid_usuario int)'); 
    4066 
    4167                //some people that used old version of local messages could not have the size column. If it's the first version 
     
    908934        } 
    909935         
     936        local_messages.prototype.get_folders_to_sync = function() { 
     937                this.init_local_messages(); 
     938                var rs = this.dbGears.execute("select id_folder,folder_name from folders_sync where uid_usuario="+account_id); 
     939                var retorno = new Array(); 
     940                while(rs.isValidRow()) { 
     941                        temp = new Array(); 
     942                        temp[0] = rs.field(0); 
     943                        temp[1] = rs.field(1); 
     944                        retorno.push(temp); 
     945                        rs.next(); 
     946                } 
     947                this.finalize(); 
     948                return retorno; 
     949        } 
     950         
    910951        local_messages.prototype.install_offline = function(urlOffline,urlIcone,uid_usuario,login,pass,redirect) { 
    911952                if (!window.google || !google.gears) { 
Note: See TracChangeset for help on using the changeset viewer.