Changeset 1985


Ignore:
Timestamp:
02/05/10 10:16:24 (14 years ago)
Author:
eduardoalex
Message:

Ticket #888 - Replicando no branch 2.1 a correcao descrita no ticket em questao.

Location:
branches/2.1/expressoMail1_2/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/expressoMail1_2/js/local_messages.js

    r1970 r1985  
    77                this.localServer = null; 
    88                this.store = null; 
    9                 this.fileSubmitter = null; 
    109        } 
    1110 
     
    118117                else return false; 
    119118        } 
    120         local_messages.prototype.init_local_messages = function(){ 
     119         
     120        local_messages.prototype.create_objects = function(){ 
    121121                if(this.dbGears == null) 
    122122                        this.dbGears = google.gears.factory.create('beta.database'); 
     
    124124                        this.localServer = google.gears.factory.create('beta.localserver'); 
    125125                if(this.store==null) 
    126                         this.store = this.localServer.createStore('test-store');                         
    127                  
     126                        this.store = this.localServer.createStore('test-store'); 
     127        } 
     128         
     129        local_messages.prototype.init_local_messages = function(){ 
     130                                         
     131                if(this.dbGears==null || this.localServer==null || this.store == null)  
     132                        this.create_objects();  
     133         
    128134                var db_in_other_use = true; 
    129135                var start_trying = new Date().getTime(); 
     
    15901596        var expresso_local_messages; 
    15911597        expresso_local_messages = new local_messages(); 
     1598        expresso_local_messages.create_objects();  
  • branches/2.1/expressoMail1_2/js/main.js

    r1970 r1985  
    1111        var save_contacts = function(data){ 
    1212                contacts = data; 
    13                 expresso_local_messages.capt_url('controller.php?action=$this.db_functions.get_dropdown_contacts_to_cache'); 
     13                 
     14                if (preferences.use_local_messages == 1 && window.google && google.gears)   
     15                        if (expresso_local_messages.is_offline_installed())   
     16                                expresso_local_messages.capt_url('controller.php?action=$this.db_functions.get_dropdown_contacts_to_cache'); 
    1417        } 
    1518        var save_preferences = function(data){ 
     
    5356        } 
    5457        // Fim da inserção da applet 
    55  
     58                cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences.  
    5659                cExecute ("$this.imap_functions.get_folders_list&onload=true", update_menu); 
    5760        } 
     
    6871        cyrus_delimiter = Element('cyrus_delimiter').value; 
    6972 
    70         cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); 
    7173        cExecute ("$this.functions.get_preferences", save_preferences); 
    7274        setTimeout('auto_refresh()', time_refresh); 
Note: See TracChangeset for help on using the changeset viewer.