Changeset 2515


Ignore:
Timestamp:
04/14/10 10:05:18 (14 years ago)
Author:
amuller
Message:

Ticket #188 - Melhorias de performance vistas pelo perfil do firebug

Location:
trunk
Files:
2 edited

Legend:

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

    r2497 r2515  
    598598 
    599599function url_encode(str){ 
    600     var hex_chars = "0123456789ABCDEF";  
    601     var noEncode = /^([a-zA-Z0-9\_\-\.])$/;  
    602     var n, strCode, hex1, hex2, strEncode = "";  
    603  
    604     for(n = 0; n < str.length; n++) {  
    605         if (noEncode.test(str.charAt(n))) {  
    606             strEncode += str.charAt(n);  
    607         } else {  
    608             strCode = str.charCodeAt(n);  
    609             hex1 = hex_chars.charAt(Math.floor(strCode / 16));  
    610             hex2 = hex_chars.charAt(strCode % 16);  
    611             strEncode += "%" + (hex1 + hex2);  
    612         }  
    613     }  
    614     return strEncode;  
     600        return escape(str); 
    615601 
    616602 
    617603function url_decode(str) {  
    618  
    619         var n, strCode, strDecode = "";  
    620         for (n = 0; n < str.length; n++) {  
    621             if (str.charAt(n) == "%") {  
    622                 strCode = str.charAt(n + 1) + str.charAt(n + 2);  
    623                 strDecode += String.fromCharCode(parseInt(strCode, 16));  
    624                 n += 2;  
    625             } else {  
    626                 strDecode += str.charAt(n);  
    627             }  
    628         }  
    629         return strDecode;  
     604        return unescape(str); 
    630605 
    631606 
  • trunk/phpgwapi/js/expressoAjax/expressoAjax.js

    r2403 r2515  
    320320        cConnector.prototype.newRequest = function (id, target, method, handler, data) 
    321321        { 
    322                 var params = data; 
    323322                this.tid = id; 
    324323                if (this.requests[id]) { 
     
    339338                var sub_handler = function () 
    340339                { 
    341                         var progressBar = _thisObject.progressBar; 
    342  
    343340                        try 
    344341                        { 
     
    367364                                                                } 
    368365                                                                handler(data); 
    369                                                                 _thisObject.addToCache(params?id+"&"+params:id,data); 
     366                                                                _thisObject.addToCache(data?id+"&"+data:id,data); 
    370367                                                                delete _thisObject.requests[id]; 
    371368                                                                _thisObject.requests[id] = null; 
Note: See TracChangeset for help on using the changeset viewer.