Changeset 1857


Ignore:
Timestamp:
12/16/09 16:30:01 (14 years ago)
Author:
eduardoalex
Message:

Ticket #822 - Resolvendo o problema descrito no ticket em questao

Location:
trunk/expressoMail1_2/js
Files:
2 edited

Legend:

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

    r1444 r1857  
    303303        cConnector.prototype.newRequest = function (id, target, method, handler, data) 
    304304        { 
     305                 
    305306                var params = data; 
    306307                this.tid = id; 
     308                 
    307309                if (this.requests[id]) { 
    308310                        return false; 
    309311                } 
    310          
     312 
    311313                this.createXMLHTTP(); 
    312314                var oxmlhttp = this.oxmlhttp; 
    313315                var _thisObject = this;          
    314                  
     316 
    315317                if (! oxmlhttp)          
    316318                        return false; 
     
    319321                this.buildBar();                 
    320322                this.showProgressBar(); 
    321                  
     323 
    322324                var sub_handler = function () 
    323325                {                        
     
    328330                                if (oxmlhttp.readyState == 4 ) 
    329331                                { 
    330                                          
    331332                                        switch (oxmlhttp.status) 
    332333                                        { 
    333                                                  
     334 
    334335                                                case 200: 
    335336                                                        if (typeof(handler) == 'function') 
     
    343344                                                                        document.getElementById("debug_controller").innerHTML += "<br>-------------------------------------------------------------------------------------<br>"; 
    344345                                                                } 
    345                                                                 handler(data); 
     346 
    346347                                                                _thisObject.addToCache(params?id+"&"+params:id,data); 
    347348                                                                delete _thisObject.requests[id];                                                                 
    348349                                                                _thisObject.requests[id] = null; 
     350                                                                handler(data); 
    349351                                                        } 
    350352 
     
    373375                try 
    374376                {  
    375                          
    376377                        if (method == '' || method == 'GET') 
    377378                        {                                                                
  • trunk/expressoMail1_2/js/mail_sync.js

    r1722 r1857  
    3838                        }  
    3939                        catch (ex) { 
    40                                 if(new Date.getTime()-start_trying>10000) { //too much time trying, throw an exception 
     40                                if(new Date().getTime()-start_trying>10000) { //too much time trying, throw an exception 
    4141                                        throw ex; 
    4242                                } 
     
    5454 
    5555                var rs = this.dbGears.execute("select id_folder,folder_name from folders_sync where uid_usuario=?",[account_id]); 
    56                 if(!rs.isValidRow()) 
     56                if(!rs.isValidRow()) { 
     57                        this.dbGears.close(); 
    5758                        return; 
     59                } 
     60                         
    5861 
    5962                this.working=true; 
     
    168171                else { 
    169172                        document.getElementById('main_title').innerHTML = get_lang("Starting to sync folder")+" "+lang_folder(folder_to_sync[1]); 
    170                         cExecute("$this.imap_functions.msgs_to_archive&folder=" + folder_to_sync[0] + "&mails=" + folder_to_sync[2], start_sync_mails); 
     173                        var params = "folder="+folder_to_sync[0]+"&mails="+folder_to_sync[2]; 
     174                        cExecute("$this.imap_functions.msgs_to_archive", start_sync_mails,params); 
    171175                        this.is_auto = true; 
    172176                } 
Note: See TracChangeset for help on using the changeset viewer.