Changeset 2008


Ignore:
Timestamp:
02/12/10 09:40:11 (14 years ago)
Author:
amuller
Message:

Ticket #490 - unificação do connector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/js/edit_exmail.js

    r1796 r2008  
    217217function loadScript(scriptPath){ 
    218218 
    219         if(!connector) 
    220                 throw new Error("Error : Connector is not loaded."); 
    221          
    222         if(connector.oxmlhttp==null) 
    223                 connector.createXMLHTTP(); 
     219        if(!expresso.connector) 
     220                throw new Error("Error : expresso.connector is not loaded."); 
     221         
     222        if(expresso.connector.oxmlhttp==null) 
     223                expresso.connector.createXMLHTTP(); 
    224224                 
    225225        if (document.getElementById('uploadscript_'+scriptPath)) { 
     
    227227        } 
    228228         
    229         connector.oxmlhttp.open("GET", scriptPath, false); 
    230     connector.oxmlhttp.setRequestHeader('Content-Type','text/plain'); 
    231         connector.oxmlhttp.send(null); 
    232         if(connector.oxmlhttp.status != 0 && connector.oxmlhttp.status != 200 ||        connector.oxmlhttp.status == 0 && connector.oxmlhttp.responseText.length == 0) 
    233                 throw new Error("Error " + connector.oxmlhttp.status + "("+connector.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'"); 
     229        expresso.connector.oxmlhttp.open("GET", scriptPath, false); 
     230    expresso.connector.oxmlhttp.setRequestHeader('Content-Type','text/plain'); 
     231        expresso.connector.oxmlhttp.send(null); 
     232        if(expresso.connector.oxmlhttp.status != 0 && expresso.connector.oxmlhttp.status != 200 ||      expresso.connector.oxmlhttp.status == 0 && expresso.connector.oxmlhttp.responseText.length == 0) 
     233                throw new Error("Error " + expresso.connector.oxmlhttp.status + "("+expresso.connector.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'"); 
    234234         
    235235        var head = document.getElementsByTagName("head")[0]; 
     
    237237        script.id = 'uploadscript_'+scriptPath; 
    238238        script.type = 'text/javascript';                 
    239         script.text = connector.oxmlhttp.responseText; 
     239        script.text = expresso.connector.oxmlhttp.responseText; 
    240240        head.appendChild(script); 
    241241        return;  
Note: See TracChangeset for help on using the changeset viewer.